"; $valid=1; } if (stristr($output, 'Set-Cookie: _diaspora_session=')) { echo "Your pod does not have ssl but is a valid pod
"; $valid=1; } if ($valid=="1") { $sql = "INSERT INTO pods (domain, pingdomurl, email) VALUES($1, $2, $3)"; $result = pg_query_params($dbh, $sql, array($_POST['domain'], $_POST['url'], $_POST['email'])); if (!$result) { die("Error in SQL query: " . pg_last_error()); } $to = $adminemail; $cc = $_POST["email"]; $subject = "New pod added to podupti.me "; $message.= "http://podupti.me\n\n Stats Url: http://api.uptimerobot.com/getMonitors?format=json&customUptimeRatio=7-30-60-90&apiKey=" . $_POST["url"] . "\n\n Pod: http://podupti.me/db/pull.php?debug=1&domain=" . $_POST["domain"] . "\n\n"; $message.= "Your pod will not show right away, needs to pass a few checks, Give it a few hours!"; $headers = "From: ".$_POST["email"]."\r\nReply-To: ".$_POST["email"]."\r\nCc: " . $_POST["email"] . "\r\n"; @mail( $to, $subject, $message, $headers ); echo "Data successfully inserted! Your pod will be reviewed and live on the list in a few hours!"; pg_free_result($result); pg_close($dbh); } else { echo "Could not validate your pod on http or https, check your setup!"; } ?>