<?php
$file = file_get_contents("http://www.zj.com/");
preg_match_all("/<img src=[\"|\'](.*)[\"\'].*>/isU",$file,$arr);
foreach($arr[1] as $key => $value)
{
$pos = strrpos($value,"http");
if($pos === false)
{
continue;
}
$i = file_get_contents($value);
file_put_contents($key.".jpg",$i);
}