I want to pass two variables through the same url
I tried this:
$id = '24,54,32,65,34';
$agencia = 'AGIP, ARBA';
"url?id=$id&agencia=$agencia"
Clarification: yes or if it should be by parameters and variables
I am using curl and decode in this way:
function getVencimientos($id){
$result = fetchVencimientos($id);
$decode = json_decode(remove_utf8_bom($result), true)['data'];
var_dump($decode);
return $decode;
}
function fetchVencimientos($id){
$agencia = 'AGIP, ARBA';
$ch = curl_init("url?id=$id&agencia=$agencia");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/json',
'Accept: application/json'
]);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$result = curl_exec($ch);
curl_close($ch);
return $result;
}
It returns an html code.