Jump to content

Domain Name check


mme

Recommended Posts

Hi,

 

I am trying to see if the domain name in the string is in an array.

 

eg;

 

mystring='http://google.com/somethingelse';

myarray[]='google.com';
myarray[]='anotherdomain.com';

in this case return TRUE

 

mystring='http://phpfreaks.com/adir';

myarray[]='google.com';
myarray[]='anotherdomain.com';

 

in this case return FALSE

 

How would I do this?

 

Thanks,

 

-mme

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/224515-domain-name-check/
Share on other sites

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.