ted_chou12 Posted January 2, 2007 Share Posted January 2, 2007 I know there is some way to check if a string is a url format or not, but I dont know what is it called, I have done a lot of searching on it already, but i cant find it, can anyone help me please?ThanksTed Link to comment https://forums.phpfreaks.com/topic/32566-solved-how-to-check-if-the-string-is-a-url-format/ Share on other sites More sharing options...
trq Posted January 2, 2007 Share Posted January 2, 2007 what do you meen by url format? You could check for the existence of http:// using [url=http://php.net/strpos]strpos[/url] if that is what you meen. Link to comment https://forums.phpfreaks.com/topic/32566-solved-how-to-check-if-the-string-is-a-url-format/#findComment-151418 Share on other sites More sharing options...
ted_chou12 Posted January 2, 2007 Author Share Posted January 2, 2007 isnt there some thing called eregi? I thought that could be used to check the string format... Link to comment https://forums.phpfreaks.com/topic/32566-solved-how-to-check-if-the-string-is-a-url-format/#findComment-151437 Share on other sites More sharing options...
trq Posted January 2, 2007 Share Posted January 2, 2007 It can. why dont you look it up in the manual and see how works. However, if your just looking for the fixed string http://, strpos is much more efficient. Link to comment https://forums.phpfreaks.com/topic/32566-solved-how-to-check-if-the-string-is-a-url-format/#findComment-151445 Share on other sites More sharing options...
ted_chou12 Posted January 2, 2007 Author Share Posted January 2, 2007 okay, I will try that then Link to comment https://forums.phpfreaks.com/topic/32566-solved-how-to-check-if-the-string-is-a-url-format/#findComment-151446 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.