Forum Moderators: coopster
So, I was thinking of being able to "scan" the $HTTP_HOST string and see if a match of the characters I set match. So does anyone know how I would logically write this code in php? Don't worry seeker.com is not full url of the website, but only the end of the website url.
$url= $HTTP_HOST
Scan $url for seeker.com if it matches,
print 'Good a match';
}else{
print 'Oooh no match found';
Note: If you only want to determine if a particular needle occurs within haystack, use the faster and less memory intensive function strpos() instead.
I.E.:
if(strpos(strtolower($HTTP_HOST),'example.com') > -1)etc.