I have my API call that retrieves the information I need to pull data onto my site
However, the API call needs to be called every 24hrs but I cannot use cron
Does anyone have an idea on how I can maybe do this with PHP or perhaps JS?
Here's my (simplified) call:
$postdata = http_build_query(
array(
'username' => 'user',
'password'=>'pass'
));
/* API URL */
$url = ' *my_api_url_here* ';
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
echo json_encode($result);
curl_close($ch);