$xml, "id" => substr((string)$xml->entry->id, 9), "title" => (string)$xml->entry->title, "channel_id" => substr((string)$xml->entry->author->uri, 32), "channel_url" => (string)$xml->entry->author->uri, "author" => (string)$xml->entry->author->name, "published" => (string)$xml->entry->published, "updated" => (string)$xml->entry->updated ]; // Registra em arquivo de logs $file = fopen(__DIR__ . '/video_logs.txt','a+'); fwrite($file, "\r\n ============================== \r\n\r\n"); fwrite($file, json_encode($video_data)); fclose($file); return; } ?>