Yes, an API is what I am looking for.
I have tried to submit to the ward website and give it the login information and then try to access the page with the data on it, but I don't get any more than just the front page and menu.
It is like it is blocking anything unless it comes directly from the correct domain, probably for security. Anyway, I will contact Tom and see what I get.
Ability to login to Ward Website via Windows application
- mkmurray
- Senior Member
- Posts: 3266
- Joined: Tue Jan 23, 2007 9:56 pm
- Location: Utah
- Contact:
I have a codebase that successfully logs into the ward website and navigates to the membership list and scrapes family pictures and CSV downloads automatically from the site. Or at least it did as of like 6 months ago (and for the previous year and half before that). Logging into the ward website is tricky because you have to POST all the right form values to the right URL and keep track of your auth cookie and then redirect to the right URLs it tells you to go to. I mean I practically wrote a barebones web browser almost. But anyway, I used Firebug and viewed the HTML source constantly and did much trial and error to find the right combination of web requests to make.perkley wrote:Yes, an API is what I am looking for.
I have tried to submit to the ward website and give it the login information and then try to access the page with the data on it, but I don't get any more than just the front page and menu.
It is like it is blocking anything unless it comes directly from the correct domain, probably for security. Anyway, I will contact Tom and see what I get.
A short summary is that I first loaded up the login page and saved off any cookies I inherited just from that request. The next request is a post with several form values beside username and password, namely the input tags with hidden="true". The post request URL is the "action" attribute of the form tag. The response of that post will be more cookies and a URL you need to redirect to, which should be your ward's homepage at that point.