Hi!  I'm sure lots of you have already tackled this, and so I hope
someone can help!!!  
 
 I'm trying to write a PHP script to make it as easy as 1 or 2 clicks
for me to launch my auctions, and I'm writing a db routine to handle
payments, auto reminders and print out packing labels etc... so I'm not
dependant on someone else's server / service etc...  And like many
people, I'm having a problem with the way ebay works with cookies when
signing in!

  I've found lot's of code and this piece is 99% not mine, but I forget
where I found it, it gets as close to logging in as I've seen, but when
you run it, you'll see that the little ('Sign In') at the top right of
the screen isn't correct, when it works it should be ('Sign Out')

  So I'd love any suggestions, hints, help, or even working code!

Thank you all in advance!!!

<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";);

?>



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

Reply via email to