darren-w-
asked on
Login and monitor webpage
Hi,
I would like to write a program in Java to login to a secure website and monitor a job list, I think it will need to take a session cookie, and once it is on the page it will need to call a refresh page button, and detect if any new jobs appear on the a job list. What direction should I be going in initally? I would like it to run as a notifier on the desktop or by sending an email.
Has anyone had any experience with doing this before?
I would like to write a program in Java to login to a secure website and monitor a job list, I think it will need to take a session cookie, and once it is on the page it will need to call a refresh page button, and detect if any new jobs appear on the a job list. What direction should I be going in initally? I would like it to run as a notifier on the desktop or by sending an email.
Has anyone had any experience with doing this before?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks,
dravidnsr: No. dont want to monitor users
for_yan: Not so sure if this will work, the site I'm looking at supplies a session cookie, and the above script does not seem to do any cookie handling?
Original question was typed on my ipod touch so was a bit short, so to expand on it:
The site I would like to login to, uses a php page that posts login details to a server if the details are correct, the system supplies a session cookie and redirects the user to another page that holds a div of available dictation jobs, the java will need to refresh the remote page, passing any cookie details to the page and anything else to it that may be required, and then read the list of available jobs in the div.
I would then like to have a simple notifier that gives the logged in user updates when jobs on the website come available, would like to extend it to text and email in the future.
Darren
dravidnsr: No. dont want to monitor users
for_yan: Not so sure if this will work, the site I'm looking at supplies a session cookie, and the above script does not seem to do any cookie handling?
Original question was typed on my ipod touch so was a bit short, so to expand on it:
The site I would like to login to, uses a php page that posts login details to a server if the details are correct, the system supplies a session cookie and redirects the user to another page that holds a div of available dictation jobs, the java will need to refresh the remote page, passing any cookie details to the page and anything else to it that may be required, and then read the list of available jobs in the div.
I would then like to have a simple notifier that gives the logged in user updates when jobs on the website come available, would like to extend it to text and email in the future.
Darren
ASKER
So I'm assuming that the script will be using the Cookie and URL classes?
Perhaps check this one:
http://www.rgagnon.com/javadetails/java-0092.html
Some folks are very optimistic on the variant above:
http://stackoverflow.com/questions/2552753/authentication-and-session-in-java
No, probably those folks which I posted above are thinking more from the server point of view and you are looking at it from the client side
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks, some good idea's there, not going to progress this for now, but will distribute points respectively
Did you try to access this page using the code similar to that given in the link below:
http://www.1your.com/drupal/LoginToWebsiteByHTTPPOSTCodeListing
If you can login this way, then you can probably parse the response for the list of jobs,
and then you can start java process and keep it sleeping for some time
and then requesting page after some interval.
Or in some situation you can just create scheduled task on windows
or cron job on Unix,each time making one request. Of course you can the send an email to notify users
or do wahtever you want with the retrieved data