$POST = '{"CollectionCountry":33,"CollectionPostcode":"12001","CollectionTown":"CASTELLON/CASTELLO","DeliveryCountry":33,"DeliveryPostcode":"12001","DeliveryTown":"CASTELLON/CASTELLO","RequiresCommercialInvoice":false,"CollectionDate":null,"QuoteValue":null,"Parcels":[{"Weight":5,"Length":null,"Width":null,"Height":null}],"Columns":[{"Header":"SERVICIO 19\'00","Template":"GRID_RESULTS_COLUMN","Endpoint":"/quotes/api/results/column?deliveryTimes=1","Description":null,"Feature":null,"IncludeTags":[],"ExcludeTags":[],"hasResults":true,"loading":true},{"Header":"SERVICIO RED","Template":"GRID_RESULTS_COLUMN","Endpoint":"/quotes/api/results/column?deliveryTimes=2","Description":null,"Feature":null,"IncludeTags":[],"ExcludeTags":[],"hasResults":true,"loading":true},{"Header":"SERVICIO 48\'00/72\'00","Template":"GRID_RESULTS_COLUMN","Endpoint":"/quotes/api/results/column?deliveryTimes=3","Description":null,"Feature":null,"IncludeTags":[],"ExcludeTags":[],"hasResults":true,"loading":true}],"QuoteResultLayout":null,"QuoteType":0,"SortOptions":null,"CurrencyCode":"EUR","Mode":null}'; function poster($url,$fields_string){ $ua = 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Mobile Safari/537.36'; $ch = curl_init(); curl_setopt($ch,CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, true); $headers = [ ':authority:www.myenvialia.com', ':method:POST', ':path:/quotes/api/results/column?deliveryTimes=1', ':scheme:https', 'accept:application/json, text/plain, */*', 'accept-encoding:gzip, deflate, br', 'accept-language:ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4', 'content-length:1051', 'content-type:application/json;charset=UTF-8', 'origin:https://www.myenvialia.com', 'referer:https://www.myenvialia.com/precios?col=33&dest=33&cp=12222&dp=13180&ct=AIN&dt=ABENOJAR&p=1~5', 'requestverificationtoken: 5djSyDsuvbXQ3AlnfsHP-9e2zc5V3nkxh_vwRsTCIMRqWX5dVhYETbicub2U2qV0UjPOtmAADQ34pcEUKeiAG0a4RVc1', 'user-agent:Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Mobile Safari/537.36', ]; curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_RETURNTRANSFER,true); curl_setopt($ch, CURLOPT_USERAGENT, $ua); curl_setopt($ch, CURLOPT_COOKIE, '__cfduid=d6196a3dd41d92aacee099e6b841c6e5f1490258075; ARRCookie=d8bdc008a4607e6ff76c1bba4628b53b4e1fc75eb59a830e24f4200fde1db4aa; ASP.NET_SessionId=b2ljlsvhhanfsaukvghd4ey2; __RequestVerificationToken=fPxAiIy2ZS8pE3UhI4LsVGAb_O10GDTCwll2QTfD3QBQuSMN7byWE1oyFUxcI81ZTj5NXnAmP41m3z7-CarwjXmJPAg1; _gat=1; _ga=GA1.2.517958312.1490258077; 45520235-VID=172480694937627; 45520235-SKEY=7154258768904926939; HumanClickSiteContainerID_45520235=STANDALONE'); curl_setopt($ch, CURLOPT_AUTOREFERER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_MAXREDIRS, 20); curl_setopt($ch,CURLOPT_POST, true); curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string); $result = curl_exec($ch); $last = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL); curl_close($ch); return array($result,$last); } print_r(poster('https://www.myenvialia.com/quotes/api/results/column?deliveryTimes=1',json_decode($POST))); 

I get

Array ([0] => HTTP / 1.1 100 Continue HTTP / 1.1 404 Not Found Date: Mon, 10 Apr 2017 19:57:41 GMT Content-Length: 0 Connection: keep-alive X-Node: 107 X-Powered- By: ARR / 3.0 Server: cloudflare-nginx CF-RAY: 34d846c9a9824ecc-DME [1] => https://www.myenvialia.com/quotes/api/results/column?deliveryTimes=1 )

What is not doing right? :(

  • Is the data you sent exactly 1051 in size? - teran
  • @teran All data was taken from the browser. - lol
  • I also noticed when I remove the requestverificationtoken line in the header, the response to the request is changing .. Is the token protection possible? - LOL
  • Do you think the token is there for the sake of what? - teran
  • Well, not for the view clearly) Circumventing fail, right? - lol

0