Jump to content

[SOLVED] Find domain in string


rvdb86

Recommended Posts

stristr would be one way to do it.

 

$domain = $_SERVER['HTTP_REFERER'];
if (stristr($domain, "mydomain.com") !== false)
     echo "mydomain.com is present.";

 

But remember, checking the referrer is not a fail safe way, as an fyi as it can be spoofed easily.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.