- http_build_query: documentation ( source)
- md5: documentation ( source)
<?php
$path='items/641863057';
$key='XcyLEIoAuUgGSJUDFAs4xWTnV2TKEmvZTZuTtPFr';
$secret='LLI1/E9&zfG-wwKTRd[XGFOAH~u.pnEJ{q(=oyAG';
//$deviceId='d6040f57b3ba61d2';
$payload=array();
//$payload['deviceId']=$deviceId;
//$payload['session']='3be05bdbec8c3ba50d31e175b5dd3cec.1467179011';
$payload=http_build_query($payload);
$sum=md5(md5($secret).md5($path).md5(''));
echo 'https://www.avito.ru/api/6'.$path.'?checksum='.$sum.'&'.$payload.'&key='.$key;
//echo 'Checksum for '.$itemId.' is '.$sum;
?>