PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old February 27th, 2004, 06:47 AM
gat gat is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 24 gat User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Amazon webservice (php) stuck....

Hello, i have followed a tutorial to get the amazon web service working, and i have made this page.

http://cars.uk-graffiti.co.uk/test.php

However, i cant see where the search terms are programmed into the code to produce these results.

I presume, i make my own form and post to this page to get the results. At the moment, the code generates results for you but i can see where the search terms would go?

any ideas?

PHP Code:
<?php 
// include class 
include("nusoap.php"); 

// create a instance of the SOAP client object 
$soapclient = new 
soapclient("http://soap.amazon.com/schemas2/AmazonWebServices.wsdl"
true); 

// uncomment the next line to see debug messages 
// $soapclient->debug_flag = 1; 

// create a proxy so that WSDL methods can be accessed directly 
$proxy $soapclient->getProxy(); 

// get items from the catalog 
// sort order is default 
$catalogParams = array( 
            
'browse_node' => 18
            
'page'        => 1
            
'mode'        => 'books'
            
'tag'         => 'melonfire-20'
            
'type'        => 'lite'
            
'devtag'      => 'D3GW04LSIAVDCS' 
); 
$catalogResult $proxy->BrowseNodeSearchRequest($catalogParams); 
$catalogTotal $catalogResult['TotalResults']; 
$catalogItems $catalogResult['Details']; 

// get today's featured items 
// sort order is by featured items 
$featuredParams = array( 
            
'browse_node' => 18
            
'page'        => 1
            
'mode'        => 'books'
            
'tag'         => 'melonfire-20'
            
'type'        => 'lite'
            
'sort'        => '+pmrank'
            
'devtag'      => 'D3GW04LSIAVDCS' 
); 
$featuredResult $proxy->BrowseNodeSearchRequest($featuredParams); 
$featuredTotal $featuredResult['TotalResults']; $featuredItems 
$featuredResult['Details']; 

// get bestsellers 
// sort order is by sales ranking 
$bestsellersParams = array( 
            
'browse_node' => 18
            
'page'        => 1
            
'mode'        => 'books'
            
'tag'         => 'melonfire-20'
            
'type'        => 'lite'
            
'sort'        => '+salesrank'
            
'devtag'      => 'D3GW04LSIAVDCS' 
); 
$bestsellersResult 
$proxy->BrowseNodeSearchRequest($bestsellersParams); 
$bestsellersTotal $bestsellersResult['TotalResults']; 
$bestsellersItems $bestsellersResult['Details']; 

// format and display the results 
?>


I have tried changing books to music etc....but this just brings back an error....

bit stuck any help?
cheers

Reply With Quote
  #2  
Old February 27th, 2004, 11:12 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 14 m 9 sec
Reputation Power: 8
In your code, you're only getting a listing of the certain categories that Amazon offers...
If you want to search for a specific thing (let's say all Sean Connery dvds) try this:


PHP Code:
 $conneryParams = array( 
            
'page'        => 1
            
'mode'        => 'dvd'
            
'actorsearch' => 'Sean Connery',
            
'tag'         => 'melonfire-20'
            
'type'        => 'lite'
            
'sort'        => '+pmrank'
            
'devtag'      => 'D3GW04LSIAVDCS' 
); 
$conneryResult $proxy->BrowseNodeSearchRequest($conneryParams); 
$conneryTotal $conneryResult['TotalResults']; 
$conneryItems $conneryResult['Details']; 


This is off the top of my head... you may want to look into the AWS documentation for all the searching parameters

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > Amazon webservice (php) stuck....


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT