Re: Curl with asp pages....

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 27, 2008 at 7:12 PM, ioannes <ioannes@xxxxxxxxxxxxxx> 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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux