Automatic update of auction site needed x min before the end of the auctions
[login to view URL]
HTML: [login to view URL]
Example of all user auctions:
[login to view URL][seller]=hando24
(auction dates buffered and refreshed only every x hour)
EXEPTIONS:::
Sometimes auctions get bidded so they cannot be updated anymore
Sometimes auction server is busy and all auctions are paused
Sometimes update needed for only x days not more
INPUT: username and password
OUTPUT: log: time:user:auction:status
Stable linux shell scrpit preferred. Any other coding welcome
PHP example below but hopefully there is simpler solution:
$latest= go('[login to view URL][seller]=joss');
$latest = get_between($latest, "Aega on", "MINU");
$id = substr($latest, strpos($latest, "item_id=")+8); // finding the item_id field
$id = substr($id, 0, strpos($id, """)); //cutting the id field until " mark
$latest = substr($latest, strpos($latest, "price ")); // parsing html for last item time left
$latest = substr($latest, strpos($latest, "class")+9);
$latest = substr($latest, strpos($latest, "class")+9);
$latest = substr($latest, 0, strpos($latest, "<"));
// die ($latest);
if( strpos($latest, "p") !== FALSE) {die("days to go or paused");} // abort if there is days for the last auction
$latest = substr($latest, 0, strpos($latest, "m")); //gettin the hours and minutes
$m= trim(substr($latest, -2));
$latest = substr($latest, 0, strpos($latest, "h"));
$h= trim(substr($latest, -2));
//$latest = preg_replace("/[^0-9,]+/","",$latest); // only numercal value so 11h 42m = 11,42
//list($user, $pass, $uid, $gid, $gecos, $home, $shell) = explode(":", $data);