Jump to content
cristian.pana

Utilitati Seo

Recommended Posts

Posted (edited)

Sper sa va fie utile:


function curl( $url ) {
if ( in_array( "curl", get_loaded_extensions() ) ) {
$ch = curl_init() ;
curl_setopt( $ch, CURLOPT_URL, $url ) ;
curl_setopt( $ch, CURLOPT_HEADER, 0 ) ;
curl_setopt( $ch, CURLOPT_FRESH_CONNECT, 1 ) ;
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 ) ;
curl_setopt( $ch, CURLOPT_USERAGENT, $_SERVER["HTTP_USER_AGENT"] ) ;
$result = curl_exec( $ch ) ;
curl_close( $ch ) ;
return $result ;
} else {
$result = file_get_contents( $url ) ;
return $result ;
}
}
##########
function google_cache( $url ) {
$data = curl( "http://webcache.googleusercontent.com/search?q=cache:" . urlencode( $url ) ) ;
preg_match( '#(\d{1,2}\s[a-zA-Z]{3}\s\d{4}\s\d{2}:\d{2}:\d{2}.*?)\.#', $data, $match ) ;
return $match[1] ;
}
###################
function google_indexed( $url ) {
$data = curl( "http://www.google.com/search?q=site:" . urlencode( $url ) ) ;
preg_match( '#About\s([0-9\,]+){1,}\sresult#', $data, $match ) ;
return $match[1] ;
}
###################
function google_backlinks( $url ) {
$data = curl( "http://www.google.com/search?q=link:" . urlencode( $url ) ) ;
preg_match( '#<div id=resultStats>([0-9\,]+){1,}\sresult#', $data, $match ) ;
return $match[1] ;
}
###################
function yahoo_indexed( $url ) {
$data = curl( "http://siteexplorer.search.yahoo.com/search?bwm=i&bwmf=s&p=" . urlencode( $url ) ) ;
preg_match( '#Inlinks\s\(([0-9\,]+){1,}\)<\/span>#', $data, $match ) ;
return $match[1] ;
}
###################
function yahoo_backlinks( $url ) {
$data = curl( "http://siteexplorer.search.yahoo.com/search?bwm=i&p=" . urlencode( $url ) ) ;
preg_match( '#Inlinks\s\(([0-9\,]+){1,}\)<\/span>#', $data, $match ) ;
return $match[1] ;
}
###################
function bing_indexed( $url ) {
$data = curl( "http://www.bing.com/search?q=site:" . urlencode( $url ) ) ;
preg_match( '#of\s([0-9\,]+){1,}\sresult#', $data, $match ) ;
return $match[1] ;
}
###################
function bing_backlinks( $url ) {
$data = curl( "http://www.bing.com/search?q=link:" . urlencode( $url ) ) ;
preg_match( '#of\s([0-9\,]+){1,}\sresult#', $data, $match ) ;
return $match[1] ;
}
###################
function alexa_backlinks( $url ) {
$data = curl( "http://www.alexa.com/search?q=" . urlencode( $url ) ) ;
preg_match( '#href=\"/site/linksin/' . urlencode( $url ) . '\">([0-9\,]+){1,}<\/a>#', $data, $match ) ;
return $match[1] ;
}
###################
function alexa_rank( $url ) {
$data = curl( "http://www.alexa.com/search?q=" . urlencode( $url ) ) ;
preg_match( '#trafficstats\">\s([0-9\,]+){1,}<\/a>#', $data, $match ) ;
return $match[1] ;
}
###################
function compete_rank( $url ) {
$data = curl( "http://siteanalytics.compete.com/" . urlencode( $url ) . "/" ) ;
preg_match( '#<h4>([0-9\,]+){1,}</h4>#', $data, $match ) ;
return $match[1] ;
}
###################
function internet_archive( $url ) {
$data = curl( "http://wayback.archive.org/web/*/" . urlencode( $url ) ) ;
preg_match( '#crawled\s<strong>([0-9\,]+){1,}\stime#', $data, $match ) ;
return $match[1] ;
}
###################
function w3c_validator( $url ) {
$data = curl( "http://validator.w3.org/check?uri=" . urlencode( $url ) ) ;
preg_match( '#valid\">([^\"]*)<\/td>#', $data, $match ) ;
return $match[1] ;
}
###################
function whois_domain( $url ) {
$data = curl( "http://www.who.is/whois/" . urlencode( $url ) ) ;
preg_match( "#accent1\'>Updated:\s([^\"]*)<\/span><br>#", $data, $match ) ;
return $match[1] ;
}

Edited by cristian.pana

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...