checkin on behalf of user

Checkin the user to a venue on foursquare. The json response can be found here: http:snippetlib.comfoursquarejson_response_after_user_checkin

function checkin($venue_id, $v, $oauth_token, $latlong) {
   $checkin_url = \"https:api.foursquare.comv2checkinsadd\";
    
   $parameters = array(
       \'venueId\' => $venue_id,
       \'broadcast\' => \'private\', now i set this private, but can be public
       \'ll\' => $latlong,
       \'llAcc\' => \'1\',
       \'oauth_token\' => $oauth_token,
       \'v\' => $v
   );
    
   $curl = curl_init($checkin_url);
   curl_setopt($curl, CURLOPT_POST, true);
   curl_setopt($curl, CURLOPT_POSTFIELDS, $parameters);
   curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
   $response = curl_exec($curl);
    
   return $response;
}