Ticket #1233 (new defect)

Opened 9 months 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? not work perfectly.
In many host usually, 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 your 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 ;)


Attachments


Add/Change #1233 (GooglePageRank problem)




Change Properties
Action