Google PR Query Interface checksum new algorithm 1th/2 page _php Tutorial

Source: Internet
Author: User
Instead, a large section of "in your email, please send us the entire code displayed below" Google terms_of_service error message. It seems that the original interface has failed.

But I installed in the Firefox toolbar extension searchstatus still be able to parse out the PR value of each page visited, find Searchstatus plug-in package to solve the source code, sure enough, is using a different verification code generation algorithm, after the original checksum generation, A second calculation is required, and the correct ch parameter is obtained after two calculations.

So with the ready-made JS code after the transformation of the new PHP version of the Google PageRank query interface method is out. After the local test, who wants to upload to the server after the bloody Terms_of_service error prompt. The calculation process of the checksum is step-by-step, and it is found that the numbers on the local and the server are different after several right displacements. This is only to think that the server is a 64-bit machine, 32-bit system after the displacement should be cut off the bit in there to live well. Adding a Trunkbitforce32bit method, the high-level shielding of all the numeric values after arithmetic operations, is the problem of redundant bits in the 64-bit system. The result is that running in a 32-bit Linux environment is incompatible because PHP automatically attempts to convert int to float when an overflow occurs in arithmetic processing. When a negative overflow occurs, this operation correctly retains precision under windows, but there is a problem with Linux.

The following code:

$a =-4294967295;
echo Dechex ($a). "
\ n ";
if ($a < 0) $a + = 4294967296;
echo Dechex ($a). "
\ n ";

The first echo can correctly output this negative 32-bit complement in windows, whereas on a 32-bit Linux machine, the maximum negative number represented by the int type can be 0x80000000. Only by trickery the large negative number of the overflow plus a large integer outside the integer range to counteract the overflow, the lower 32 bits should be restored.

Using these unconventional means, finally concocted this updated version of the compatible linux32/linux64/windows Google PR value query interface PHP script implementation (including the full code).

http://www.bkjia.com/PHPjc/319839.html www.bkjia.com true http://www.bkjia.com/PHPjc/319839.html techarticle instead, a large section of "in your email, please send us the entire code displayed below" Google terms_of_service error message. It seems that the original interface has expired ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.