I'm trying to get the rcmDriverAgesInfo data from this
curl 'https://apis.rentalcarmanager.com/booking/v3.1/API_KEY/step2/0/5/17_11_2021/11_00/5/23_11_2021/11_00/2/0/-/-?apikey=API_KEY' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0' -H 'Accept: image/webp,*/*' -H 'Accept-Language: en-US,en;q=0.5' --compressed -H 'Connection: keep-alive' -H 'Cookie: PHPSESSID=dksko0e9vkcuggi7lk7o94eaq1' -H 'Pragma: no-cache' -H 'Cache-Control: no-cache' -H 'TE: Trailers'
And This is my code
<?
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://apis.rentalcarmanager.com/booking/v3.1/API_KEY=/step2/0/5/25_10_2021/11_00/5/30_10_2021/11_00/2/0/-/-?apikey=API_KEY=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 30000,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
// Set Here Your Requesred Headers
'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0',
'Accept: image/webp,*/*',
'Content-Type: application/json',
'charset=UTF-8',
'Accept-Language: en-US,en;q=0.5',
'Connection: keep-alive',
'Cookie: PHPSESSID=dksko0e9vkcuggi7lk7o94eaq1',
'Pragma: no-cache',
'Cache-Control: no-cache',
),
)
);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
print_r($response,1);
This is curl output:
rcmLocationInfo = [{"id":"13","location":"ADELAIDE - 192 ONKAPARINGA VALLEY RD, WOODSIDE","webdefault":"False","pickupavailable":"True","dropoffavailable":"True","flightnoreqd":"False","noticerequired":"2","daysquotevalid":"7","officeopeningtime":"09:00","officeclosingtime":"16:00","afterhourbooking":"True","unattendeddropoffs":"True","minimunage":"18","afterhourfeeid":"309","unattendeddropofffeesid":"0","phone":"0417 816 649","email":"woodside#deluxecamper.com.au","minbookingday":"0"},{"id":"4","location":"AIRLIE BEACH - 1678 SHUTE HARBOUR RD","webdefault":"False","pickupavailable":"True","dropoffavailable":"True","flightnoreqd":"False","noticerequired":"0","daysquotevalid":"7","officeopeningtime":"09:00","officeclosingtime":"16:00","afterhourbooking":"True","unattendeddropoffs":"True","minimunage":"18","afterhourfeeid":"309","unattendeddropofffeesid":"0","phone":"0749483415","email":"tropicaccounts#whitsunday.net.au","minbookingday":"0"},{"id":"2","location":"BRISBANE - 40 FRENCH STREET EAGLE FARM","webdefault":"False","pickupavailable":"True","dropoffavailable":"True","flightnoreqd":"False","noticerequired":"0","daysquotevalid":"7","officeopeningtime":"09:00","officeclosingtime":"16:00","afterhourbooking":"True","unattendeddropoffs":"True","minimunage":"18","afterhourfeeid":"309","unattendeddropofffeesid":"0","phone":"07 5575 5400","email":"info#fivestarcarrentals.com.au","minbookingday":"0"},{"id":"1","location":"CAIRNS - 440 SHERIDAN STREET CAIRNS","webdefault":"True","pickupavailable":"True","dropoffavailable":"True","flightnoreqd":"False","noticerequired":"0","daysquotevalid":"7","officeopeningtime":"09:00","officeclosingtime":"16:00","afterhourbooking":"True","unattendeddropoffs":"True","minimunage":"18","afterhourfeeid":"309","unattendeddropofffeesid":"0","phone":"+6140813100","email":"sales#campermanaustralia.com","minbookingday":"0"},{"id":"12","location":"GOLDCOAST - 2/11 Northview St,Mermaid Wt","webdefault":"False","pickupavailable":"True","dropoffavailable":"True","flightnoreqd":"False","noticerequired":"0","daysquotevalid":"7","officeopeningtime":"09:00","officeclosingtime":"16:00","afterhourbooking":"True","unattendeddropoffs":"True","minimunage":"18","afterhourfeeid":"309","unattendeddropofffeesid":"0","phone":"(07) 5572 0600","email":"enquiries#surfersrentacar.com.au","minbookingday":"0"},{"id":"6","location":"MELB - 273 Elizabeth Street Coburg","webdefault":"False","pickupavailable":"True","dropoffavailable":"True","flightnoreqd":"False","noticerequired":"0","daysquotevalid":"7","officeopeningtime":"09:00","officeclosingtime":"16:00","afterhourbooking":"True","unattendeddropoffs":"True","minimunage":"18","afterhourfeeid":"309","unattendeddropofffeesid":"0","phone":"0393542945","email":"jpantonmotors#bigpond.com","minbookingday":"0"},{"id":"5","location":"SYDNEY - 23-25 ERSKINE RD CARINGBAH","webdefault":"False","pickupavailable":"True","dropoffavailable":"True","flightnoreqd":"False","noticerequired":"0","daysquotevalid":"7","officeopeningtime":"09:00","officeclosingtime":"14:00","afterhourbooking":"True","unattendeddropoffs":"True","minimunage":"18","afterhourfeeid":"309","unattendeddropofffeesid":"0","phone":"02 9540 5066","email":"sales#getacarrentals.com","minbookingday":"0"},{"id":"3","location":"TOWNSVILLE - 167 Mount Low Parkway, MOUNT LOW, QLD","webdefault":"False","pickupavailable":"True","dropoffavailable":"True","flightnoreqd":"False","noticerequired":"0","daysquotevalid":"7","officeopeningtime":"09:00","officeclosingtime":"16:00","afterhourbooking":"True","unattendeddropoffs":"True","minimunage":"18","afterhourfeeid":"309","unattendeddropofffeesid":"0","phone":"0407191437","email":"sales#campermanaustralia.com","minbookingday":"0"}];
rcmOfficeTimes = [{"locid":"1","wd":"1","afterhour":"True","unattended":"True","openingtime":"00:00","closingtime":"00:00","amstart":"00:00","amend":"23:55","pmstart":"00:00","pmend":"00:00","startpickup":"00:00","endpickup":"00:00","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"1","wd":"2","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"16:00","amstart":"00:00","amend":"00:00","pmstart":"16:00","pmend":"19:00","startpickup":"00:00","endpickup":"19:00","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"1","wd":"3","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"16:00","amstart":"00:00","amend":"00:00","pmstart":"16:00","pmend":"19:00","startpickup":"00:00","endpickup":"19:00","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"1","wd":"4","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"16:00","amstart":"00:00","amend":"00:00","pmstart":"16:00","pmend":"19:00","startpickup":"00:00","endpickup":"19:00","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"1","wd":"5","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"16:00","amstart":"00:00","amend":"00:00","pmstart":"16:00","pmend":"19:00","startpickup":"00:00","endpickup":"19:00","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"1","wd":"6","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"16:00","amstart":"00:00","amend":"00:00","pmstart":"16:00","pmend":"19:00","startpickup":"00:00","endpickup":"19:00","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"1","wd":"7","afterhour":"True","unattended":"True","openingtime":"00:00","closingtime":"00:00","amstart":"00:00","amend":"00:00","pmstart":"00:00","pmend":"00:00","startpickup":"00:00","endpickup":"00:00","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"2","wd":"1","afterhour":"True","unattended":"True","openingtime":"00:00","closingtime":"00:00","amstart":"00:00","amend":"23:55","pmstart":"00:00","pmend":"00:00","startpickup":"00:00","endpickup":"00:00","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"2","wd":"2","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"16:00","amstart":"00:00","amend":"08:55","pmstart":"16:05","pmend":"23:55","startpickup":"00:00","endpickup":"23:55","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"2","wd":"3","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"16:00","amstart":"00:00","amend":"08:55","pmstart":"16:05","pmend":"23:55","startpickup":"00:00","endpickup":"23:55","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"2","wd":"4","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"16:00","amstart":"00:00","amend":"08:55","pmstart":"16:05","pmend":"23:55","startpickup":"00:00","endpickup":"23:55","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"2","wd":"5","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"16:00","amstart":"00:00","amend":"08:55","pmstart":"16:05","pmend":"23:55","startpickup":"00:00","endpickup":"23:55","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"2","wd":"6","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"16:00","amstart":"00:00","amend":"08:55","pmstart":"16:05","pmend":"23:55","startpickup":"00:00","endpickup":"23:55","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"2","wd":"7","afterhour":"True","unattended":"True","openingtime":"08:30","closingtime":"11:00","amstart":"00:00","amend":"08:25","pmstart":"11:05","pmend":"23:55","startpickup":"00:00","endpickup":"23:55","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"3","wd":"1","afterhour":"True","unattended":"True","openingtime":"00:00","closingtime":"00:00","amstart":"00:00","amend":"23:55","pmstart":"00:00","pmend":"00:00","startpickup":"00:00","endpickup":"00:00","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"3","wd":"2","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"16:00","amstart":"00:00","amend":"00:00","pmstart":"16:00","pmend":"19:00","startpickup":"00:00","endpickup":"19:00","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"3","wd":"3","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"16:00","amstart":"00:00","amend":"00:00","pmstart":"16:00","pmend":"19:00","startpickup":"00:00","endpickup":"19:00","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"3","wd":"4","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"16:00","amstart":"00:00","amend":"00:00","pmstart":"16:00","pmend":"19:00","startpickup":"00:00","endpickup":"19:00","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"3","wd":"5","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"16:00","amstart":"00:00","amend":"00:00","pmstart":"16:00","pmend":"19:00","startpickup":"00:00","endpickup":"19:00","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"3","wd":"6","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"16:00","amstart":"00:00","amend":"00:00","pmstart":"16:00","pmend":"19:00","startpickup":"00:00","endpickup":"19:00","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"3","wd":"7","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"12:00","amstart":"00:00","amend":"00:00","pmstart":"12:00","pmend":"15:00","startpickup":"00:00","endpickup":"15:00","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"4","wd":"1","afterhour":"True","unattended":"True","openingtime":"00:00","closingtime":"00:00","amstart":"00:00","amend":"23:55","pmstart":"00:00","pmend":"00:00","startpickup":"00:00","endpickup":"00:00","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"4","wd":"2","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"16:00","amstart":"00:00","amend":"08:55","pmstart":"16:05","pmend":"23:55","startpickup":"00:00","endpickup":"23:55","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"4","wd":"3","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"16:00","amstart":"00:00","amend":"08:55","pmstart":"16:05","pmend":"23:55","startpickup":"00:00","endpickup":"23:55","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"4","wd":"4","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"16:00","amstart":"00:00","amend":"08:55","pmstart":"16:05","pmend":"23:55","startpickup":"00:00","endpickup":"23:55","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"4","wd":"5","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"16:00","amstart":"00:00","amend":"08:55","pmstart":"16:05","pmend":"23:55","startpickup":"00:00","endpickup":"23:55","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"4","wd":"6","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"16:00","amstart":"00:00","amend":"08:55","pmstart":"16:05","pmend":"23:55","startpickup":"00:00","endpickup":"23:55","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"4","wd":"7","afterhour":"True","unattended":"True","openingtime":"08:30","closingtime":"11:00","amstart":"00:00","amend":"08:25","pmstart":"11:05","pmend":"23:55","startpickup":"00:00","endpickup":"23:55","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"5","wd":"1","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"12:00","amstart":"00:00","amend":"00:00","pmstart":"00:00","pmend":"00:00","startpickup":"00:00","endpickup":"00:00","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"5","wd":"2","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"16:00","amstart":"00:00","amend":"00:00","pmstart":"16:00","pmend":"19:00","startpickup":"00:00","endpickup":"19:00","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"5","wd":"3","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"16:00","amstart":"00:00","amend":"00:00","pmstart":"16:00","pmend":"19:00","startpickup":"00:00","endpickup":"19:00","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"5","wd":"4","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"16:00","amstart":"00:00","amend":"00:00","pmstart":"16:00","pmend":"19:00","startpickup":"00:00","endpickup":"19:00","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"5","wd":"5","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"16:00","amstart":"00:00","amend":"00:00","pmstart":"16:00","pmend":"19:00","startpickup":"00:00","endpickup":"19:00","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"5","wd":"6","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"16:00","amstart":"00:00","amend":"08:55","pmstart":"16:00","pmend":"23:55","startpickup":"00:00","endpickup":"23:55","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"5","wd":"7","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"12:00","amstart":"00:00","amend":"00:00","pmstart":"12:00","pmend":"15:00","startpickup":"00:00","endpickup":"15:00","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"6","wd":"1","afterhour":"True","unattended":"True","openingtime":"00:00","closingtime":"00:00","amstart":"00:00","amend":"23:55","pmstart":"00:00","pmend":"00:00","startpickup":"00:00","endpickup":"00:00","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"6","wd":"2","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"16:00","amstart":"00:00","amend":"00:00","pmstart":"16:00","pmend":"18:00","startpickup":"00:00","endpickup":"18:00","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"6","wd":"3","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"16:00","amstart":"00:00","amend":"00:00","pmstart":"16:00","pmend":"18:00","startpickup":"00:00","endpickup":"18:00","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"6","wd":"4","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"16:00","amstart":"00:00","amend":"00:00","pmstart":"16:00","pmend":"18:00","startpickup":"00:00","endpickup":"18:00","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"6","wd":"5","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"16:00","amstart":"00:00","amend":"00:00","pmstart":"16:00","pmend":"18:00","startpickup":"00:00","endpickup":"18:00","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"6","wd":"6","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"16:00","amstart":"00:00","amend":"00:00","pmstart":"16:00","pmend":"18:00","startpickup":"00:00","endpickup":"18:00","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"6","wd":"7","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"12:00","amstart":"00:00","amend":"00:00","pmstart":"12:00","pmend":"15:00","startpickup":"00:00","endpickup":"15:00","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"12","wd":"1","afterhour":"True","unattended":"True","openingtime":"00:00","closingtime":"00:00","amstart":"00:00","amend":"23:55","pmstart":"00:00","pmend":"00:00","startpickup":"00:00","endpickup":"00:00","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"12","wd":"2","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"16:00","amstart":"00:00","amend":"08:55","pmstart":"16:05","pmend":"23:55","startpickup":"00:00","endpickup":"23:55","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"12","wd":"3","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"16:00","amstart":"00:00","amend":"08:55","pmstart":"16:05","pmend":"23:55","startpickup":"00:00","endpickup":"23:55","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"12","wd":"4","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"16:00","amstart":"00:00","amend":"08:55","pmstart":"16:05","pmend":"23:55","startpickup":"00:00","endpickup":"23:55","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"12","wd":"5","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"16:00","amstart":"00:00","amend":"08:55","pmstart":"16:05","pmend":"23:55","startpickup":"00:00","endpickup":"23:55","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"12","wd":"6","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"16:00","amstart":"00:00","amend":"08:55","pmstart":"16:05","pmend":"23:55","startpickup":"00:00","endpickup":"23:55","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"12","wd":"7","afterhour":"True","unattended":"True","openingtime":"08:30","closingtime":"11:00","amstart":"00:00","amend":"08:25","pmstart":"11:05","pmend":"23:55","startpickup":"00:00","endpickup":"23:55","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"13","wd":"1","afterhour":"True","unattended":"True","openingtime":"00:00","closingtime":"00:00","amstart":"00:00","amend":"23:55","pmstart":"00:00","pmend":"00:00","startpickup":"00:00","endpickup":"00:00","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"13","wd":"2","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"16:00","amstart":"00:00","amend":"08:55","pmstart":"16:05","pmend":"23:55","startpickup":"00:00","endpickup":"23:55","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"13","wd":"3","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"16:00","amstart":"00:00","amend":"08:55","pmstart":"16:05","pmend":"23:55","startpickup":"00:00","endpickup":"23:55","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"13","wd":"4","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"16:00","amstart":"00:00","amend":"08:55","pmstart":"16:05","pmend":"23:55","startpickup":"00:00","endpickup":"23:55","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"13","wd":"5","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"16:00","amstart":"00:00","amend":"08:55","pmstart":"16:05","pmend":"23:55","startpickup":"00:00","endpickup":"23:55","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"13","wd":"6","afterhour":"True","unattended":"True","openingtime":"09:00","closingtime":"16:00","amstart":"00:00","amend":"08:55","pmstart":"16:00","pmend":"23:55","startpickup":"00:00","endpickup":"23:55","startdropoff":"00:00","enddropoff":"24:00"},{"locid":"13","wd":"7","afterhour":"True","unattended":"True","openingtime":"08:30","closingtime":"11:00","amstart":"00:00","amend":"08:25","pmstart":"11:05","pmend":"23:55","startpickup":"00:00","endpickup":"23:55","startdropoff":"00:00","enddropoff":"24:00"}];
rcmCategoryTypeInfo = [{"id":"6","categorytype":"CamperVan","ordering":"c","rentingtype":"True","raimage":"","rate12hour":"True","ratepernight":""}];
rcmDriverAgesInfo = [{"id":"10","driverage":"18","defaultage":"False"},{"id":"2","driverage":"19","defaultage":"False"},{"id":"3","driverage":"20","defaultage":"False"},{"id":"4","driverage":"21+","defaultage":"False"}];
rcmLocationFees = [{"cattypeid":"6","loctypeid":"1","loctype":"pickup","locationid":"5","currencyname":"","currencysymbol":"$","locdate":"25 Oct 2021","loctime":"11:00","dwname":"Monday","days4minbookingdaycheck":"6","location":"SYDNEY - 23-25 ERSKINE RD CARINGBAH","locdateloctime":"11-Oct-2021","tstavailable":"1","ierrorcode":"0","availablemsg":"","iafterhourpickup":"0","iafterhourdropoff":"0","tstminbookingday":"0","flightnoreqd":"False"},{"cattypeid":"6","loctypeid":"2","loctype":"dropoff","locationid":"5","currencyname":"","currencysymbol":"$","locdate":"30 Oct 2021","loctime":"11:00","dwname":"Saturday","days4minbookingdaycheck":"6","location":"SYDNEY - 23-25 ERSKINE RD CARINGBAH","locdateloctime":"11-Oct-2021","tstavailable":"1","ierrorcode":"0","availablemsg":"","iafterhourpickup":"0","iafterhourdropoff":"0","tstminbookingday":"0","flightnoreqd":"False"}];
rcmAvailableCarDetails = [];
rcmMandatoryFees = [{"cattypeid":"6","column1":"MandatoryFees","id":"414","locationid":"5","vehiclesizeid":"2","numofdays":"6","qty":"1","fees":"70.0000","name":"Administration Fee","type":"Fixed","maxprice":"0.0000","fee_cost":"70.00","stampduty":"False","gst":"True","percentagetotalcost":"False","excessfee":"0.0000","merchantfee":"False","fromage":"0","toage":"0","qtyapply":"False","extradesc":"","extradesc1":"","extradesc2":"","extradesc3":""},{"cattypeid":"6","column1":"MandatoryFees","id":"414","locationid":"5","vehiclesizeid":"4","numofdays":"6","qty":"1","fees":"70.0000","name":"Administration Fee","type":"Fixed","maxprice":"0.0000","fee_cost":"70.00","stampduty":"False","gst":"True","percentagetotalcost":"False","excessfee":"0.0000","merchantfee":"False","fromage":"0","toage":"0","qtyapply":"False","extradesc":"","extradesc1":"","extradesc2":"","extradesc3":""},{"cattypeid":"6","column1":"MandatoryFees","id":"414","locationid":"5","vehiclesizeid":"5","numofdays":"6","qty":"1","fees":"70.0000","name":"Administration Fee","type":"Fixed","maxprice":"0.0000","fee_cost":"70.00","stampduty":"False","gst":"True","percentagetotalcost":"False","excessfee":"0.0000","merchantfee":"False","fromage":"0","toage":"0","qtyapply":"False","extradesc":"","extradesc1":"","extradesc2":"","extradesc3":""},{"cattypeid":"6","column1":"MandatoryFees","id":"414","locationid":"5","vehiclesizeid":"27","numofdays":"6","qty":"1","fees":"70.0000","name":"Administration Fee","type":"Fixed","maxprice":"0.0000","fee_cost":"70.00","stampduty":"False","gst":"True","percentagetotalcost":"False","excessfee":"0.0000","merchantfee":"False","fromage":"0","toage":"0","qtyapply":"False","extradesc":"","extradesc1":"","extradesc2":"","extradesc3":""},{"cattypeid":"6","column1":"MandatoryFees","id":"414","locationid":"5","vehiclesizeid":"30","numofdays":"6","qty":"1","fees":"70.0000","name":"Administration Fee","type":"Fixed","maxprice":"0.0000","fee_cost":"70.00","stampduty":"False","gst":"True","percentagetotalcost":"False","excessfee":"0.0000","merchantfee":"False","fromage":"0","toage":"0","qtyapply":"False","extradesc":"","extradesc1":"","extradesc2":"","extradesc3":""},{"cattypeid":"6","column1":"MandatoryFees","id":"414","locationid":"5","vehiclesizeid":"31","numofdays":"6","qty":"1","fees":"70.0000","name":"Administration Fee","type":"Fixed","maxprice":"0.0000","fee_cost":"70.00","stampduty":"False","gst":"True","percentagetotalcost":"False","excessfee":"0.0000","merchantfee":"False","fromage":"0","toage":"0","qtyapply":"False","extradesc":"","extradesc1":"","extradesc2":"","extradesc3":""},{"cattypeid":"6","column1":"MandatoryFees","id":"414","locationid":"5","vehiclesizeid":"35","numofdays":"6","qty":"1","fees":"70.0000","name":"Administration Fee","type":"Fixed","maxprice":"0.0000","fee_cost":"70.00","stampduty":"False","gst":"True","percentagetotalcost":"False","excessfee":"0.0000","merchantfee":"False","fromage":"0","toage":"0","qtyapply":"False","extradesc":"","extradesc1":"","extradesc2":"","extradesc3":""}];
rcmOptionalFees = [];
rcmInsuranceOptions = [];
rcmKmCharges = [];
rcmTaxInclusive=true;rcmTaxRate=0.100;rcmStateTax=0.000;
rcmErrors = [];
rcmStep2Ready("","","");
But I just want only rcmOfficeTimes data
[{"id":"10","driverage":"18","defaultage":"False"},{"id":"2","driverage":"19","defaultage":"False"},{"id":"3","driverage":"20","defaultage":"False"},{"id":"4","driverage":"21+","defaultage":"False"}]
I need the rcmOfficeTimes dataset from this response data. Anyone can help me
Exact model: Sagemcom CS 50001
I was trying to write a script in PHP/CURL to automatically reset internet in Orange FunBox, but it doesn't work... login seems to work fine, as well as session... because when login fails, I get error in response to restart command... "Access denied"... ok... but now there is no error, response the same as in browser, but restart doesn't take place... any idea why?
Step one: Login.
$useragent="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1";
$curl = curl_init('http://192.168.1.1/authenticate?username=admin&password=admin');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl, CURLOPT_USERAGENT, $useragent);
curl_setopt($curl, CURLOPT_POSTFIELDS,'username=admin&password=admin');
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_COOKIESESSION, true);
curl_setopt($curl, CURLOPT_COOKIEJAR, '/tmp/ipreset_cookie.jar');
curl_setopt($curl, CURLOPT_COOKIEFILE, '/tmp/ipreset_cookie.txt');
Step two: Send connection restart request.
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type:application/x-sah-ws-1-call+json; charset=UTF-8','X-Context:'.$context,'X-Prototype-Version:1.7','X-Requested-With:XMLHttpRequest','Referer:http://192.168.1.1/advConfigAccessType.html'));
curl_setopt($curl, CURLOPT_URL, 'http://192.168.1.1/sysbus/NeMo/Intf/data:setFirstParameter');
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, '{"parameters":{"name":"Enable","value":1,"flag":"ppp","traverse":"down"}}');
curl_setopt($curl, CURLINFO_HEADER_OUT, true);
curl_exec($curl);
What I am getting is an answer that status:null, no error (the same answer as in browser when it works)... but nothing happens.
The problem may be the way that CURL encodes the POST, but not sure about it... normally by browser it is send in payload.
Second idea is that when in browser, it sends some mass of requests to different interfaces, and cookies are much bigger than session id... someting like:
46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl;46db1eb1/context=$context; 46db1eb1/login=admin; 46db1eb1/accept-language=pl-PL,pl;'
The problem is that I can't add that in CURL without losing session cookie... when I add Cookie header with that, it adds second Cookie header in request... and I guess it's wrong.
The funny is that... when I copy to CURL command line a request to restart connection (from Browser), curl gives me Gateway timeout error... pretty weird, as same request worked before from browser...
This is what Fiddler returns as CURL script export from whole procedure (since login to restart). Maybe it will help...
curl -k -i --raw -o 0.dat "http://192.168.1.1/" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8" -H "Upgrade-Insecure-Requests: 1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "Accept-Encoding: gzip, deflate, lzma, sdch" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "If-None-Match: 46db1eb1"
curl -k -i --raw -o 1.dat "http://192.168.1.1/" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "Accept: */*" -H "Referer: http://192.168.1.1/" -H "Accept-Encoding: gzip, deflate, lzma, sdch" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/accept-language=pl-PL,pl" -H "If-None-Match: 46db1eb1"
curl -k -i --raw -o 2.dat -X POST "http://192.168.1.1/sysbus/UserInterface:getLanguage" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Accept: text/javascript, text/html, application/xml, text/xml, */*" -H "X-Prototype-Version: 1.7" -H "Origin: http://192.168.1.1" -H "X-Requested-With: XMLHttpRequest" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "Content-type: application/x-sah-ws-1-call+json; charset=UTF-8" -H "Referer: http://192.168.1.1/" -H "Accept-Encoding: gzip, deflate, lzma" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1"
curl -k -i --raw -o 3.dat -X POST "http://192.168.1.1/sysbus/Devices:get" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Origin: http://192.168.1.1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "Content-type: application/x-sah-ws-1-call+json; charset=UTF-8" -H "Accept: text/javascript" -H "X-Prototype-Version: 1.7" -H "X-Requested-With: XMLHttpRequest" -H "X-Sah-Request-Type: idle" -H "Referer: http://192.168.1.1/" -H "Accept-Encoding: gzip, deflate, lzma" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1"
curl -k -i --raw -o 4.dat -X POST "http://192.168.1.1/sysbus/eventmanager:get_events" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Origin: http://192.168.1.1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "X-Context: null" -H "Content-type: application/x-sah-ws-4-call+json; charset=UTF-8" -H "Accept: text/javascript, text/html, application/xml, text/xml, */*" -H "X-Prototype-Version: 1.7" -H "X-Requested-With: XMLHttpRequest" -H "X-Sah-Request-Type: idle" -H "Referer: http://192.168.1.1/" -H "Accept-Encoding: gzip, deflate, lzma" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl"
curl -k -i --raw -o 5.dat -X POST "http://192.168.1.1/sysbus/NMC/OrangeTV:getIPTVStatus" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Origin: http://192.168.1.1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "Content-type: application/x-sah-ws-1-call+json; charset=UTF-8" -H "Accept: text/javascript" -H "X-Prototype-Version: 1.7" -H "X-Requested-With: XMLHttpRequest" -H "X-Sah-Request-Type: idle" -H "Referer: http://192.168.1.1/" -H "Accept-Encoding: gzip, deflate, lzma" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl"
curl -k -i --raw -o 6.dat -X POST "http://192.168.1.1/sysbus/VoiceService/VoiceApplication:listTrunks" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Origin: http://192.168.1.1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "Content-type: application/x-sah-ws-1-call+json; charset=UTF-8" -H "Accept: text/javascript" -H "X-Prototype-Version: 1.7" -H "X-Requested-With: XMLHttpRequest" -H "X-Sah-Request-Type: idle" -H "Referer: http://192.168.1.1/" -H "Accept-Encoding: gzip, deflate, lzma" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl"
curl -k -i --raw -o 7.dat -X POST "http://192.168.1.1/sysbus/NMC:getWANStatus" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Origin: http://192.168.1.1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "Content-type: application/x-sah-ws-1-call+json; charset=UTF-8" -H "Accept: text/javascript" -H "X-Prototype-Version: 1.7" -H "X-Requested-With: XMLHttpRequest" -H "X-Sah-Request-Type: idle" -H "Referer: http://192.168.1.1/" -H "Accept-Encoding: gzip, deflate, lzma" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl"
curl -k -i --raw -o 8.dat -X POST "http://192.168.1.1/sysbus/NMC/Wifi:get" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Origin: http://192.168.1.1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "Content-type: application/x-sah-ws-1-call+json; charset=UTF-8" -H "Accept: text/javascript" -H "X-Prototype-Version: 1.7" -H "X-Requested-With: XMLHttpRequest" -H "X-Sah-Request-Type: idle" -H "Referer: http://192.168.1.1/" -H "Accept-Encoding: gzip, deflate, lzma" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl"
curl -k -i --raw -o 9.dat -X POST -d "username=admin&password=admin" "http://192.168.1.1/authenticate?username=admin&password=admin" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Accept: text/javascript, text/html, application/xml, text/xml, */*" -H "X-Prototype-Version: 1.7" -H "Origin: http://192.168.1.1" -H "X-Requested-With: XMLHttpRequest" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "Content-type: application/x-www-form-urlencoded; charset=UTF-8" -H "Referer: http://192.168.1.1/" -H "Accept-Encoding: gzip, deflate, lzma" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl"
curl -k -i --raw -o 10.dat "http://192.168.1.1/advConfigNetworkDhcp.html" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8" -H "Upgrade-Insecure-Requests: 1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "Referer: http://192.168.1.1/" -H "Accept-Encoding: gzip, deflate, lzma, sdch" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl; 46db1eb1/sessid=MQcSNORlUtoe+b3DDwwgwuhk; 46db1eb1/context=AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl; 46db1eb1/login=admin; 46db1eb1/expirydate=Wed Dec 23 2015 15:04:25 GMT+0100 (Środkowoeuropejski czas stand.)" -H "If-None-Match: 46db1eb1"
curl -k -i --raw -o 11.dat "http://192.168.1.1/advConfigNetworkDhcp.html" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "Accept: */*" -H "Referer: http://192.168.1.1/advConfigNetworkDhcp.html" -H "Accept-Encoding: gzip, deflate, lzma, sdch" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl; 46db1eb1/sessid=MQcSNORlUtoe+b3DDwwgwuhk; 46db1eb1/context=AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl; 46db1eb1/login=admin; 46db1eb1/expirydate=Wed Dec 23 2015 15:04:25 GMT+0100 (Środkowoeuropejski czas stand.); 46db1eb1/accept-language=pl-PL,pl" -H "If-None-Match: 46db1eb1"
curl -k -i --raw -o 12.dat -X POST "http://192.168.1.1/sysbus/UserManagement:getUsers" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Origin: http://192.168.1.1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "X-Context: AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl" -H "Content-type: application/x-sah-ws-1-call+json; charset=UTF-8" -H "Accept: text/javascript" -H "X-Prototype-Version: 1.7" -H "X-Requested-With: XMLHttpRequest" -H "Referer: http://192.168.1.1/advConfigNetworkDhcp.html" -H "Accept-Encoding: gzip, deflate, lzma" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl; 46db1eb1/sessid=MQcSNORlUtoe+b3DDwwgwuhk; 46db1eb1/context=AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl; 46db1eb1/login=admin; 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/expirydate=Wed Dec 23 2015 15:04:31 GMT+0100 (Środkowoeuropejski czas stand.)"
curl -k -i --raw -o 13.dat -X POST "http://192.168.1.1/sysbus/NMC:getLANIP" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Origin: http://192.168.1.1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "X-Context: AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl" -H "Content-type: application/x-sah-ws-1-call+json; charset=UTF-8" -H "Accept: text/javascript" -H "X-Prototype-Version: 1.7" -H "X-Requested-With: XMLHttpRequest" -H "Referer: http://192.168.1.1/advConfigNetworkDhcp.html" -H "Accept-Encoding: gzip, deflate, lzma" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl; 46db1eb1/sessid=MQcSNORlUtoe+b3DDwwgwuhk; 46db1eb1/context=AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl; 46db1eb1/login=admin; 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/expirydate=Wed Dec 23 2015 15:04:31 GMT+0100 (Środkowoeuropejski czas stand.)"
curl -k -i --raw -o 14.dat -X POST "http://192.168.1.1/sysbus/Devices:get" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Origin: http://192.168.1.1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "X-Context: AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl" -H "Content-type: application/x-sah-ws-1-call+json; charset=UTF-8" -H "Accept: text/javascript" -H "X-Prototype-Version: 1.7" -H "X-Requested-With: XMLHttpRequest" -H "Referer: http://192.168.1.1/advConfigNetworkDhcp.html" -H "Accept-Encoding: gzip, deflate, lzma" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl; 46db1eb1/sessid=MQcSNORlUtoe+b3DDwwgwuhk; 46db1eb1/context=AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl; 46db1eb1/login=admin; 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/expirydate=Wed Dec 23 2015 15:04:31 GMT+0100 (Środkowoeuropejski czas stand.)"
curl -k -i --raw -o 15.dat -X POST "http://192.168.1.1/sysbus/DHCPv4/Server/Pool/default:getStaticLeases" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Origin: http://192.168.1.1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "X-Context: AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl" -H "Content-type: application/x-sah-ws-1-call+json; charset=UTF-8" -H "Accept: text/javascript" -H "X-Prototype-Version: 1.7" -H "X-Requested-With: XMLHttpRequest" -H "Referer: http://192.168.1.1/advConfigNetworkDhcp.html" -H "Accept-Encoding: gzip, deflate, lzma" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl; 46db1eb1/sessid=MQcSNORlUtoe+b3DDwwgwuhk; 46db1eb1/context=AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl; 46db1eb1/login=admin; 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/expirydate=Wed Dec 23 2015 15:04:31 GMT+0100 (Środkowoeuropejski czas stand.)"
curl -k -i --raw -o 16.dat -X POST "http://192.168.1.1/sysbus/NMC:getWANStatus" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Origin: http://192.168.1.1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "X-Context: AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl" -H "Content-type: application/x-sah-ws-1-call+json; charset=UTF-8" -H "Accept: text/javascript" -H "X-Prototype-Version: 1.7" -H "X-Requested-With: XMLHttpRequest" -H "Referer: http://192.168.1.1/advConfigNetworkDhcp.html" -H "Accept-Encoding: gzip, deflate, lzma" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl; 46db1eb1/sessid=MQcSNORlUtoe+b3DDwwgwuhk; 46db1eb1/context=AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl; 46db1eb1/login=admin; 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/expirydate=Wed Dec 23 2015 15:04:31 GMT+0100 (Środkowoeuropejski czas stand.)"
curl -k -i --raw -o 17.dat -X POST "http://192.168.1.1/sysbus/Devices:get" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Origin: http://192.168.1.1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "X-Context: AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl" -H "Content-type: application/x-sah-ws-1-call+json; charset=UTF-8" -H "Accept: text/javascript" -H "X-Prototype-Version: 1.7" -H "X-Requested-With: XMLHttpRequest" -H "Referer: http://192.168.1.1/advConfigNetworkDhcp.html" -H "Accept-Encoding: gzip, deflate, lzma" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl; 46db1eb1/sessid=MQcSNORlUtoe+b3DDwwgwuhk; 46db1eb1/context=AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl; 46db1eb1/login=admin; 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/expirydate=Wed Dec 23 2015 15:04:31 GMT+0100 (Środkowoeuropejski czas stand.)"
curl -k -i --raw -o 18.dat "http://192.168.1.1/advConfigAccessType.html" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8" -H "Upgrade-Insecure-Requests: 1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "Referer: http://192.168.1.1/advConfigNetworkDhcp.html" -H "Accept-Encoding: gzip, deflate, lzma, sdch" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl; 46db1eb1/sessid=MQcSNORlUtoe+b3DDwwgwuhk; 46db1eb1/context=AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl; 46db1eb1/login=admin; 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/expirydate=Wed Dec 23 2015 15:04:31 GMT+0100 (Środkowoeuropejski czas stand.)" -H "If-None-Match: 46db1eb1"
curl -k -i --raw -o 19.dat "http://192.168.1.1/advConfigAccessType.html" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "Accept: */*" -H "Referer: http://192.168.1.1/advConfigAccessType.html" -H "Accept-Encoding: gzip, deflate, lzma, sdch" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl; 46db1eb1/sessid=MQcSNORlUtoe+b3DDwwgwuhk; 46db1eb1/context=AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl; 46db1eb1/login=admin; 46db1eb1/expirydate=Wed Dec 23 2015 15:04:31 GMT+0100 (Środkowoeuropejski czas stand.); 46db1eb1/accept-language=pl-PL,pl" -H "If-None-Match: 46db1eb1"
curl -k -i --raw -o 20.dat -X POST "http://192.168.1.1/sysbus/UserManagement:getUsers" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Origin: http://192.168.1.1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "X-Context: AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl" -H "Content-type: application/x-sah-ws-1-call+json; charset=UTF-8" -H "Accept: text/javascript" -H "X-Prototype-Version: 1.7" -H "X-Requested-With: XMLHttpRequest" -H "Referer: http://192.168.1.1/advConfigAccessType.html" -H "Accept-Encoding: gzip, deflate, lzma" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl; 46db1eb1/sessid=MQcSNORlUtoe+b3DDwwgwuhk; 46db1eb1/context=AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl; 46db1eb1/login=admin; 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/expirydate=Wed Dec 23 2015 15:04:33 GMT+0100 (Środkowoeuropejski czas stand.)"
curl -k -i --raw -o 21.dat -X POST "http://192.168.1.1/sysbus/NMC:getWANStatus" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Origin: http://192.168.1.1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "X-Context: AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl" -H "Content-type: application/x-sah-ws-1-call+json; charset=UTF-8" -H "Accept: text/javascript" -H "X-Prototype-Version: 1.7" -H "X-Requested-With: XMLHttpRequest" -H "Referer: http://192.168.1.1/advConfigAccessType.html" -H "Accept-Encoding: gzip, deflate, lzma" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl; 46db1eb1/sessid=MQcSNORlUtoe+b3DDwwgwuhk; 46db1eb1/context=AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl; 46db1eb1/login=admin; 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/expirydate=Wed Dec 23 2015 15:04:34 GMT+0100 (Środkowoeuropejski czas stand.)"
curl -k -i --raw -o 22.dat -X POST "http://192.168.1.1/sysbus/NeMo/Intf/data:getMIBs" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Origin: http://192.168.1.1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "X-Context: AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl" -H "Content-type: application/x-sah-ws-1-call+json; charset=UTF-8" -H "Accept: text/javascript" -H "X-Prototype-Version: 1.7" -H "X-Requested-With: XMLHttpRequest" -H "Referer: http://192.168.1.1/advConfigAccessType.html" -H "Accept-Encoding: gzip, deflate, lzma" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl; 46db1eb1/sessid=MQcSNORlUtoe+b3DDwwgwuhk; 46db1eb1/context=AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl; 46db1eb1/login=admin; 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/expirydate=Wed Dec 23 2015 15:04:34 GMT+0100 (Środkowoeuropejski czas stand.)"
curl -k -i --raw -o 23.dat -X POST "http://192.168.1.1/sysbus/NeMo/Intf/data:setFirstParameter" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Origin: http://192.168.1.1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "X-Context: AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl" -H "Content-type: application/x-sah-ws-1-call+json; charset=UTF-8" -H "Accept: text/javascript" -H "X-Prototype-Version: 1.7" -H "X-Requested-With: XMLHttpRequest" -H "Referer: http://192.168.1.1/advConfigAccessType.html" -H "Accept-Encoding: gzip, deflate, lzma" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl; 46db1eb1/sessid=MQcSNORlUtoe+b3DDwwgwuhk; 46db1eb1/context=AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl; 46db1eb1/login=admin; 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/expirydate=Wed Dec 23 2015 15:04:36 GMT+0100 (Środkowoeuropejski czas stand.)"
curl -k -i --raw -o 24.dat -X POST "http://192.168.1.1/sysbus/NeMo/Intf/data:setFirstParameter" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Origin: http://192.168.1.1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "X-Context: AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl" -H "Content-type: application/x-sah-ws-1-call+json; charset=UTF-8" -H "Accept: text/javascript" -H "X-Prototype-Version: 1.7" -H "X-Requested-With: XMLHttpRequest" -H "Referer: http://192.168.1.1/advConfigAccessType.html" -H "Accept-Encoding: gzip, deflate, lzma" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl; 46db1eb1/sessid=MQcSNORlUtoe+b3DDwwgwuhk; 46db1eb1/context=AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl; 46db1eb1/login=admin; 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/expirydate=Wed Dec 23 2015 15:04:37 GMT+0100 (Środkowoeuropejski czas stand.)"
curl -k -i --raw -o 25.dat -X POST "http://192.168.1.1/sysbus/NMC:getWANStatus" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Origin: http://192.168.1.1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "X-Context: AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl" -H "Content-type: application/x-sah-ws-1-call+json; charset=UTF-8" -H "Accept: text/javascript" -H "X-Prototype-Version: 1.7" -H "X-Requested-With: XMLHttpRequest" -H "Referer: http://192.168.1.1/advConfigAccessType.html" -H "Accept-Encoding: gzip, deflate, lzma" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl; 46db1eb1/sessid=MQcSNORlUtoe+b3DDwwgwuhk; 46db1eb1/context=AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl; 46db1eb1/login=admin; 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/expirydate=Wed Dec 23 2015 15:04:42 GMT+0100 (Środkowoeuropejski czas stand.)"
Note that /sysbus/NeMo/Intf/data:setFirstParameter is invoked twice. In my case:
the first one is with {name: "Enable", value: 0, flag: "ppp", traverse: "down"}
the second one, right after the first one, with {name: "Enable", value: 1, flag: "ppp", traverse: "down"}
(Note the difference in value)
What happens if you try both requests?
Another way, probably more convenient to a casual reader of this question, is to use the sysbus.py script by René D. Février.
First, you need to configure it like described in the README (in french, but Google translate works well enough here), and then do something like:
./sysbus.py NeMo.Intf.data:setFirstParameter name=Enable value=0 flag=ppp traverse=down
./sysbus.py NeMo.Intf.data:setFirstParameter name=Enable value=1 flag=ppp traverse=down
This post is several years old, but I confirm having the same model (Funbox 2.0, Model: Sagemcom CS 50001) and have figured it out in bash -
#!/bin/bash
cookie=`mktemp /dev/shm/curl.XXXXXXXXXX`
res=`curl "http://192.168.1.1/authenticate?username=$USER&password=$PASSWORD" --cookie-jar "$cookie" --data '' 2>/dev/null`
context=`python3 -c 'import json; d = json.loads("""'"$res"'"""); print(d["data"]["contextID"])'`
curl -s -X POST -H "Content-Type: application/json" \
-H "X-Context: $context" --cookie "$cookie" -d '{"parameters":{}}' \
"http://192.168.1.1/sysbus/NMC:reboot"
rm "$cookie"
Essentially you have to set the session, get the Context ID and use it in the second command to actually reboot the router.