graham23s Posted April 5, 2010 Share Posted April 5, 2010 Hi Guys, I'm using a curl request to get some html, when i get the html back: $html = curl_exec($ch); i want to check that $html contains a certain string, what would be the best way to do it? thanks for any help guys Graham Quote Link to comment Share on other sites More sharing options...
JAY6390 Posted April 5, 2010 Share Posted April 5, 2010 For a simple string use http://www.php.net/manual/en/function.strstr.php For a regular expression use http://www.php.net/manual/en/function.preg-match.php Quote Link to comment Share on other sites More sharing options...
the182guy Posted April 5, 2010 Share Posted April 5, 2010 Have you looked at strpos() ? Quote Link to comment Share on other sites More sharing options...
graham23s Posted April 5, 2010 Author Share Posted April 5, 2010 Thanks mate stristr did the job cheers Graham 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.