You can remove the CURLOPT_POST...
lines entirely. $request
is not set, and you don't need to make a post request in this instance where a GET request will do. You may or may not need to use CURLOPT_FOLLOWLOCATION
-- turn it on if curl doesn't already work as needed.