Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for ($i = 0; $i < $update["total_count"]; $i += 1){
- var_dump("dump", $i, intval($update["photos"][$i]["sizes"][0]["photo"]["id"]));
- if(!is_null($update["photos"][$i]["animation"])){
- $query = json_encode([
- '@type' => "downloadFile",
- "file_id" => intval($update["photos"][$i]["sizes"][0]["photo"]["id"]),
- "priority" => 1,
- "offset" => 0,
- "limit" => 0,
- "synchronous" => true,
- "@extra" => "animated_photo"
- ]);
- td_json_client_send($client, $query);
- }
- else{
- $query = json_encode([
- '@type' => "downloadFile",
- "file_id" => intval($update["photos"][$i]["sizes"][0]["photo"]["id"]),
- "priority" => 1,
- "offset" => 0,
- "limit" => 0,
- "synchronous" => true,
- "@extra" => "simple_photo"
- ]);
- td_json_client_send($client, $query);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement