this is my corn job : /usr/local/bin/php -q /home/malin/public_html/youtube_api_test/cron_autosave_api_data.php
this is the function i wanna run using corn job
json_decode() is not function with the corn job
this is the function i wanna run using corn job
Code:
function getytChannelData($channel_id,$api_key)
{
$data = file_get_contents('https://www.googleapis.com/youtube/v3/channels?part=statistics&id='.$channel_id.'&key='.$api_key);
return $out = json_decode($data, true );
}
Last edited by a moderator: