You are here:  » How do I select the data of only a single record?


How do I select the data of only a single record?

Submitted by new_user on Tue, 2007-01-23 02:15 in

http://rss.api.ebay.com/ws/rssapi?FeedName=SearchResults&siteId=0&language=en-US&output=RSS20&sacqy=&catref=C5&sacur=1&sorefinesearch=1&fsop=3&fsoo=1&from=R14&sacqyop=ge&saprclo=&sascs=2&saprchi=&saaff=afdefault&ftrv=1&ftrt=1&fcl=3&afcj=2112762&nojspr=y&frpp=25&satitle=race+car&sacat=-1&saslop=1&afmp=&fss=0&saatc=1

i want the data of the 1st record only

how would i do this?

thanks

Submitted by support on Tue, 2007-01-23 04:46

Hi,

That's no problem - Magic Parser will stop reading the file if you return TRUE from your record handler function; for example:

<?php
  
require("MagicParser.php");
  function 
myRecordHandler($record)
  {
    
print_r($record);
    return 
true;
  }
  
MagicParser_parse("http://rss.api.ebay.com/ws/rssapi?FeedName=SearchResults&siteId=0&language=en-US&output=RSS20&sacqy=&catref=C5&sacur=1&sorefinesearch=1&fsop=3&fsoo=1&from=R14&sacqyop=ge&saprclo=&sascs=2&saprchi=&saaff=afdefault&ftrv=1&ftrt=1&fcl=3&afcj=2112762&nojspr=y&frpp=25&satitle=race+car&sacat=-1&saslop=1&afmp=&fss=0&saatc=1","myRecordHandler","xml|RSS/CHANNEL/ITEM/");
?>

Hope this helps!
Cheers,
David.

Submitted by new_user on Tue, 2007-01-23 16:55

works great

thanks!