Jump to content

url hashing?


linkoovi

Recommended Posts

Hi to ya all,

I read the [Prentice Hall] PHP5 Power Programming and i realy didnt understand the topic about url hashing, I tested the code from the book:
[code]
function create_parameters($array){
$data = '';
$ret = array();
foreach($array as $key=> $value){
$data .= $key.$value;
                        $ret[] = "$key=$value";
}
$hush = sha1($data);
$ret[] = $hush;

return join ('&',$ret);
}
echo '<a href="index.php?hush='.create_parameters(array('param' => 'viewmembers', 'page' => 'home')).'">LINK</a>';

[/code]

but i get this:
http://localhost/cript/index.php?param=viewmembers&hash=70b84c04644ce28e540b1fcde91dadae


Link to comment
https://forums.phpfreaks.com/topic/28283-url-hashing/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.