Las Vegas Events Tickets

[insert_php]
$url = “https://api.seatgeek.com/2/events?lat=36.0821&lon=-115.1728&range=30mi&postal_code=90012&per_page=50&client_id=NDQzMDcyfDE1NDM1OTg3ODguMTE&client_secret=c7ebe80e59bce62dd5c2c3d3d669f27674bee755561a2487fda1545ba901ca20”;

$headers = array(
‘Content-Type: application/json’
);
// Send request to Server
$curl = curl_init($url);
// To save response in a variable from server, set headers;
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($curl, CURLOPT_HTTPGET, true);
// Get response
if(!($curl_response = curl_exec($curl))){
$response = array(
“status”=>”error”,
“message”=>curl_error($curl)
);

//die(‘Error: “‘ . curl_error($curl) . ‘” – Code: ‘ . curl_errno($curl));
}else{
$response = array(
“status”=>”success”,
“data”=>json_decode($curl_response, true)
);
}
curl_close($curl);
[/insert_php]

[insert_php]
if($response[‘status’]==’success’){
foreach ($response[‘data’][‘events’] as $key => $row) {
$old_date_timestamp = strtotime($row[‘datetime_local’]);
$new_date = date(‘Y-m-d H:i:s’, $old_date_timestamp);
$vardate = date(‘d/m/Y’, $old_date_timestamp);
$vartime = date(‘g:i a’, $old_date_timestamp);
$vanue = $row[‘venue’][‘name_v2’] . ‘, ‘ . $row[‘venue’][‘display_location’];

echo “

“;
echo “

“;
echo “

“;
echo “

“;
}
}else{
echo “No result to display”;
}
[/insert_php]

Date/Time Event
$vardate
$vartime
{$row[‘title’]}
$vanue