Locale Page...  Global  |  Germany  |  UK  |  USA
Your privat CyberGadget - The finest Resources for Web-Designer, Web-Master and Web-Developer!
Quick Search
Advertisement
Partner & Friends
Developersdex
Tutorial Guide
Send News    Add URL / Entry    Tag it:digg it!Stumble It!YahooMyWeb!del.icio.us!Simpify!reddit!Netvouz!Ma.gnolia!FurlIt!Blogmarks!BlinkList!
PHP: Manual
PHP Manual by the PHP Documentation Group php.net

crc32

(PHP 4 >= 4.0.1, PHP 5)

crc32 -- Calculates the crc32 polynomial of a string

Description

int crc32 ( string str)

Generates the cyclic redundancy checksum polynomial of 32-bit lengths of the str. This is usually used to validate the integrity of data being transmitted.

Because PHP's integer type is signed, and many crc32 checksums will result in negative integers, you need to use the "%u" formatter of sprintf() or printf() to get the string representation of the unsigned crc32 checksum.

This second example shows how to print a converted checksum with the printf() function:

Example 1. Displaying a crc32 checksum

<?php
$checksum
= crc32("The quick brown fox jumped over the lazy dog.");
printf("%u\n", $checksum);
?>

See also md5() and sha1().


© 2001 - 2009 CYGAD.NET | All rights reserved. | Terms of Service | About | Time data: GMT +1! | Portal Release X2.6.1 Beta | RunTime: 0.444
Optimized for Internet Explorer Internet Explorer 6.0+, Firefox Firefox 1.5+!