 |
|
<?
$images = "http://www.rplgem.com/gallery/RU/RU0512280026A.jpg";
if(!GetimageSize($images))
{
echo 'found';
}
else
{
$height = 123;
$size = GetimageSize($images);
$width=round($height*$size[0]/$size[1]);
$images_orig = ImageCreateFromJPEG($images);
$photoX = ImagesX($images_orig);
$photoY = ImagesY($images_orig);
$images_fin = ImageCreateTrueColor($width,$height);
ImageCopyResampled($images_fin, $images_orig, 0, 0, 0, 0, $width+1, $height+1, $photoX, $photoY);
ImageJPEG($images_fin,"newimages.jpg");
ImageDestroy($images_orig);
ImageDestroy($images_fin);
}
?>
มันแสดง error แบบนี้อ่ะครับ ซึ่งจริงๆ ผมอยากให้มันแสดงค่าคำว่า found มีวิธีแก้ไหมครับ
Warning: getimagesize(http://www.rplgem.com/gallery/RU/RU0512280026AA.jpg) [function.getimagesize]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in c:\AppServ\www\test.php on line 4
found
Tag : - - - -
|
|
 |
 |
 |
 |
Date :
20 ก.พ. 2551 09:43:39 |
By :
lermjunior |
View :
1417 |
Reply :
3 |
|
 |
 |
 |
 |
|
|
|
 |