$url="http://xukai1.qiyunapp.com/products/product-1002699.html";
$text=file_get_contents($url);//id=\"tabitem\">(.*?)<\/div>/is
//取得所有img标签
preg_match_all('/<img[^>]*>/i', $text, $imgarray);
preg_match_all('/img1=\"([^"]*)\"/',$text,$imglist_800);
//返回所有图片的路径
preg_match_all("/<[img|IMG].*?src=[\'|\"](.*?(?:[\.gif|\.jpg]))[\'|\"].*?[\/]?>/",$text,$match);
//取得class为pdtname clear里面的内容
preg_match('/class=\"pdtname clear\">(.*?)<\/div>/is',$text,$title);
preg_match('/class=\"pdtdesc\">(.*?)<\/div>/is',$text,$desc);
preg_match('/id=\"marketprice\">(.*?)<\/span>/is',$text,$market_price);
preg_match('/id=\"memberprice\">(.*?)<\/span>/is',$text,$shop_price);
preg_match('/<img[^>]*id=\"thumbnail_img\"[^r]*rc=\"([^"]*)\"[^>]*>/',$text,$original_img);
preg_match('/class=\"tabitem\">(.*?)<\/div>/is',$text,$tabitem);
$imglist=$imglist_800[1];
$value['title']=trim($title['1']);//商品名称
$value['goods_remark']=trim($desc['1']);//商品简介
$value['market_price']=trim($market_price['1']);//市场价
$value['shop_price']=trim($shop_price['1']);//售价
$value['original_img']=trim($original_img['1']);//产品缩略图
$value['imglist']=$imglist;//商品相册
$value['goods_content']=trim($tabitem[1]);//商品详情
print_r($value);exit;
//去掉style行内样式
$str='<img src="https://file.alonesky.com/images/wallpaper/d2a9d3480f0898eecec51d39432b796a.jpg" style="width:480px;height:270px" alt="图片背景">';
echo preg_replace('/style=\".*?\"/',' ',$str);
$string = "中文123高深abc开心。?我们";
//取出中文汉字并加粗
//echo preg_replace('#(?:(?![,。?])[\xC0-\xFF][\x80-\xBF]+)+#','<b>$0</b>',$string);
//取出数字并加粗
//echo preg_replace('#(\d)+#','<b>$0</b>',$string);