Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#30 spider for amazon - automatic login

open
nobody
None
5
2005-07-11
2005-07-11
Anonymous
No

I have just wrote simple crwaler to get list of
products that I'm selling on amazon with their prices
and other stuff but I don't know how to automatically
log into amazon. I can't submit form,
fields are filled but I don't know how to submit form,
there is a graphic button without name, only with value
set.

the code for login:

<?php
include_once("Snoopy.class.php");

$snoopy = new Snoopy;
$url =
'http://www.amazon.co.uk/gp/sign-in.html/202-5935139-3894230?%5Fencoding=UTF8&path=%2Fgp%2Fseller-account%2Finventory%2Flist-inventory.html&mode=&useRedirectOnSuccess=0&query=%2AVersion%2A%3D1%26%2Aentries%2A%3D0&protocol=http';
$to_post['email'] = 'userName';
$to_post['action'] = 'sign-in';
$to_post['password'] = '********';
$to_post['sign-in'] = 'Continue';
$snoopy->submit($url, $to_post);
echo $snoopy->results;
?>

regards
Korb

korb_AT_cosi_D0T_pl

Discussion