It's all in my first post. The problem, sample code, how it works manually, and how it doesnt work with code. so I must be reading my own post wrong, it's all there as I see it. so i'll try and expand and maybe I can make it clearer what my problem is.
MarkR wrote:
1. What you're trying to achieve using the CURL POST
I'm trying to make my script run some forms and read the data on my companies internal site that was wrote in .aspx by a 3rd party that doesnt work for my company any more.
MarkR wrote:2. What error message / HTTP response you get from the other site
As stated in my first post, it's not an error message, but more simply the fact that when my script reloads the form and had tried to change a field, the form comes back unaltered. but do this manually with a browser and it works fine of course.
If I manually use a browser and change a form variable.....the page reloads and a form variable is set.
MarkR wrote:3. Please explain why you're trying to forget the user agent header? This is not something you should be doing.
I'm not sure what yer getting at here. If you are talking about
$agent = "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)";
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
that code, I'm trying to set it to this value as I was told once you should do this so it looks like a real browser.
MarkR wrote:If you're trying to scrape this page without permission, and it stops working, I have no sympathy with you whatsoever.
I dont have permission as I alluded to in my first post. But since the sites that I'm really working on are on my works intranet, and are private, I found the first site that I could find that would work as an example here. Better to work on a real example instead of abstract ideas IMHO
MarkR wrote:You're correct in suggesting that ASPX normally require a valid viewstate to correctly process a POST (simulating a button click). To resolve this, simply load the form first and parse the fields out.
There's probably my problem. When I look at the viewstate values in my firefox browser source, it's blank. and I was stumped at that point, which is why I came here. I was having trouble getting the value of viewstate to put it in my POSTFIELDS section. I'm wiling to take a stab once I get this set, it'll work. but having issues here just to get it.
thanks,
Chris