Commit c1b1c78e authored by David Morley's avatar David Morley

yet another api for geo, ug they all suck

parent 449b2c2d
......@@ -44,7 +44,7 @@ echo "pingdom report already exists";die;
//curl the header of pod with and without https
$chss = curl_init();
curl_setopt($chss, CURLOPT_URL, "https://".$_POST['domain']);
curl_setopt($chss, CURLOPT_URL, "https://".$_POST['domain']."/users/sign_in");
curl_setopt($chss, CURLOPT_POST, 1);
curl_setopt($chss, CURLOPT_HEADER, 1);
curl_setopt($chss, CURLOPT_CONNECTTIMEOUT, 5);
......@@ -54,7 +54,7 @@ echo "pingdom report already exists";die;
curl_close($chss);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://".$_POST['domain']);
curl_setopt($ch, CURLOPT_URL, "http://".$_POST['domain']."/users/sign_in");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
......@@ -88,7 +88,7 @@ if ($valid=="1") {
$headers = "From: ".$_POST["email"]."\r\nReply-To: ".$_POST["email"]."\r\n";
@mail( $to, $subject, $message, $headers );
echo "Data successfully inserted! Your pod will be reviewed and live on the list soon!";
echo "Data successfully inserted! Your pod will be reviewed and live on the list soon! You will get a support ticket, no need to do anything if your pod is listed in the next few hours.";
pg_free_result($result);
......
......@@ -147,7 +147,8 @@ $ipv6="yes";
}
//curl ip
$hostip = curl_init();
curl_setopt($hostip, CURLOPT_URL, "http://api.infochimps.com/web/analytics/ip_mapping/digital_element/geo?apikey=".$chimpkey."&ip=".$ipnum);
#curl_setopt($hostip, CURLOPT_URL, "http://freegeoip.net/json/".$ipnum);
curl_setopt($hostip, CURLOPT_URL, "http://api.ip2locationapi.com/v2/?user=".$geouser."&format=json&key=".$geokey."&ip=".$ipnum);
curl_setopt($hostip, CURLOPT_POST, 0);
curl_setopt($hostip, CURLOPT_HEADER, 0);
curl_setopt($hostip, CURLOPT_RETURNTRANSFER, 1);
......@@ -159,17 +160,17 @@ $ipv6="yes";
curl_close($hostip);
$obj = json_decode($ipraw);
$ipdata = "Country: ".$obj->{'country'}."\n";
$ipdata = "Country: ".$obj->{'countryName'}."\n";
$whois = "Country: ".$obj->{'country'}." City: ".$obj->{'city'}."\n Postal Code:".$obj->{'postal_code'}." Lat:".$obj->{'latitude'}." Long:".$obj->{'longitude'}." Connection:".$obj->{'conn_speed'};
$whois = "Country: ".$obj->{'countryName'}." Region: ".$obj->{'regionName'}." City: ".$obj->{'cityName'}."\n Postal Code:".$obj->{'zipcode'}." Lat:".$obj->{'cityLattitude'}." Long:".$obj->{'cityLongitude'};
$country=$obj->{'country'};
$city=$obj->{'city'};
$state=$obj->{'region'};
$postalcode=$obj->{'postal_code'};
$lat=$obj->{'latitude'};
$long=$obj->{'longitude'};
$connection=$obj->{'conn_speed'};
$country=$obj->{'countryName'};
$city=$obj->{'cityName'};
$state=$obj->{'regionName'};
//$postalcode=$obj->{'zipcode'};
$lat=$obj->{'cityLattitude'};
$long=$obj->{'cityLongitude'};
$connection="";
//curl the pingdom page
$ping = curl_init();
......
......@@ -98,7 +98,7 @@ s1.parentNode.insertBefore(s, s1);
</form>
<br>Is your pod missing? If the server can not get a diaspora session its on the hidden list <a href="http://podupti.me/?hidden=true">Show</a>. This
is mostly because of selfsigned or openca certs, if you need a free ssl cert get one from startssl.com.
<br>Need help? <a href="http://frodointernet.com/support">Support</a>
<br>Need help? <a href="https://diasporg.zendesk.com">Support</a>
<br>
</div>
<script type="text/javascript">
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment