Go Back   Computer Forums > General Computing > Programming
Click Here to Login
Join Computer forums Today

Thread Tools Search this Thread Display Modes
Old 03-26-2012, 11:15 PM   #1
Beta Member
Join Date: Mar 2012
Location: Australia
Posts: 3
Default Perl/CGI/ASP/JSP versions for this...

I have a DNSBL server hosted at www.mailer.mobi and a script on my web server written in PHP that checks the DNSBL to see if a visitor's IP is blacklisted and returns 0 or 1 accordingly. So you can put the following line of PHP code at the very start of your web site to return a 404 Error "Page Not Found" if it's visited by a computer on a blacklisted IP.

<?php if (@file_get_contents("https://mailer.mobi/?guard=".$_SERVER['REMOTE_ADDR']) == "1") { header("HTTP/1.0 404 Not Found"); die(); } ?>

What I'm after is the same functionality as the above line, but just in other dynamic languages, ie. ASP, JSP, Perl (CGI), Python, Coldfusion etc, so I can put them on the www.mailer.mobi site for people who have sites in those languages.

If you know how to do the above in another language, can you help me?
enlivenit is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

All times are GMT -5. The time now is 07:10 PM.

Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0