Change expiration date for existing access record

<?php$ch=curl_init();$url="http://www.example.com/amember/api/access/5051";// Access id should be included in url$vars=array('_key'=>'xxxxx','expire_date'=>date('Y-m-d')// Set expire date to today's date);//set the url, number of POST vars, POST datacurl_setopt($ch, CURLOPT_URL,$url);curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);curl_setopt($ch, CURLOPT_CUSTOMREQUEST,"PUT");// Set method to PUT, so API module knows that this is update request. curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($vars));curl_setopt($ch, CURLOPT_HTTPHEADER,array("Content-type: application/x-www-form-urlencoded"));//execute post$result=curl_exec($ch);//close connectioncurl_close($ch);