Hi,
Platform: Apache, Linux, Perl 5.*
I am attempting to create a remote login for ebay.
How Ebays Login Works (from your browser):
1. You fill out the form and submit it.
2. Ebay returns and HTML page the contains javascript functions.
3. When the page is loaded in your browser the javascript is executed. These javascript functions
-set the cookie on your browser (required by Ebay)
-and submit a another form to send you to the user page
What I have working:
My perl script fills out the login form at ebay and returns the html page mentioned in number 2. What I need to know is how can I execute the javascript functions on this html page?
My perl code:
use LWP::UserAgent;
use HTTP::Request::Common;
my $ua = LWP::UserAgent->new;
$ua->env_proxy;
use HTTP::Cookies; $ua->cookie_jar(HTTP::Cookies->new);
$ua->request(GET " # to set cookies
my $r=$ua->request(POST " [
"MfcISAPICommand" => "SignInWelcome", # hidden
"siteid" => "0", # hidden
"co_partnerId" => "2", # hidden
"UsingSSL" => "0", # hidden
#more parameters sent here
"pageType" => "174", # hidden
"userid" => "userid", # text
"pass" => "password", # password
],
Referer => ");
$content=$r->content;
#$content now contains the html page
#with the javascript functions.
#how do I execute the javascript functions
#in $content?
SAMPLE HTML PAGE RETURN IN $CONTENT
______________________________________
<HTML>
<SCRIPT Lanuage="text/javascript">
<!--
function writecookie(){
;//ebay cookie is set here
}
//-->
</SCRIPT>
<BODY>
<FORM action="ebayactionform" method=post name=f1>
<INPUT TYPE="hidden" Name="ebaysignin" value="in">
</FORM>
<SCRIPT Language="text/javascript">
<!--
writecookie();
//the html page return also
//contains a form that is
//submitted using javascript
document.f1.submit();
//-->
</BODY>
</HTML>
______________________________
Does any one have any suggestions?
Thanks Janie
Platform: Apache, Linux, Perl 5.*
I am attempting to create a remote login for ebay.
How Ebays Login Works (from your browser):
1. You fill out the form and submit it.
2. Ebay returns and HTML page the contains javascript functions.
3. When the page is loaded in your browser the javascript is executed. These javascript functions
-set the cookie on your browser (required by Ebay)
-and submit a another form to send you to the user page
What I have working:
My perl script fills out the login form at ebay and returns the html page mentioned in number 2. What I need to know is how can I execute the javascript functions on this html page?
My perl code:
use LWP::UserAgent;
use HTTP::Request::Common;
my $ua = LWP::UserAgent->new;
$ua->env_proxy;
use HTTP::Cookies; $ua->cookie_jar(HTTP::Cookies->new);
$ua->request(GET " # to set cookies
my $r=$ua->request(POST " [
"MfcISAPICommand" => "SignInWelcome", # hidden
"siteid" => "0", # hidden
"co_partnerId" => "2", # hidden
"UsingSSL" => "0", # hidden
#more parameters sent here
"pageType" => "174", # hidden
"userid" => "userid", # text
"pass" => "password", # password
],
Referer => ");
$content=$r->content;
#$content now contains the html page
#with the javascript functions.
#how do I execute the javascript functions
#in $content?
SAMPLE HTML PAGE RETURN IN $CONTENT
______________________________________
<HTML>
<SCRIPT Lanuage="text/javascript">
<!--
function writecookie(){
;//ebay cookie is set here
}
//-->
</SCRIPT>
<BODY>
<FORM action="ebayactionform" method=post name=f1>
<INPUT TYPE="hidden" Name="ebaysignin" value="in">
</FORM>
<SCRIPT Language="text/javascript">
<!--
writecookie();
//the html page return also
//contains a form that is
//submitted using javascript
document.f1.submit();
//-->
</BODY>
</HTML>
______________________________
Does any one have any suggestions?
Thanks Janie