mme Posted January 15, 2011 Share Posted January 15, 2011 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 More sharing options...
cmattoon Posted January 15, 2011 Share Posted January 15, 2011 Try using regex. This site has a few examples on URL regexes. I'm still not very good with them though. Link to comment https://forums.phpfreaks.com/topic/224515-domain-name-check/#findComment-1159825 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.