- md5: documentation ( source)
<?php
function tao_sig($postdata){
global $secretkey;
$textsig = "";
foreach($postdata as $key => $value){
$textsig .= "$key=$value";
}
$textsig .= $secretkey;
$textsig = md5($textsig);
return $textsig;
}
$postdata = array(
"api_key" => $api_key,
"email" => $user,
"format" => "JSON",
"locale" => "vi_vn",
"method" => "auth.login",
"password" => $pass,
"return_ssl_resources" => "0",
"v" => "1.0"
);
echo $textsig;