Website Checker SEO Script of PHP

Check Website SEO Script of PHP

Complete website SEO checker PHP script code and edit it for your users to analyze website search engine optimization.

You can edit this code according to your desire for function implementation.

<form method="POST" action="<?=$_SERVER["PHP_SELF"];?>">
    <input type="hidden" name="checkPr" value="1">
    <p>Enter URL (one for each line) to check Google PageRank:<br>

if ($_POST["checkPr"] == 1) echo $_POST["urls"];

<input type="checkbox" value="1" name="useCache" <?=$_POST["useCache"]==1? "CHECKED":""?>> Use caching<br>
<input type="checkbox" value="1" name="printDebug" <?=$_POST["printDebug"]==1? "CHECKED":""?>> Print debug<br>
<input type="submit" value="Check PageRanks"></p>

if ($_POST["checkPr"] == 1) {

<table border="0" cellpadding="3" cellspacing="0" id="table1">
        <td><font color="#FF9900"><b>PageRank</b></font></td>
        <td><font color="#FF9900"><b>Exec Time</b></font></td>
        <td><font color="#FF9900"><b>URL</b></font></td>

$url = explode("\n",$_POST["urls"]);
$gpr = new GooglePR();
$gpr->useCache = ($_POST["useCache"]==1)? true:false;
$gpr->userAgent = $_SERVER["HTTP_USER_AGENT"];
for ($i=0;$i<count($url);$i++) {
    if (strlen(trim($url[$i]))>0) {
        $_url = eregi("http://",$url[$i])? $url[$i]:"http://".$url[$i];
        $pr = $gpr->GetPR($_url);

        <td valign="top">
        <div align="center">
        <table border="0" cellspacing="0" id="table2">
                <p align="center"><b><font face="Arial" size="1"><?=$pr?>/10</font></b></td>
                <table border="0" cellpadding="2" cellspacing="0" id="table3" style="border: 1px solid 
#000000" width="50" height="5">
                        <td bgcolor="#008000" width="<?=($pr*5)?>"></td>

			// let's get on
			if (strlen(trim($contents)) == 0)
			if (@function_exists("curl_init")) {

				// allways use curl if available for performance issues
				$ch = curl_init();
				curl_setopt($ch, CURLOPT_URL, "http://".$host.$target."?".$querystring);
				curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
				curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
				curl_setopt($ch, CURLOPT_USERAGENT, $this->userAgent);
				if (!($contents = trim(@curl_exec($ch)))) {
					$this->debugRes("error","curl_exec failed");
				curl_close ($ch);
				$this->debugRes("method", "curl");

			} else {
				$this->debugRes("error","curl not installed, trying to use fsockopen");
				// use fsockopen as secondary method, to submit user agent
				if ($socket  = @fsockopen($host, "80", $errno, $errstr, 30)) {

					$request  = "GET $target?$querystring HTTP/1.0\r\n";
					$request .= "Host: $host\r\n";
					$request .= "User-Agent: ".$this->userAgent."\r\n";
					$request .= "Accept-Language: en-us, en;q=0.50\r\n";
					$request .= "Accept-Charset: ISO-8859-1, utf-8;q=0.66, *;q=0.66\r\n";
					$request .= "Accept: text/xml,application/xml,application/xhtml+xml,";
					$request .= "image/jpeg,image/gif;q=0.2,text/css,*/*;q=0.1\r\n";
					$request .= "Connection: close\r\n";
					$request .= "Cache-Control: max-age=0\r\n\r\n";

					stream_set_timeout ( $socket,10);
					fwrite( $socket, $request );
					$ret = '';
					while (!feof($socket)) {
						$ret .= fread($socket,4096);
					$contents = trim(substr($ret,strpos($ret,"\r\n\r\n") + 4));
					$this->debugRes("method", "fsockopen");
				} else {
					$this->debugRes("error","fsockopen failed, trying file_get_contents");
					// this way could cause problems because the Browser Useragent is not set...
					if ($contents = trim(@file_get_contents("http://".$host.$target."?".$querystring))) {
						$this->debugRes("method", "file_get_contents");
					} else {
						$this->debugRes("error","file_get_contents failed");


What is Website Checker SEO Script of PHP

as of late distributed a post with regards to an SEO test we are running.
With this examination, we are attempting to get that page to rank in Google for some catchphrase look.

We know the keywords need to rank, to screen the outcomes of the investigation
We need to know how high (or low) my page is in Google list items.

How to Check Website SEO

We can physically look for the website SEO tests and We can see that my page is number 1 in the outcomes.

That is simple however imagine a scenario in which I need to check my page rank for website SEO analysis.
we are not on the principal page. Going to page 2 of the list items we can see my page in the first place on that subsequent page.

Scroll to Top