Hi - i’m trying to connect to the pizza hut postcode validator using CURL but it doesn’t seem to be working. I have a feeling it has something to do with the headers. Any ideas?
That URL performs a redirect (302), and when it does so create/updates the ASP.net cookie referencing the previously supplied postcode. You need to store the cookie so the subsequent request knows what postcode you searched for.
A quick search on “curl php cookies” should bear fruit.
I am pretty sure you are doing it wrong. I don’t think you should be hard-coding the cookie value to your script. Instead you need to set a path to a file that will store your cookies. CURL will then be able to reuse the previously set cookie, just like the real browser does.