Code:
<?php
/*
Developer -> Vick
Date ->
Version ->
support ->
http://eliteadminz.net/viewtopic.php?f=31&t=14
*/
error_reporting(0);
$url = $_GET['url'];
// get page rank
// 1. initialize
$ch = curl_init();
// 2. set the options, including the url
curl_setopt($ch, CURLOPT_URL, "https://tools.digitalpoint.com/pagerank?url=$url");
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
// 3. execute and fetch the resulting HTML output
$output = curl_exec($ch);
// 4. free up the curl handle
curl_close($ch);
preg_match('/<dd style="font-weight:bold">(.*)<\/dd>/i', $output, $title);
$pagerank = $title[1];
// $pagerank = page rank
// get alexa rank
$ch = curl_init();
// 2. set the options, including the url
curl_setopt($ch, CURLOPT_URL, "http://data.alexa.com/data?cli=10&dat=snbamz&url=$url");
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
// 3. execute and fetch the resulting HTML output
$output = curl_exec($ch);
// 4. free up the curl handle
curl_close($ch);
preg_match('/<REACH RANK="(.*)"/i', $output, $atid);
$alexarank = $atid[1];
//echo $alexarank;
echo "URL=> $url, PAGERANK=> $pagerank, ALEXA TRAFFIC REACH=> $alexarank";
This is a simple script I wrote a few day's back using PHP, and CURL to grab a websites page rank, and alexa traffic reach. If you save the file as 'index.php', an example usage would be 'index.php?url=your********'.
Last edited: