Wednesday 18 September 2013

php_network_getaddresses: getaddrinfo failed

php_network_getaddresses: getaddrinfo failed

I am getting this error ( http://prntscr.com/1s51gw ) in all the functions
of Image GD library.
<?
$im = @imagecreatefromjpeg("src/bg.jpg") or die('Cannot Initialize new GD
image stream');
function copyImage1($im, $dp1_name, $x1, $y1){
$dp1 = imagecreatefromjpeg($dp1_name);
list($w1, $h1) = getimagesize($dp1_name);
imagecopy($im, $dp1, 35, 130, 0, 0, $w1, $h1);
}
function copyImage2($im, $dp2_name, $x2, $y2){
$dp2 = imagecreatefromjpeg($dp2_name);
list($w2, $h2) = getimagesize($dp2_name);
imagecopy($im, $dp2, 618, 125, 0, 0, $w2, $h2);
}
$box = imagettfbbox(30, 0, "src/font.ttf", $user_name);
imagettftext($im, 23, 0, 53, 348, imagecolorallocate($im, 73, 184, 227),
"src/font.ttf", "hello");
imagettftext($im, 23, 0, 628, 348, imagecolorallocate($im, 73, 184, 227),
"src/font.ttf", "byr");
copyImage1($im,
"http://graph.facebook.com/100001504336690/picture?width=153&height=143",
10, 10);
copyImage2($im,
"http://graph.facebook.com/100001504336690/picture?width=138&height=158",
10, 10);
$file_name = "dump/" . rand(1000, 9999) . "-id-" . rand(1000, 9999) . ".jpg";
imagejpeg($im, $file_name, 80);
imagedestroy($im);
?>
The files are available at there place,
CODE WAS WORKING FINE BUT NOW IT'S NOT WORKING. i don't know y it is not
working now..
Any help will be appreciated. please hell to solve the issue.

No comments:

Post a Comment