Hello All!

I hope someone can give me some good advice,

I'm trying to write a PHP script to make it easy for me to do my ebay
auctions, and I'm having problems dealing with the Cookies at Signin.

I _BELIEVE_ ( but I'm not sure ) that the problem is all about the
cookies.

I forget what site I found this script, but it's close, it'll show the
'Welcome to ebay' login screen, but you're not _actually_ logged in.  

I _think_ that ebay signs you in, and rechecks for the cookie, but can't
find it, and then signs you right out.

I'm not sure, any help would be great, thanks!

<HTML>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<?php

$useragent = 'Mozilla/4.0 (compatible; MSIE 6.01; Windows NT 5.0)'; 
$ch = curl_init('http://cgi3.ebay.com/aw-cgi/eBayISAPI.dll'); 
$cookiefile = 'cookie.txt'; 
// IS it the name of the cookie??  This cookie usually ends in up your
Apache system dir.

$uid="USERID";
$pss="PASSWORD";

curl_setopt($ch, CURLOPT_HEADER, 1); 
curl_setopt($ch, CURLOPT_VERBOSE, 1); 
curl_setopt($ch, CURLOPT_USERAGENT, $useragent); 
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookiefile); 
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookiefile); 
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
curl_setopt($ch,
CURLOPT_URL,"http://cgi3.ebay.com/aw-cgi/eBayISAPI.dll";); 
curl_setopt($ch, CURLOPT_POST, 1); 
curl_setopt($ch, CURLOPT_POSTFIELDS,
"MfcISAPICommand=SignInWelcome&userid=$uid&pass=$pss&keepMeSignInOption=
1"); 

//Maybe the problem is in the way the POST fields are posted to.
//I'm very new to CURL!

$page = curl_exec($ch); // execute the curl command 

echo "<pre>$page<BR><BR>CURL info<BR>"; 

print_r(curl_getinfo($ch));

curl_close($ch); 
print "<BR><BR>SERVER info<BR>";
print_r($_SERVER);
print "<BR><BR> Cookie info<BR>";
print_r($_COOKIE);

//include("http://cgi5.ebay.com/ws1/eBayISAPI.dll?ListItemForSale";);

?>

</BODY>
</HTML>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to