Receiving and verifying the cookie
<?php
list($c_id,$c_hash) = explode('-',$_COOKIE['id']);
if (
md5($secret_word.$c_id) == $c_hash) {
    
$id $c_id;
} else {
    die(
'Invalid cookie.');
}
?>