Re: Curl with asp pages....
| From: | Ashley Sheridan | Date: | Fri, 28 Nov 2008 10:47:13 +0000 |
| Subject: | Re: Curl with asp pages.... | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-283891@lists.php.net to get a copy of this message | ||
On Fri, 2008-11-28 at 01:13 -0500, Andrew Ballard wrote:
> On Thu, Nov 27, 2008 at 7:12 PM, ioannes <ioannes@btinternet.com> wrote:
> > What are the differences between asp and non-asp pages when you are curling
> > them? Apart from ,as referred to in php.net, you need to urlencode the post
> > values... Do you also need to urlencode the variable names? And if the
> > submit button on the page has javascript:WebForm_PostBackOptions, is that
> > going to cause any complexity? I have a working php curling script which
> > works on many sites, but this asp page returns error from the server (Error
> > Tracking Code: from server). I have seen problems described on the internet
> > with asp but apart from urlencode tip and that you need to submit the hidden
> > VIEWSTATE etc variables, I have not seen any other tips. I previously got
> > just the input page, so getting the error is actually progress, which I got
> > once I urlencoded the inputs, but clearly the inputs don't make sense to the
> > script somehow and suspect there is some general differences between asp and
> > non-asp pages for this purpose.
> > John
> >
>
> It sounds like you're talking about ASP.NET rather than just ASP. (ASP
> is simple enough that CURL usually shouldn't have any problems.)
> ASP.NET added VIEWSTATE, which is a hidden form field that contains an
> encoded value representing the entire form. It's a way for the server
> to determine that the data posted matches the form that requested it,
> as well as handling server-side actions that are triggered by
> javascript that ASP.NET embeds in the form. It is very likely that you
> will need to read the correct value of this field from the site prior
> to sending your data.
>
> There is a slight difference in how ASP handles multiple form fields
> that share the same name (as well as SELECT MULTIPLE lists) such that
> ASP does not need (and should not use) square brackets in field names
> the way PHP does.
>
> Andrew
>
I thought that square brackets were actually part of the HTML spec, not
PHP, so the fact that ASP.Net cannot use them is just another example of
M$ doing their own thing again...
Ash
www.ashleysheridan.co.uk