12-04-2015, 09:32 PMTropical Wrote:12-04-2015, 09:12 PMAmN Wrote: So I was bored to death and I decided to steal all the wallpapers of a website.
http://askamn.com/wallpapers.php
PRess F5 and you will get new ones.
*No noob. I did not download and upload those millions of images to my server. I just wrote a regex in php and pulled the images from there <.<
About regex, how do you write something like this where it pulls images and such?
Google Regex.
$regex = '#(<img\ssrc="([\d]+)")#;
preg_match_all( $regex, $string, $matches);
foreach( $matches[1] AS $match)
{
echo "Src of image: {$match}";
}
above code will match all strings have an <img src="link"> type of image src in the given HTML code (here $string)