473,574 Members | 2,393 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

php, cURL and javascript

Greetings,

I apologize for my lack of literacy with php, but am wondering if someone
will tell me how to use the curl php functions to navigate to the page that
results from entering the login and password at
https://retire.hartfordlife.com/Hart...ine/login.html and clicking the
"Log In" button please.

My intention is to cron the script so that I can automatically retrieve my
account balance every morning, but the javascript is the only roadblock for
me when using curl alone. http://us2.php.net/manual/en/ref.curl.php implies
that it's possible somehow, but I'm at a loss to figure out the coding on my
own.

Thank you for your help.
Jun 27 '08 #1
7 5062
h.stroph wrote:
Greetings,

I apologize for my lack of literacy with php, but am wondering if someone
will tell me how to use the curl php functions to navigate to the page that
results from entering the login and password at
https://retire.hartfordlife.com/Hart...ine/login.html and clicking the
"Log In" button please.

My intention is to cron the script so that I can automatically retrieve my
account balance every morning, but the javascript is the only roadblock for
me when using curl alone. http://us2.php.net/manual/en/ref.curl.php implies
that it's possible somehow, but I'm at a loss to figure out the coding on my
own.

Thank you for your help.
You might be able to get by the javascript on this page just by posting
the values - not sure, because I haven't looked closely at what the
javascript does. It might work, however.

But the next question is - what about the following page(s)? Do they
require javascript, also?

Have you asked the webmaster how you can do it? They might not care for
what you want to do, among other things (lots of companies don't like
automatic submission like this). Or they may have another way for you
to get the information.

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===

Jun 27 '08 #2
h.stroph wrote:
Greetings,

I apologize for my lack of literacy with php, but am wondering if someone
will tell me how to use the curl php functions to navigate to the page that
results from entering the login and password at
https://retire.hartfordlife.com/Hart...ine/login.html and clicking the
"Log In" button please.

My intention is to cron the script so that I can automatically retrieve my
account balance every morning, but the javascript is the only roadblock for
me when using curl alone. http://us2.php.net/manual/en/ref.curl.php implies
that it's possible somehow, but I'm at a loss to figure out the coding on my
own.

Thank you for your help.

The JavaScript itself do NOTHING but submit the form to itself.
So if I read the code correctly, you need the following variables
to be passed to https://retire.hartfordlife.com/Hart...ine/login.html

The variables needed are:
- 'target' ='MultiRole'
- 'user' =YOUR USERNAME
- 'password' =YOUR PASSWORD

If everything wet fine, **should** cURL should return your "Home Page"
(ie. the page you see when you've successfully logged in)

But as Jerry pointed out, the webmaster might provide an API for you
to access the page programmaticall y.
Hendri Kurniawan
Jun 27 '08 #3
In news:g2******** **@registered.m otzarella.org,
Jerry Stuckle <js*******@attg lobal.nettyped:
>I apologize for my lack of literacy with php, but am wondering if
someone will tell me how to use the curl php functions to navigate
to the page that results from entering the login and password at
https://retire.hartfordlife.com/Hart...ine/login.html and
clicking the "Log In" button please.

My intention is to cron the script so that I can automatically
retrieve my account balance every morning, but the javascript is the
only roadblock for me when using curl alone.
http://us2.php.net/manual/en/ref.curl.php implies that it's possible
somehow, but I'm at a loss to figure out the coding on my own.

You might be able to get by the javascript on this page just by
posting the values - not sure, because I haven't looked closely at
what the javascript does. It might work, however.
A simple posting of the values was of course the very first thing I tried.
The URL was included so that if someone was inclined to help they could see
the details.
But the next question is - what about the following page(s)? Do they
require javascript, also?
No they do not.
Have you asked the webmaster how you can do it?
The web "master" does not respond to such queries, and my question was how
to use the php curl functions to login to the site, something better suited
to the people here who are well-versed in php.
Jun 27 '08 #4
h.stroph wrote:
In news:g2******** **@registered.m otzarella.org,
Jerry Stuckle <js*******@attg lobal.nettyped:
>>I apologize for my lack of literacy with php, but am wondering if
someone will tell me how to use the curl php functions to navigate
to the page that results from entering the login and password at
https://retire.hartfordlife.com/Hart...ine/login.html and
clicking the "Log In" button please.

My intention is to cron the script so that I can automatically
retrieve my account balance every morning, but the javascript is the
only roadblock for me when using curl alone.
http://us2.php.net/manual/en/ref.curl.php implies that it's possible
somehow, but I'm at a loss to figure out the coding on my own.
You might be able to get by the javascript on this page just by
posting the values - not sure, because I haven't looked closely at
what the javascript does. It might work, however.

A simple posting of the values was of course the very first thing I tried.
The URL was included so that if someone was inclined to help they could see
the details.
>But the next question is - what about the following page(s)? Do they
require javascript, also?

No they do not.
>Have you asked the webmaster how you can do it?

The web "master" does not respond to such queries, and my question was how
to use the php curl functions to login to the site, something better suited
to the people here who are well-versed in php.
My point is - if the webmaster doesn't respond to such queries, then
they may not want you automating such actions. They would be entirely
within their rights to lock you out of online access to your account in
that case.

So what happened when you tried to post the correct values?

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===

Jun 27 '08 #5
In news:g3******** **@registered.m otzarella.org,
Jerry Stuckle <js*******@attg lobal.nettyped:
So what happened when you tried to post the correct values?
curl -F user="username" -F password="passw d"
https://retire.hartfordlife.com/Hart...ine/login.html

just returns the same page. Of course the correct user and password were
used.
Jun 27 '08 #6
Greetings, h.stroph.
In reply to Your message dated Tuesday, June 17, 2008, 00:19:53,
>So what happened when you tried to post the correct values?
curl -F user="username" -F password="passw d"
https://retire.hartfordlife.com/Hart...ine/login.html
just returns the same page. Of course the correct user and password were
used.
curl -i ....
Will help you for debugging purposes.
--
Sincerely Yours, AnrDaemon <an*******@free mail.ru>

Jun 27 '08 #7
h.stroph wrote:
In news:g3******** **@registered.m otzarella.org,
Jerry Stuckle <js*******@attg lobal.nettyped:
>So what happened when you tried to post the correct values?

curl -F user="username" -F password="passw d"
https://retire.hartfordlife.com/Hart...ine/login.html

just returns the same page. Of course the correct user and password were
used.
Which shows you're not sending the proper information.

Get the "Live HTTP Headers" plugin for firefox and look at what needs to
be sent. Then try to duplicate it.

Note that the site also uses cookies, so you'll have to handle those,
also. Chances are you'll have to retrieve the login page to get the
cookie, then submit the form. There may be other fields which need to
be posted, also.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===

Jun 27 '08 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2922
by: Haluk Durmus | last post by:
Hello I checked out openssl,mm,apr,apr-util,apache 2,curl,libxml and php from cvs. php couse an ERROR I did the following steps:
9
8751
by: Dave Martin | last post by:
I've successfully used CURL to maneuver around and through sites but a new site I've been trying to work with has got me stumped. To retrieve the data I'm trying to get a login is required. If you go to any page in the "member" area without logging in you get directed to a https connection and hit login.php (ie: you end up at...
9
12578
by: Conrad F | last post by:
Hi, If any Microsoft people are listening.... Are there any plans for the new web language called "Curl" to be supported in .NET (ASP.NET)? I ask as Curl represents the first step to true OO programming of web pages and not just running "scripts" which have in-roads into service DLLs of other languages such as C#. Surely MS will put Curl...
2
3845
by: Tom Szabo | last post by:
"Tom Szabo" <tom@intersoft.net.au> wrote in message news:419fe530$1@dnews.tpgi.com.au... > Hi All, > > I have a page and inside the page I have an IFRAME. From the page I like to > change the content of the IFRAME (that is inside the same page) depending > on which control the user presses. The chage would be triggered by the > control...
1
13249
by: ynotssor | last post by:
Hello, can someone please tell me the correct way to use "curl" to complete an online form? I am trying to eventually retrieve my account balance via a cron job that will email me the parsed output of the web page that gets returned from the curl form completion. The page I am trying to access is https://retire.hartfordlife.com/index.html...
0
5847
by: nfhm2k | last post by:
I've been trying to find a solution to this for quite some time now... I even took a look at existing scripts... Including this one... http://groups.google.co.uk/group/comp.lang.php/browse_thread/thread/2e052386da903425/b03ec83ac55273a2?lnk=st&q=&rnum=1#b03ec83ac55273a2 Everyone on that post seems to say its to do with the cookie's, yet...
1
2305
by: GeoffreyF67 | last post by:
There is a social bookmarking site here: http:// onlywire.com that I'm trying to login and post to via curl. It's using ajax and I haven't been able to figure out how to post to it so far. This is actually the first time I've ever seen a page that I can't post to with curl. Anyone have any ideas how to do it?
3
4204
by: adamalton | last post by:
Hi, I am using cURL with php to submit a form to a website and then retrieve the page that comes back. That part is easy. The problem is that the site I am posting the request to displays a 'please_wait' page which then redirects you to the page that you actually want to see. I can deal with this fine if I am only sending one request, but the...
1
1581
by: Teamwolf | last post by:
Hi, I am currently finishing integration with a third party payment gateway and my own bespoke shopping cart. Currently:- My checkout process page adds all the order and customer data to my database tables. There is an HTML form in the HTML of that page that is submitted by JavaScript onload that posts the required data I have already...
0
8040
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7800
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8092
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6437
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5296
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3738
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3745
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1332
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1051
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.