Commit 024af999 authored by dmorley's avatar dmorley
Browse files

switch to uptimerobot, pindom killed off free

parent ebdc3eeb
......@@ -15,11 +15,11 @@ if (!$_POST['domain']){
if (!$_POST['url']){
echo "no pingdom url for your stats";
echo "no API key for your stats";
if (substr_count($_POST['url'], '/') != 4){
echo "pingdom url bad, needs to look like";
if (strlen($_POST['url']) < 14){
echo "API key bad needs to be like m58978-80abdb799f6ccf15e3e3787ee";
......@@ -37,7 +37,7 @@ if ($row["domain"] == $_POST['domain']) {
echo "domain already exists";die;
if ($row["pingdomurl"] == $_POST['url']) {
echo "pingdom report already exists";die;
echo "API key already exists";die;
......@@ -102,6 +102,7 @@ unset($adminratingavg);
curl_setopt($ch, CURLOPT_NOBODY, 1);
$output = curl_exec($ch);
if ($debug) {print $output;}
if ($debug) {print $outputssl;}
if (stristr($outputssl, '_diaspora_session')) {
//parse header data
......@@ -164,14 +165,15 @@ if ($secure == "true") {$sorno = "s";} else {$sorno- "";}
curl_setopt($chksup, CURLOPT_NOBODY, 1);
$outputchksup = curl_exec($chksup);
if ($debug) {print $outputchksup;}
$signupon = isset($xsignupon[1])?trim($xsignupon[1]):null;
$signupon = substr($signupon, 0, 3);
if ($signupon == "200") {$signup = 1;} else {$signup = 0;}
if ($debug) {echo "Signup Open: ".$signup."<br>";}
if ($debug) {echo "<br>Signup Open: ".$signup."<br>";}
if ($debug) {echo "SSL: ".$secure."<br>";}
if ($debug) {echo "<br>SSL: ".$secure."<br>";}
//if (!$gitdate) {
//if a pod is not displaying the git header data its really really really old lets lower your score
......@@ -236,7 +238,7 @@ if (strpos($row[$i]['pingdomurl'], "")) {
$pingdom = curl_exec($ping);
$info = curl_getinfo($ping);
if ($debug) {echo "Pingdom code: ".$info['http_code']."<br>";}
if ($debug) {echo "<br>Pingdom code: ".$info['http_code']."<br>";}
if ($info['http_code'] == 200) {
//response time
......@@ -249,7 +251,7 @@ preg_match_all('/"historySelect">\s*(.*?)\s*<\/select/is',$pingdom,$matchhistory
$implodemonths = implode(" ", $matchhistory[1]);
$months = isset($matchdates[0])?count($matchdates[0]):0;
echo $matchdates[0];
//echo $matchdates[0];
//uptime %
preg_match_all('/<h3>Uptime this month<\/h3>\s*<p class="large">(.*?)%</',$pingdom,$matchper);
$uptime = isset($matchper[1][0])?preg_replace("/,/", ".", $matchper[1][0]):0;
......@@ -302,11 +304,10 @@ domain=$29";
die("Error in SQL query3: " . pg_last_error());
if ($debug) {echo "Score out of 20: ".$score."<br>";}
if ($debug) {echo "<br>Score out of 20: ".$score."<br>";}
if (!$debug) {echo "Success";}
//end foreach
......@@ -6,7 +6,7 @@ else
echo "Checking for internet";
$WGET -d --tries=10 --timeout=15 -O /tmp/
$WGET -q --tries=10 --timeout=15 -O /tmp/
# &> /dev/null
sleep 2
......@@ -17,8 +17,8 @@ exit;
echo "Pulling in new pod data";
cd /var/www/podup/db
php5 pull.php
php5 pull.php debug=1
php5 backup.php
rm /tmp/
......@@ -96,12 +96,10 @@ s1.parentNode.insertBefore(s, s1);
<div id="howto" style="display:none; margin-left:50px">
Want your pod listed?<br>
Its easy start monitoring on your pod with a free <a href="" target="new"></a> account.<br>
<br>Make a public report public and then enter your URL below (note its the one you view after you goto it)<br><br>
Pingdom shows me when I click it to goes to
<br> So URL should look very close to this:<br>
Its easy start monitoring on your pod with a free <a href="" target="new">Uptime Robot</a> account.<br>
Create a monitor for your pod, then in "My Settings" create a monitor-specific API key and paste below.<br>
<br><form action="db/add.php" method="post">
Stats URL:<input type="text" name="url" class="xlarge span8" placeholder=""><br>
Monitor API Key:<input type="text" name="url" class="xlarge span8" placeholder="m58978-80abdb799f6ccf15e3e4ttwe"><br>
Pod domainname:<input type="text" name="domain" class="xlarge span4" placeholder=""><br>
Your Email:<input type="text" name="email" class="xlarge span4" placeholder=""><br>
<input type="submit" value="submit">
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