Community Forums 

Main Content

Re:Link Verification for dummies

    Dec 14 2012 17:13:48

    #1

    anon

    Join date : 2008-09-18      Posts : 488

    Create a php function to calculate a hash:
    function calc_hash($product, $price, $units) {
    $secret_key = "XXXXXXXXXXXXXXXXXXXXXX";
    $hash = md5($secret_key . substr(addslashes($product), 0, 10) . $price . $units);
    return $hash;
    }

    Then have code that adds the hash to your Mal's form:
    $hash = calc_hash($product, $price, $units);
    echo("<input type='hidden' name='hash' value='$hash' />\r");