Ticket #1234 (closed defect: fixed)

Opened 1 year ago

Last modified 1 month ago

GooglePageRank problem

Reported by: ebrahimi@zehneziba.ir Assigned to: jaws-bugs@lists.jaws-project.com
Priority: normal Milestone: 0.9.0
Component: Gadgets / Launcher Version: 0.8.9
Severity: normal Keywords:
Cc:

Description

GooglePageRank? script not work perfectly.
In many host disable URL open access.in other word below code not work :

 $rdata = @file($file);

I use pear for open url, see below code :

	function open_url($URL)
	{
        require_once 'HTTP/Request.php';
        $httpRequest = new HTTP_Request();
        $httpRequest->setMethod(HTTP_REQUEST_METHOD_GET);
		$httpRequest->setURL($URL);
		$resRequest  = $httpRequest->sendRequest();

		if (PEAR::isError($resRequest) || (int) $httpRequest->getResponseCode() <> 200) {
			return false;
		}
		return ($httpRequest->getResponseBody());
	
	}

Also I replace below code :

        if (!empty($rdata)) {
            $rankarray = explode(':', $rdata[0]);
            $rank = end($rankarray);
        }

with :

        $pos = strpos($rdata, "Rank_");
         if($pos === false){
         }else{
           $rank = substr($rdata, $pos + 9);
         }
}}}[[BR]]
Now GooglePageRank is usable ;)
[[BR]]
Thanks.

Attachments

Change History

07/30/10 07:24:57 changed by afz

  • status changed from new to closed.
  • resolution set to fixed.

Fixed, and will be available through 0.8.14


Add/Change #1234 (GooglePageRank problem)




Change Properties
Action