The Little Guy Posted February 25, 2010 Share Posted February 25, 2010 I have this string (in an entire html doc with other images): <img src="/profile/pic.php?oid=AAAAAwAgACAAAAAJSYNkpuWDLcl99yuWdwLhjYJe_x5WO5jNzjixm8BwNTYqVe2vi8iu9e1xGuVfya2pvNVjBli8SYQlSXWb2Uv5N5HmoNfGlEuI7UWrzoYjm3Z1QI2KXXXAMPMaggsjijmG&size=normal" alt="Ryan Naddy" class="photo" /> And this PHP: if(preg_match("~<img src=\"/profile/pic\.php\?=(.+?)\" alt=\"(.+?)\" class=\"photo\" />~", $this->info, $matches)){ print_r($matches); } I am trying to extract the src, and the code is returning false, and I do know that $this->info contains html, because I have echoed out the html. Link to comment https://forums.phpfreaks.com/topic/193317-get-the-src/ Share on other sites More sharing options...
The Little Guy Posted February 25, 2010 Author Share Posted February 25, 2010 haha I forgot: oid as a GET Link to comment https://forums.phpfreaks.com/topic/193317-get-the-src/#findComment-1017879 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.