Solved

Login and monitor webpage

Posted on 2011-02-22
8
291 Views
Last Modified: 2012-05-11
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?
0
Comment
Question by:darren-w-
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 20

Assisted Solution

by:Sathish David Kumar N
Sathish David  Kumar N earned 150 total points
ID: 34978319
You mean need to watch(monitor) each and every transcation of the login user thats possible in spring framwork ...
auditing api they have
0
 
LVL 47

Expert Comment

by:for_yan
ID: 34991100


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



0
 
LVL 13

Author Comment

by:darren-w-
ID: 35004917
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
0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
LVL 13

Author Comment

by:darren-w-
ID: 35004924
So I'm assuming that the script will be using the Cookie and URL classes?
0
 
LVL 47

Expert Comment

by:for_yan
ID: 35005027
0
 
LVL 47

Expert Comment

by:for_yan
ID: 35005058
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
0
 
LVL 47

Accepted Solution

by:
for_yan earned 350 total points
ID: 35013276
It still looks like all this stuff they are writing about CookieHandler class and examples
of its use should be really relevant for your task. I'm not claiming that I understand
100% of it, in particular, I could not find example where all this
cookie activity shown below is combined with initial authentication, but
probably if one reads it more attentively it may become obvious:

http://www.hccp.org/java-net-cookie-how-to.html

http://download.oracle.com/javase/1.5.0/docs/guide/deployment/deployment-guide/cookie_support.html

http://www.java2s.com/Code/Java/JDK-6/UsingCookieHandlerinJava5.htm
0
 
LVL 13

Author Closing Comment

by:darren-w-
ID: 35054753
Thanks, some good idea's there, not going to progress this for now, but will distribute points respectively
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Suggested Courses

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question