Jump to content

Get the SRC


The Little Guy

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.