Advertisement
Guest User

Untitled

a guest
Sep 29th, 2021
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.47 KB | None | 0 0
  1.                     for ($i = 0; $i < $update["total_count"]; $i += 1){
  2.                         var_dump("dump", $i, intval($update["photos"][$i]["sizes"][0]["photo"]["id"]));
  3.                         if(!is_null($update["photos"][$i]["animation"])){
  4.                             $query = json_encode([
  5.                                 '@type' => "downloadFile",
  6.                                 "file_id" => intval($update["photos"][$i]["sizes"][0]["photo"]["id"]),
  7.                                 "priority" => 1,
  8.                                 "offset" => 0,
  9.                                 "limit" => 0,
  10.                                 "synchronous" => true,
  11.                                 "@extra" => "animated_photo"
  12.                             ]);
  13.                             td_json_client_send($client, $query);
  14.                         }
  15.                         else{
  16.                             $query = json_encode([
  17.                                 '@type' => "downloadFile",
  18.                                 "file_id" => intval($update["photos"][$i]["sizes"][0]["photo"]["id"]),
  19.                                 "priority" => 1,
  20.                                 "offset" => 0,
  21.                                 "limit" => 0,
  22.                                 "synchronous" => true,
  23.                                 "@extra" => "simple_photo"
  24.                             ]);
  25.                             td_json_client_send($client, $query);
  26.                         }
  27.  
  28.                     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement