public function seo_rank_result() { $url_search = trim($this->input->post('url_search')); $main_url = get_main_domain($url_search); $a_rank = get_alexa_ranking($url_search); $index_url = get_index_url($url_search); $index_pr = get_pr($index_url); $page_pr = get_pr($url_search); $reach_rate = get_change_percent($url_search); $data = array('rank' => $a_rank, 'index_pr' => $index_pr, 'page_pr' => $page_pr, 'index_url' => $main_url, 'page_url' => $url_search, 'rank_url' => $main_url, 'reach_rate' => $reach_rate); $this->load->view("seo/seo_rank_search_result", $data); }
<?php /** * AIFS OSINT Google Page Rank File * @digitaloversight * Shouts * Isusx's Programming Corner * http://isusx.com/programming */ include '../common/sql/Sql.php'; include '../common/sql/SqlStatement.php'; $dbh = new SQL_Class("aifs"); $sql = $dbh->execute("select url, u.id \r\n\t\t\t\t\t\tfrom osint_url u\r\n\t\t\t\t\t\twhere u.id not in (select fk_url_id from dnint_pagerank\r\n\t\t\t\t\t\twhere fetch_date > date_add(now(), INTERVAL -1 month))\r\n\t\t\t\t\t\torder by rand()\r\n\t\t\t\t\t\tlimit 1"); while ($row = $sql->fetch_assoc()) { $rank = get_pr($row['url']); if ($rank) { $dbh->execute("insert into dnint_pagerank set fk_url_id = " . $row['id'] . ", rank = " . $rank . ""); } else { $dbh->execute("insert into dnint_pagerank set fk_url_id = " . $row['id']); } } //convert a string to a 32-bit integer function str_to_num($str, $check, $magic) { $int32_unit = 4294967296; // 2^32 $length = strlen($str); for ($i = 0; $i < $length; $i++) { $check *= $magic; // If the float is beyond the boundaries of integer // (usually +/- 2.15e+9 = 2^31),
$result = $result >> 23 & 0x1ff | $result << 9; } return sprintf("8%x", $result); } function get_pr($url) { $PR_CH = app_hash_url($url); $url = 'http://toolbarqueries.google.com/tbr?client=navclient-auto&features=Rank&q=info:' . $url . '&ch=' . $PR_CH; $prtext = file_get_contents($url); if ($prtext != "") { $pr = explode(":", $prtext); return $pr[2]; } else { return 0; } } $query = mysql_query("select pr from sqlmap where `key`='{$_GET['key']}' or url like '%{$_GET['host']}%'"); $pr = mysql_fetch_array($query); if ($pr[0] !== '-2') { echo "callback({$pr[0]});"; exit; } $pr = get_pr($_GET['host']); $pr = str_replace("\n", '', $pr); $pr = str_replace("\r", '', $pr); if ($pr == '') { $pr = '-1'; } echo "callback({$pr});"; mysql_query("update sqlmap set pr='{$pr}' where `key`='{$_GET['key']}'"); #echo "update sqlmap set pr='{$pr}' where `key`='{$_GET['key']}'";
public function verify_resource_pr_alexa() { $resources = $this->seo_model->fetch_all_resource_data(); //print_r($resources); $current_time = mktime(); $seven_day_time = 60 * 60 * 24 * 7; foreach ($resources as $resource) { echo $url = $resource->url; echo "<br>"; echo $current_pr = get_pr($url); echo "<br>"; //$root_pr = get_pr($url); //if ($root_pr !== '') //{ // $data['root_pr'] = $root_pr; //} //$data['current_pr'] = $current_pr; echo $data['alexa_rank'] = get_alexa_ranking($url); echo "<br>"; //$reach_rate = get_change_percent($url); //print_r($reach_rate); echo "<br>"; //echo $rank = get_alexa_ranking($url); echo "<br>"; /* $counter = count($reach_rate); $data['alexa_change_3_monthes'] = $reach_rate[0]; $data['alexa_change_1_month'] = $reach_rate[1]; if($counter=="3") { $data['alexa_change_7_days'] = $reach_rate[2]; } else { $data['alexa_change_7_days']= "0"; } $data['robot_updated'] = mktime(); $robot_updated = $resource->robot_updated; $robot_up_time = strtotime($robot_updated); * */ //if(($robot_up_time+$seven_day_time)<$current_time) //{ //$this->seo_model->update_resource_data($data); //} } //of --foreach //$this->load->view('seo/seo_show_data',$data); }