diff --git a/NetBiblio.php b/NetBiblio.php index 50cf652..7143dc6 100644 --- a/NetBiblio.php +++ b/NetBiblio.php @@ -338,7 +338,8 @@ class NetBiblio extends WebService $books = array_map(function($b) { if(strlen($this->login) > 0 && isset($b['files']['zip']['uri'])) { $key = 'babf2cfbe2633c3082f8cfffdb3d9008b4b3b300'; - $hash = sha1($this->client.$this->login.$key.$b['code'].date('Ymd')); + $code = sprintf("%05u", $b['code']); + $hash = sha1($this->client.$this->login.$key.$code.date('Ymd')); $b['files']['zip']['uri'] = str_replace(array( '{client}',