Snorkel Posted October 8, 2007 Share Posted October 8, 2007 I need a simple script that checks if the URL includes a specific string of text, and if it does, do something, if it doesn't, do something else. I know this can be accomplished with an if/else function, which I can do, but I don't know how to do the checking the URL part. Quote Link to comment Share on other sites More sharing options...
trq Posted October 8, 2007 Share Posted October 8, 2007 To get a url (file) into a string use file_get_contents, once you have the file in a string you can simply use strpos to see if it contains a certain string. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.