I want to access my <a href="http://half.ebay.com">half.ebay.com</a> account automatically from my linux
machine. As far as I learned till now, if I manually login once with
firefox browser and then use the firefox cookies I can easily get any
https webpages with wget:<br>
<br>
wget --load-cookies
~/.mozilla/firefox/6fv0lggm.default/cookies.txt&nbsp;
<a href="https://account.half.ebay.com/ws/eBayISAPI.dll?MyAccountSummary">https://account.half.ebay.com/ws/eBayISAPI.dll?MyAccountSummary</a><br>
<br>
But the problem is that this cookie expires every 24 hour and I have to
manually log in once a day, just to refresh the cookies.txt file; which
is a pain and that's what I'm doing now!<br>
<br>
Fortunately, I found the following piece of php code in some ebay forum
a few days a go. I went thru php and curl webpages to figure out what
should I do, but still I have NO IDEA how to use this code :-)
help!&nbsp; I even don't know if it works or not!<br>
<br>
***********************************************************************************************************************************<br>
$ebay_user_id = &quot;yourusername&quot;; // ebay id<br>
$ebay_user_password = &quot;yourpassword&quot;; // ebay password<br>
$emailaddress = &quot;&quot;; //email address status about uploads will goto<br>
$cookie_file_path = &quot;cookie&quot;; // cookie file (dont bother changing)<br>
<br>
// 1 - Get the Cookies required to login from the welcome login page<br>
<br>
$LOGINURL = &quot;<a href="http://signin.ebay.com/aw-cgi/eBayISAPI.dll?SignIn">http://signin.ebay.com/aw-cgi/eBayISAPI.dll?SignIn</a>&quot;;<br>
$agent = &quot;Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)&quot;;<br>
$ch = curl_init();<br>
curl_setopt($ch, CURLOPT_URL,$LOGINURL);<br>
curl_setopt($ch, CURLOPT_USERAGENT, $agent);<br>
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);<br>
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);<br>
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path);<br>
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path);<br>
$result = curl_exec ($ch);<br>
curl_close ($ch);<br>
<br>
// 2 - Post Login Cookies and Login Information to Page <a href="http://signin.ebay.com/aw-cgi/eBayISAPI.dll">http://signin.ebay.com/aw-cgi/eBayISAPI.dll</a><br>
<br>
$LOGINURL = &quot;<a href="http://signin.ebay.com/aw-cgi/eBayISAPI.dll">http://signin.ebay.com/aw-cgi/eBayISAPI.dll</a>&quot;;<br>
$POSTFIELDS =
'MfcISAPICommand=SignInWelcome&amp;siteid=0&amp;co_partnerId=2&amp;UsingSSL=0&amp;ru=&amp;pp=&amp;pa1=&amp;pa2=&amp;pa3=&amp;i1=-1&amp;pageType=-1&amp;userid='.
$ebay_user_id .'&amp;pass='. $ebay_user_password;<br>
$reffer = &quot;<a href="http://signin.ebay.com/aw-cgi/eBayISAPI.dll?SignIn">http://signin.ebay.com/aw-cgi/eBayISAPI.dll?SignIn</a>&quot;;<br>
<br>
$ch = curl_init();<br>
curl_setopt($ch, CURLOPT_URL,$LOGINURL);<br>
curl_setopt($ch, CURLOPT_USERAGENT, $agent);<br>
curl_setopt($ch, CURLOPT_POST, 1);<br>
curl_setopt($ch, CURLOPT_POSTFIELDS,$POSTFIELDS);<br>
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);<br>
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);<br>
curl_setopt($ch, CURLOPT_REFERER, $reffer);<br>
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path);<br>
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path);<br>
$result = curl_exec ($ch);<br>
***********************************************************************************************************************************<br>