I have to download a png file and use it for Image Processing in php. I want to save this image: /favicon?domain=http://facebook.com/">https://plus.google.com//favicon?domain=http://facebook.com/ into my local folder and perform image processing operations over it.
When I am doing this, its working fine:
$url = 'http://s.wordpress.org/about/images/color-blue.png';
$img = 'try1.png';
file_put_contents($img, file_get_contents($url));
but this is not working a file try1.png is getting created of 0kb
$url = "https://plus.google.com/_/favicon?domain=http://facebook.com/";
$img = 'try1.png';
file_put_contents($img, file_get_contents($url));
Please help. Regards, Suyash