Gidday All, I have found this subroutine in someone else's program I need to modify it so it will work on my server. I wish to use it to confirm that only forms submiited from my Domain will be processed. Its the reg ex I don't understand, Can someone help me re-write it.
Is it as simple as substituting $bd_domain for a variable containing mydomainname? Our domain is "http://www.schools.nsw.edu.au". I'd prefer it if in the re-write we assign the domain to be verified to a variable and then put that variable in the regex. sub check_url { local($check_referer) = 0; if ($ENV{'HTTP_REFERER'}) { if ($ENV{'HTTP_REFERER'} =~ m|https?://([^/]*)$bd_domain|i) { $check_referer = 1; } } else {$check_referer = 1;} if ($check_referer != 1) { &error('bad_referer') } } Any help appreciated. Thank You Colin Johnstone Website Project Officer ********************************************************************** This message is intended for the addressee named and may contain privileged information or confidential information or both. If you are not the intended recipient please delete it and notify the sender. ********************************************************************** -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]