Ezio Posted September 18, 2013 Share Posted September 18, 2013 Hey guys, I have an image url like: https://graph.facebook.com/100001208845762/picture?type=square&return_ssl_resources=1 how do i get the image from this link and save it to my local directory..?? Please help. Link to comment Share on other sites More sharing options...
Mudsaf Posted September 18, 2013 Share Posted September 18, 2013 (edited) http://stackoverflow.com/questions/724391/saving-image-from-php-url-using-php copy('<imagepath>.(jpg,png,gif,php whatEVA you want)', '<yourlocalfolder>.jpg'); Edited September 18, 2013 by Mudsaf Link to comment Share on other sites More sharing options...
rootKID Posted September 18, 2013 Share Posted September 18, 2013 not sure if this is related or against the rules etc, but i do have a question that is close or similar to this problem, and not sure yet, so posting the question here.. i have for not so long ago seen a automated tool on a movie site via IMDB website getting information with a request function of some sort, that part is not my problem right now. Now lets say i wish to make a blog about movies, and wish to use the picture ON that IMDB page for that specific movie, would it be possible instead of using links to show over to that site, by the automated request save this picture to the own server, rename it to (some ID to the database post etc to know what is what), now save it to a folder on my server, and use that picture instead of linking directly to that picture and still get the rest of stuff i am requesting from their site. The request part is easy i think, but it's the image i was wondering about if it was possible, i do think it is tho, just how to implent it... ideas? Link to comment Share on other sites More sharing options...
Ezio Posted September 18, 2013 Author Share Posted September 18, 2013 http://stackoverflow.com/questions/724391/saving-image-from-php-url-using-php copy('<imagepath>.(jpg,png,gif,php whatEVA you want)', '<yourlocalfolder>.jpg'); I tried that and other methods too but the image that gets saved to the server allways is of 0 bytes...why is that..?? Link to comment Share on other sites More sharing options...
thescientist Posted September 18, 2013 Share Posted September 18, 2013 per the comments to the SO answer in question, did you check to make sure allow_url_open is enabled on your server? Link to comment Share on other sites More sharing options...
rootKID Posted September 19, 2013 Share Posted September 19, 2013 hmm, never thougt of that x).. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now