/home/desid573/public_html/app
NameSizeModeActions
braintree/-0755rm
lib/-0755rm
twilio-php-master/-0755rm
vendor/-0755rm
after_booking_page.php25950644editdlrm
appoff.php47820644editdlrm
booking.php96550644editdlrm
cancel_booking.php49250644editdlrm
composer.json650644editdlrm
composer.lock23550644editdlrm
confirmsend.php29830644editdlrm
contact_us_mail.php8900644editdlrm
copy_account_to_homekey.php43340644editdlrm
dispatch.php8770644editdlrm
emailConfirmReset.php4010644editdlrm
error_log5868740644editdlrm
family-cab_small.jpg988530644editdlrm
generate_credit.php30980644editdlrm
generate_referall.php27790644editdlrm
getuser_byid.php23410644editdlrm
getuser_bymail.php21830644editdlrm
get_all_booking.php7790644editdlrm
get_booking_bybooking_id.php8130644editdlrm
get_booking_byuser.php10570644editdlrm
get_booking_status.php21700644editdlrm
get_completed_bookings.php7100644editdlrm
get_ETA.php63320644editdlrm
get_lead_message.php6730644editdlrm
get_open_bookings.php13990644editdlrm
get_payment_byuser.php10640644editdlrm
get_price.php7600644editdlrm
get_recipes.php63610644editdlrm
get_TE.php12170644editdlrm
index.php104110644editdlrm
index_backup.php47910644editdlrm
lib_tr.zip1050470644editdlrm
login_api.php57890644editdlrm
noteconfirm.php82080644editdlrm
off.php28540644editdlrm
passwordResetLink.php51900644editdlrm
pay_file.php73020644editdlrm
pay_file_back.php53260644editdlrm
placehold.html21410644editdlrm
post.php25350644editdlrm
reset_email.php17750644editdlrm
reset_phone.php57170644editdlrm
test_222.php8450644editdlrm
update_api.php59100644editdlrm
update_api_on_mail.php47230644editdlrm
validatecode.php10940644editdlrm
validatephone.php10550644editdlrm
Edit: /home/desid573/public_html/app/get_ETA.php (6332B)
error); } $row = mysqli_fetch_assoc($result); $drivername = $row['name']; if($items['points']['items'][0]['reported'] >= $time && $drivername != "") { $dist = distance($lat, $lon, $items['points']['items'][0]['location']["lat"], $items['points']['items'][0]['location']["lon"], "K"); //echo $dist; $x = count($checkdist); if($dist < $checkdist[$x-1]) { array_push($checkdist, $dist); sort($checkdist); if(count($checkdist) > 5) { unset($coords["$checkdist[6]"]); unset($checkdist[6]); } if($items['points']['items'][0]["heading"] != null) { $heading = $items['points']['items'][0]["heading"]; } else { $heading = 0; } $coords["$dist"] = [$items['points']['items'][0]['location']["lat"], $items['points']['items'][0]['location']["lon"], $heading] ; } } } if(count($checkdist) == 1) { $Res["message"] = "No Drivers Found"; $Res["status"] = "error"; } else { if (($key = array_search(10000000, $checkdist)) !== false) { unset($checkdist[$key]); } //$array = array_filter($json['items'], function($v) use ($time) { // // return $v['points']['items'][0]['reported'] >= $time; }); //$array = reset($array); //echo "
lat: ".$coords["$checkdist[0]"][0]; $url = "https://maps.googleapis.com/maps/api/distancematrix/json?origins=$lat,$lon&destinations=".$coords["$checkdist[0]"][0].",".$coords["$checkdist[0]"][1]."&mode=driving&sensor=false&key=AIzaSyCCoesQpJz8mjizSKIng1cmBrx-T9VgXmw"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_PROXYPORT, 3128); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); $response = curl_exec($ch); curl_close($ch); $response_a = json_decode($response, true); $dist = $response_a['rows'][0]['elements'][0]['distance']['text']; $timeClose = ceil(($response_a['rows'][0]['elements'][0]['duration']['value'])/60)." mins"; $x = count($checkdist) - 1; $url = "https://maps.googleapis.com/maps/api/distancematrix/json?origins=$lat,$lon&destinations=".$coords["$checkdist[$x]"][0].",".$coords["$checkdist[$x]"][1]."&mode=driving&sensor=false&key=AIzaSyCCoesQpJz8mjizSKIng1cmBrx-T9VgXmw"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_PROXYPORT, 3128); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); $response = curl_exec($ch); curl_close($ch); $response_a = json_decode($response, true); $dist = $response_a['rows'][0]['elements'][0]['distance']['text']; $timeFar = ceil(($response_a['rows'][0]['elements'][0]['duration']['value'])/60)." mins"; $Res["message"] = "Drivers Found"; $Res["status"] = "OK"; $Res["timeClose"] = $timeClose; $Res["timeFar"] = $timeFar; if($coords["$checkdist[0]"][0] == null) { $Res["car1lat"] = 0; $Res["car1lon"] = 0; $Res["car1rot"] = 0; } else { $Res["car1lat"] = $coords["$checkdist[0]"][0]; $Res["car1lon"] = $coords["$checkdist[0]"][1]; $Res["car1rot"] = $coords["$checkdist[0]"][2]; } if($coords["$checkdist[1]"][0] == null) { $Res["car2lat"] = 0; $Res["car2lon"] = 0; $Res["car2rot"] = 0; } else { $Res["car2lat"] = $coords["$checkdist[1]"][0]; $Res["car2lon"] = $coords["$checkdist[1]"][1]; $Res["car2rot"] = $coords["$checkdist[1]"][2]; } if($coords["$checkdist[2]"][0] == null) { $Res["car3lat"] = 0; $Res["car3lon"] = 0; $Res["car3rot"] = 0; } else { $Res["car3lat"] = $coords["$checkdist[2]"][0]; $Res["car3lon"] = $coords["$checkdist[2]"][1]; $Res["car3rot"] = $coords["$checkdist[2]"][2]; } if($coords["$checkdist[3]"][0] == null) { $Res["car4lat"] = 0; $Res["car4lon"] = 0; $Res["car4rot"] = 0; } else { $Res["car4lat"] = $coords["$checkdist[3]"][0]; $Res["car4lon"] = $coords["$checkdist[3]"][1]; $Res["car4rot"] = $coords["$checkdist[3]"][2]; } if($coords["$checkdist[4]"][0] == null) { $Res["car5lat"] = 0; $Res["car5lon"] = 0; $Res["car5rot"] = 0; } else { $Res["car5lat"] = $coords["$checkdist[4]"][0]; $Res["car5lon"] = $coords["$checkdist[4]"][1]; $Res["car5rot"] = $coords["$checkdist[4]"][2]; } if($coords["$checkdist[5]"][0] == null) { $Res["car6lat"] = 0; $Res["car6lon"] = 0; $Res["car6rot"] = 0; } else { $Res["car6lat"] = $coords["$checkdist[5]"][0]; $Res["car6lon"] = $coords["$checkdist[5]"][1]; $Res["car6rot"] = $coords["$checkdist[5]"][2]; } } echo json_encode(new ArrayObject($Res)); ?>