Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of chema garrido  >  SEO Report  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example usage
Class: SEO Report
Get site SEO statistics from multiple sites
Author: By
Last change:
Date: 2012-08-19 03:07
Size: 1,074 bytes
 

Contents

Class file image Download
<?
include 'seoreport.php';

ini_set('max_execution_time'180);
 

    
$url = (isset($_GET['url']))?$_GET['url']:'http://phpclasses.org';

    
$meta_tags seoreport::meta_info($url);
            
//die(var_dump($meta_tags));

            
    //first check if site online
    
if ($meta_tags!==FALSE)
    {
        
$stats = array();
    
        
$stats['meta']                  = $meta_tags;
        
$stats['alexa']['rank']         = seoreport::alexa_rank($url);
        
$stats['alexa']['links']         = seoreport::alexa_links($url);

        
$stats['domain']['WOT_rating']     = seoreport::WOT_rating($url);    
        
$stats['domain']['domain_age']     = seoreport::domain_age($url);    
        
$stats['social']['twitter']     = seoreport::tweet_count($url);    
        
$stats['social']['facebook']     = seoreport::facebook_shares($url);    
        
$stats['google']['page_rank']     = seoreport::page_rank($url);
        
$stats['google']['page_speed']     = seoreport::page_speed($url);
        
$stats['google']['pages']         = seoreport::google_pages($url);
        
$stats['google']['links']         = seoreport::google_links($url);

        
var_dump($stats);

    }
    else 
'Site not online. '.$url;