Find the Image URL using preg_match() syntax or something similar to extract JPG or PNG or GIF URLs from a mixed text and put them in an array or at last store the first url.
maybe some syntax which searchs for strings that are beginning with http and ending with jpg/png/gif..
i believe it can be done with preg_match()
Note: the text can be like that : $string =blablablabla http://www.xxx.com/xxx.jpg blablablabla
$matches = array();
preg_match_all(‘!http://.+\.(?:jpe?g|png|gif)!Ui’ , $string , $matches);
Thanks you
Vindesh Mohariya
----
Server IP: 69.147.83.197
Probable Submitter: 122.168.134.194
----
Manual Page -- http://www.php.net/manual/en/function.getimagesize.php
Edit -- https://master.php.net/note/edit/98103
Del: integrated -- https://master.php.net/note/delete/98103/integrated
Del: useless -- https://master.php.net/note/delete/98103/useless
Del: bad code -- https://master.php.net/note/delete/98103/bad+code
Del: spam -- https://master.php.net/note/delete/98103/spam
Del: non-english -- https://master.php.net/note/delete/98103/non-english
Del: in docs -- https://master.php.net/note/delete/98103/in+docs
Del: other reasons-- https://master.php.net/note/delete/98103
Reject -- https://master.php.net/note/reject/98103
Search -- https://master.php.net/manage/user-notes.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.