Login   Register  
PHP Classes

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Andy Pavlo  >  amazon_sell  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: An example on how to use the class
Class: amazon_sell
Automatically lists and removes items on Amazon
Author: By
Last change:
Date: 12 years ago
Size: 2,254 bytes


Class file image Download
$amazon_sell = new amazon_sell();

$email         "blah@aol.com";
$password      "blah";



$upc           = "978067187120852";
$price         = "4.99";
$postal_code   = "14623";
$comments      = "TEST ITEM NOT FOR SALE";
$condition     = CONDT_USED_LIKE_NEW;

// If our price is not accepted, use Amazon's minimum price


if ($amazon_sell->post_item()) {
   echo "Item added sucessfully!\n".
        "Exchange ID: ".$amazon_sell->getExchangeId()."\n";
} else {
   echo "Item Failed!\n".


$reason     = "TESTING SYSTEM";

// These are the exchange id's that should be listed with all the items
// you want to remove
$exchange   = Array( "Y03Y5861466Y6114471",

foreach ($exchange AS $key => $val) {
   echo "EXC ID: $val\n";


   if ($amazon_sell->remove_item()) {
      echo "Item Removed Succesfully!\n";
   } else {
      echo "Removal Failed\n".
   echo "-----------------------------------------------------------\n\n";