Or try

$defined['hostname'] = "<ALLOWED_DOMAIN_NAME>";

if ($_SERVER['SERVER_NAME'] != $defined['hostname']) {
 echo "Not from my domain pal";
}

Michael Hulse wrote:


On Dec 16, 2005, at 11:50 AM, Shaun wrote:

I have a script on my site for processing values sent from a contact form and emailing them to the webmaster. The script has been abused by spammers
and my hosting company has recommended that I change the script to only
accept information posted from my own URL. Could someone tell me how this
can be done please?


Hello,

Maybe try using:

$_SERVER['DOCUMENT_ROOT']

Or, something similar.

http://us2.php.net/reserved.variables

Hth,
Cheers,
Micky



--
Jason Gerfen

"Oh I have seen alot of what
the world can do, and its
breaking my heart in two..."
~ Wild World, Cat Stevens

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to