$image = $html2->getElementById('hlHeadImage');
if (isset($image)) {
if (strpos($image->children(0)->src, 'clearpixel') == 0) {
$link = $image->children(0)->src;
$path_parts = pathinfo($link);
$ext = $path_parts['extension'];
$image_path = "part_images/".$ITEM_NO.".".$ext;
@copy($link."&sz=lg", $image_path);
}
} else {
$image = $html2->getElementById('hlLargeImage');
if (isset($image)) {
if (strpos($image->children(0)->src, 'clearpixel') == 0) {
$link = $image->children(0)->src;
$path_parts = pathinfo($link);
$ext = $path_parts['extension'];
$image_path = "part_images/".$ITEM_NO.".".$ext;
@copy($link, $image_path);
}
}
} |