Why is this happening? Run the script on 000webhost, after run CronJobs, it throws an error. After I go to the site to see what was the matter, and I wrote several of these lines:
Notice:Undefined variable: bd (the destination path of the file) in line 119
Notice:Undefined variable: bd (the destination path of the file) in line 127
Notice:Undefined variable: bd (the destination path of the file) in line 127
Notice:Undefined variable: bd (the destination path of the file) in line 127
And so until they stop CronJobs.
Here is the script where the errors occur:
if (isset($result['response']['ts'])){
$bd = $result['response']['ts'];
print_r($bd);
}
$require_dva = array(
'ts' => $bd
'events_limit' => 1000,
'msgs_limit' => 200,
'v' => '5.76',
'access_token' => $token
);
getme:
$get_params2 = http_build_query($require_dva);
$result2 = json_decode(file_get_contents('
https://api.vk.com/method/messages.getLongPollHist...'.$bd.'&msgs_limit=200&events_limit=1000&access_token=*token*'),true);
Please tell me how to solve this problem, I would be very grateful.