Click here to get back home

php, cURL and javascript

 HomeNewsGroups | Search | About
 comp.lang.php    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
php, cURL and javascript h.stroph 06-13-2008
Get Chitika Premium
Posted by h.stroph on June 13, 2008, 3:02 pm
Please log in for more thread options
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/HartfordOnline/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.



Posted by Jerry Stuckle on June 13, 2008, 4:45 pm
Please log in for more thread options
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/HartfordOnline/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.
jstucklex@attglobal.net
==================


Posted by h.stroph on June 16, 2008, 1:44 pm
Please log in for more thread options

>> 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/HartfordOnline/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.



Posted by Jerry Stuckle on June 16, 2008, 2:03 pm
Please log in for more thread options
h.stroph wrote:
>
>>> 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/HartfordOnline/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.
jstucklex@attglobal.net
==================


Posted by h.stroph on June 16, 2008, 4:19 pm
Please log in for more thread options

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

curl -F user="username" -F password="passwd"
https://retire.hartfordlife.com/HartfordOnline/login.html

just returns the same page. Of course the correct user and password were
used.



Similar ThreadsPosted
CURL Problem.. Comparing output from IE/CURL differs November 7, 2005, 1:51 pm
cURL, PHP, and SSL March 10, 2006, 5:21 am
How to use CUrl September 6, 2006, 9:46 am
curl twice November 15, 2006, 4:54 am
help on using curl July 2, 2007, 5:08 am
CURL and SSL August 9, 2007, 8:42 am
cURL lib September 28, 2007, 5:16 pm
cURL help please October 12, 2007, 12:04 pm
So let me get this straight about CURL August 25, 2004, 7:28 pm
PHP, Curl and GoDaddy May 8, 2005, 11:12 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap