I'm trying to save a jpg file from a dynamic url, looks like this,
http://bks7.books.google.se/books?id=TL3JGsUOArkC&printsec=frontcover&img=1&zoom=1&&source=gbs_api
file_get_contents can't get the content correctly, here is my code,
<?php
$image_url = "http://bks7.books.google.se/books?id=TL3JGsUOArkC&printsec=frontcover&img=1&zoom=1&&source=gbs_api";
$img = file_get_contents($image_url);
$folder = 'C:/xampp/htdocs/test/test.jpg';
file_put_contents($folder, file_get_contents($img));
?>
Appreciate any ideas or alternative as "easy" methods.