Advertisement
GigilinE

Untitled

Sep 4th, 2021
20
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. $ccc = file_get_contents($api_url . $bot_token . "/getFile?file_id=" . $photo_profile_1280_id);
  2. $gettedarr = json_decode("$ccc", true);
  3. $filePath = $gettedarr['result']['file_path'];
  4. $link = "https://api.telegram.org/file/bot" . $bot_token . "/" . $filePath;
  5. $FileRemoto = fopen($link, "r");
  6. $fileCopiaPath = fopen("/home/gigiline/public_html/bot/amazonreview/image/".$folder_file."/" . $from_id . "-" . $message_id . ".jpg", "w");
  7. while ($contents = fread($FileRemoto, 20480)) {
  8. fwrite($fileCopiaPath, $contents, strlen($contents));
  9. }
  10. fclose($FileRemoto);
  11. fclose($fileCopiaPath);
  12.  
  13. $link_file_external = $amazonreview_link_external . "image/".$folder_file."/" . $from_id . "-" . $message_id . ".jpg";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement