array( "header" => "User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36" ) ));error_reporting(E_ERROR | E_PARSE);$web = "https://static.bigc.co.th/media/catalog/product/cache/2/image/497x497/9df78eab33525d08d6e5fb8d27136e95/";$result = $mysqli->query("SELECT * FROM `bigc_products` WHERE `imagepath` != ' ' ORDER BY `bigc_products`.`barcode` ASC");$n = 1;while ($row = mysqli_fetch_array($result)){ $barcode = $row[0]; $title = $row[1]; $price = $row[2]; $first = substr($barcode,0,1); $second = substr($barcode,1,1); $image = $web.$first."/".$second."/".$barcode.".jpg"; if (false!==file($image, false, $context)) { $imageData = base64_encode(file_get_contents($image, false, $context)); ?> 30) exit; } else { $image = $web.$first."/".$second."/".$barcode."_1.jpg"; if (false!==file($image, false, $context)) { $imageData = base64_encode(file_get_contents($image, false, $context)); ?>
".$title."".$price.""; ?>
30) exit; } }}?>
".$title."".$price.""; ?>