php curl vs python GET request
问题 I have an issue trying to convert a python GET request to php curl. This is what the python command looks like : requests.get( f'{url}/report', data={'token': reporting_token, 'format': 'pdf'} ) I'm trying to do the same thing in php curl : $ch = curl_init(); $params = array( 'token'=>'abcdefgh', 'format'=>'pdf', ) $url = $url.'?'.http_build_query($params); //this shows http://xxx/report?token=abcdefgh&format=pdf curl_setopt($ch, CURLOPT_URL, $url); $result = curl_exec($ch); This couldn't be