I am trying to do a curl request on a site and I can't seem to get it working.
Here is what I have
<?php
 $mynumber = $_GET["mynumber"];
 echo $mynumber;
 $url = 'thewebsite/c/number='.$mynumber; // like this?
 $curl_header = array('X-Requested-With: XMLHttpRequest');
 $ch = curl_init($url);
 curl_setopt($ch, CURLOPT_HTTPHEADER, $curl_header);
 curl_setopt($ch, CURLOPT_POSTFIELDS, "number=$mynumber"); //??? --data     "number=12345678" ?
 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
 curl_setopt($ch, CURLOPT_COOKIE, $cookie);
 curl_setopt($ch, CURLOPT_COOKIESESSION, TRUE);
 curl_setopt($ch, CURLOPT_VERBOSE, true);
 $result = curl_exec($ch);
 echo $result;
 curl_close($ch)
 ?>
And here is the curl request:
"Content-Type: application/x-www-form-urlencoded; charset=UTF-8" -H "Accept: application/json, text/javascript, */*; q=0.01" -H "Referer: thewebsite" -H "X-Requested-With: XMLHttpRequest" -H "Connection: keep-alive" --data "number=12345678" --compressed  POST /thewebsite/c HTTP/1.1
I am not sure how to pass "--data "number=12345678"