Вход Регистрация
Файл: system/classes/Seo.php
Строк: 127
<?



class Seo {

public 
$Gorequest   "http://ajax.googleapis.com/ajax/services/search/web?v=1.0&key=ABQIAAAAQsyJlHF7zz9LVvcJd4ZPGhQZ3u_AO1Uwtt9AExGkl2DbkaY66BSJAucV_lcjAbYvdReMHB2tRnqOVQ";

public 
$GoBrequest "http://ajax.googleapis.com/ajax/services/search/blogs?v=1.0&key=ABQIAAAAQsyJlHF7zz9LVvcJd4ZPGhQZ3u_AO1Uwtt9AExGkl2DbkaY66BSJAucV_lcjAbYvdReMHB2tRnqOVQ";

public 
$Yarequest "http://xmlsearch.yandex.ru/xmlsearch?user=Rainexxx&key=03.103870741:8605b7d7a5ef6e8a91e3b793a64eb25f";

 

 

 

 
/* Google Index : FILTERS : duplicate, porn, ru */

       
public function google_index($site_url){

        
$data json_decode(file_get_contents($this->Gorequest.'&lr=ru&filter=1&safe=active&q=site:'.urlencode($site_url)));

        return 
"&nbsp;".intval($data->responseData->cursor->estimatedResultCount);

       }

 

/* Google Links : FILTERS : duplicate, porn, ru*/

     
public function google_links($site_url){

          
$data json_decode(file_get_contents($this->Gorequest.'&lr=ru&filter=1&safe=active&hl=ru&q=link:'.urlencode($site_url)));

          return 
"&nbsp;".intval($data->responseData->cursor->estimatedResultCount);

     }

 

/* Google blogs : FILTERS : default */

       
public function google_blogs($site_url){

          
$data json_decode(file_get_contents($this->GoBrequest.'&q=link:'.urlencode($site_url)));

          return 
"&nbsp;".intval($data->responseData->cursor->estimatedResultCount);

       }

 

 

     
/* INDEXED PAGES */

 
public function Yandex_Index($site_url){

 
$requestFormat = <<<DOC
<?xml version='1.0' encoding='utf-8'?>
 <request><query>host:"
$site_url"</query></request>
DOC;
 
    
$context stream_context_create(array(
            
'http' => array(
            
'method'=>"POST",
            
'header'=>"Content-type: application/xmlrn" "Content-length: ".strlen($requestFormat),
            
'content'=>$requestFormat
        
)
    ));
 
    
$response file_get_contents($this->Yarequesttrue$context);

    if (
$response) {

        
$xmldoc = new SimpleXMLElement($response);

        
$error $xmldoc->response->error;

        
$inIndex $xmldoc->response->found;

 

        if (
$error) { return "0";                  // have problem

        
} else { return $inIndex; }                                          // yes we catch something

        
} else { return "err."; }                                                           // have unknown problem

}

 

 

 
/* INCOMING LIKS */

 
public function Yandex_Links($site_url){

 

$requestFormat = <<<DOC
<?xml version='1.0' encoding='utf-8'?>
<request><query>"http://
$site_url"</query></request>
DOC;
 
    
$context stream_context_create(array(
            
'http' => array(
            
'method'=>"POST",
            
'header'=>"Content-type: application/xmlrn" "Content-length: ".strlen($requestFormat),
            
'content'=>$requestFormat
        
)
    ));
 
    
$response file_get_contents($this->Yarequesttrue$context);

    if (
$response) {

        
$xmldoc = new SimpleXMLElement($response);

        
$error $xmldoc->response->error;

        
$inLinks $xmldoc->response->found;

 

        if (
$error) { return "0";                 // have problem with description

        
} else { return "&nbsp;".$inLinks; }            // yes we catch something

        
} else { return "err."; }                             // have problem

}

 

}
Онлайн: 0
Реклама