AA Dear bro, i want to get the img src from a html page butt i have faced with error,Help please , my server show this messaage
Notice: Undefined offset: 0 in F:\xamppppp\htdocs\Arslan_Sir\img download from google.php on line 13 Notice: Array to string conversion in F:\xamppppp\htdocs\Arslan_Sir\img download from google.php on line 15 Array
my code is
<?php //this code can be pic
image from a html page $ctual_link="https://www.google.com/search?q=9780333993385&ie=utf-8&oe=utf-8&client=firefox-b-ab"; define('DIRECTORY', '/imgg/m/'); $text = file_get_contents($ctual_link); preg_match_all('/<div class=\"image\">(.*?)<\/div>/s', $text, $out); //preg_match('/~src="(.*)"itemprop="image" \/>/',$text,$out); preg_match('~src="(.*)"\s*itemprop="image"[^>]*>~',$text,$out); //$out
= explode(' ',$out[1]); $z=trim($out[0],'"'); echo $out; //} ?>