Advertisement
Guest User

Untitled

a guest
Jan 29th, 2016
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.40 KB | None | 0 0
  1. $image = file_get_contents($image_link);
  2.     file_put_contents("image.png",$image);
  3.     $curl = curl_init();
  4.     curl_setopt($curl,CURLOPT_URL,$urlUploadServer);
  5.     curl_setopt($curl,CURLOPT_RETURNTRANSFER,true);
  6.     curl_setopt($curl,CURLOPT_POST,true);
  7.     curl_setopt($curl,CURLOPT_POSTFIELDS,array(
  8.             'file1' => realpath("image.png")
  9.         ));
  10.     $response = curl_exec($curl);
  11.     curl_close($curl);
  12.     echo($response);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement