Tuskony Posted November 5, 2008 Share Posted November 5, 2008 The title says it all.... I want to download images to my server using file_get_contents but I am not sure how I actually save these images once file_get_contents() has finished. A user inputs a URL into a form and clicks submit then the site downloads the image to my server. However I'm also not sure how I verify that they've entered a proper URL to a picture and not to a script or something like that... Thanks guys! Quote Link to comment Share on other sites More sharing options...
Tuskony Posted November 5, 2008 Author Share Posted November 5, 2008 Bump! Quote Link to comment Share on other sites More sharing options...
Stephen Posted November 5, 2008 Share Posted November 5, 2008 You can use file_put_contents with the data you received and the filename. http://us3.php.net/manual/en/function.file-put-contents.php (or any fwrite-type command) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.