Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Make sure we've been sent an image url
- if (!isset($_GET['file'])) {
- echo "Sorry, no image URL was sent.";
- exit();
- }else{
- var_dump($_GET);
- }
- $image_url = $_GET['file'];
- $newfilename = $_GET['newfilename'];
- // Download the image data from Picnik's servers
- $image_data = file_get_contents( $image_url );
- //var_dump($image_data);
- if (FALSE === $image_data) {
- // Download failed ... this shouldn't happen very often,
- // but you might want to put some retry logic in your app
- echo "Sorry, the image download failed.";
- exit();
- }
- move_uploaded_file($_FILE["file"]["tmp_name"],
- "photos/" . $newfilename);
- $recordID = $_GET['recordID'];
- echo "<br><br><br><br><br><div align='center'>PHOTO UPDATED SUCCESSFULLY</div>";
Add Comment
Please, Sign In to add comment