Skip to content

Instantly share code, notes, and snippets.

View SheriSmith's full-sized avatar

Sheri Smith SheriSmith

View GitHub Profile
<?php
$source = file_get_contents('http://data.alexa.com/data?cli=10&dat=snbamz&url=yourdomain.com');
//Alexa Rank
preg_match('/\<popularity url\="(.*?)" text\="([0-9]+)" source\="panel"\/\>/si', $source, $matches);
$aresult = ($matches[2]) ? $matches[2] : 0;
//Alexa Sites Linking in
preg_match('/\<linksin num\="([0-9]+)"\/\>/si', $source, $asli);
$alinksin = ($asli[1]) ? $asli[1] : 0;
//$confirmation = $this->getConfirmation();
if (isset($_REQUEST['confirmation'])) {
$confirmation = $_REQUEST['confirmation'];
}
else {
$confirmation = $this->getPasswordConfirmation();
}