Could someone make me a script that will check what the referring url and if its not the refereeing url i wanted then it will show a error message instead of the site. MUST BE EASY TO EDIT AND NOT ENCODED price i pay: 10$
<?php // Ref. site $ref = getenv("HTTP_REFERER"); // site you want to test $url = "http://www.google.com"; // the test ? // you can add more test to see if the url is with or without www if($ref != $url) { echo "Error Msg"; } else { echo " show something else ";} ?> PHP: send payment to my paypal
#!/usr/bin/perl -w-T # The above is the path to the perl interpreter, modify to match yours!!! # Requires at least perl 5 use CGI qw/:standard/; # URL of referRer my $ref = $ENV{HTTP_REFERER} || 'Unknown'; # The referRer you want? my $wanted_ref = 'http://Somewhere/Dir/File.ext'; # The URL you want to show IF the referRer is OK? my $url = 'http://MyDomain/MyDir/MyFile.ext'; # Check if it's the referRer you want unless ($ref eq $wanted_ref) { print header; print qq/ERROR MESSAGE IN PLAIN-TEXT OR <code>HTML<\/code> HERE/; print qq/\n/; } else { print redirect($url); } exit; Code (markup): Wonder how to use it?