define("FLICKR_KEY", "GETYOUROWNKEY"); // GET YOUR OWN KEY include 'PrayTime.php'; error_reporting(0); $lat = $_GET['lat']; $long = $_GET['long']; $units = $_GET['units']; $tzone = $_GET['tzone']; if ($lat == '' || $long == '' || $units == '') { $lat = "50.72471"; $long = "-3.50782"; $units = "c"; $tzone = 5; } $prayTime = new PrayTime(); $prayTime->setCalcMethod($prayTime->Karachi); $prayTime->setAsrMethod($prayTime->Hanafi); $times = $prayTime->getPrayerTimes(time(), $lat, $long, $tzone); $fajr = (int) str_replace(':', '', $times[0]); $sunrise = (int) str_replace(':', '', $times[1]); $dhuhur = (int) str_replace(':', '', $times[2]); $asr = (int) str_replace(':', '', $times[3]); $sunset = (int) str_replace(':', '', $times[4]); $maghrib = (int) str_replace(':', '', $times[5]); $isha = (int) str_replace(':', '', $times[6]); $prayers = $times; $flickrResponse = get_data('https://api.flickr.com/services/rest/?method=flickr.places.findByLatLon&format=json&api_key=' . FLICKR_KEY . '&lat=' . $lat . '&lon=' . $long); $flickrResponse = json_decode(substr($flickrResponse, 14, strlen($flickrResponse) - 15), true); $woeid = $flickrResponse['places']['place'][0]['woeid']; $woename = $flickrResponse['places']['place'][0]['woe_name']; if ($woeid) {