Skip to content

Commit

Permalink
renamed to salah.com, removed yahoo webservice.
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedre committed Nov 24, 2011
1 parent 3399fe8 commit f880506
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 24 deletions.
Binary file added imgs/salah.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 2 additions & 19 deletions prayertimes.inc
Expand Up @@ -20,24 +20,7 @@ class PrayerTimes {
}

public static function getLocations($q){
$url = "http://local.yahooapis.com/MapsService/V1/geocode" .
"?appid=" . YAHOO_APPID . "&location=";
$q = urlencode($_GET['q']);
$format = isset($_GET['rss'])? 1 : 0;

$url = $url . $q . "&output=php";
if (strlen($q) == 0) return;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$res = curl_exec($ch);
$info = curl_getinfo($ch);
$ret = $info['http_code'];
curl_close($ch);

if ($ret == 403)
return PrayerTimes::getLocationsFromGoogle($q);
else return unserialize($res);
return PrayerTimes::getLocationsFromGoogle($q);
}

public static function getLocationsFromGoogle($q){
Expand Down Expand Up @@ -123,7 +106,7 @@ class PrayerTimes {
$ret = PrayerTimes::getTimezoneInfoFromCache($geohash);
if ($ret != null) return $ret;

$url = "http://ws.geonames.org/timezoneJSON?lat=$lat&lng=$long";
$url = "http://ws.geonames.net/timezoneJSON?lat=$lat&lng=$long";

$url .= "&username=" . USERNAME;
$ch = curl_init();
Expand Down
4 changes: 2 additions & 2 deletions views/header.inc
Expand Up @@ -8,7 +8,7 @@
<meta name="Distribution" content="Global">
<meta name="Rating" content="General">
<link rel="stylesheet" type="text/css" href="style.css">
<title>Waqt.org - Muslim Prayer Times</title>
<title>Salah.com - Muslim Prayer Times</title>
</head>

<body>
Expand All @@ -17,4 +17,4 @@
<div style="height:1px; background-color:#ef9a10">&nbsp;</div>
<?php include 'views/nav.inc'; ?>
<div id="main">
<div style="padding-top:10px;padding-bottom:40px"><a id="logo" href="/"><img src="imgs/waqt.jpg" border="0" ></a></div>
<div style="padding-top:10px;padding-bottom:40px"><a id="logo" href="/"><img src="imgs/salah.jpg" border="0" ></a></div>
6 changes: 3 additions & 3 deletions views/salatrss.inc
Expand Up @@ -8,8 +8,8 @@
<rss version="2.0">
<channel>
<title>PrayerTimes for $location</title>
<link>http://waqt.org</link>
<description>provided by waqt.org</description>
<link>http://salah.com</link>
<description>provided by salah.com</description>
RSSHEADER;

Expand All @@ -21,7 +21,7 @@ RSSHEADER;
<item>
<title>$val</title>
<description>$time</description>
<link>http://waqt.org?$param&amp;time=$i</link>
<link>http://salah.com?$param&amp;time=$i</link>
</item>
RSSDATA;
Expand Down

0 comments on commit f880506

Please sign in to comment.