Simple example of API for Drupal

This is a simple example of how to use the API on a Drupal page. There is a more and better version coming [link]. But if you can't wait, here you go! I put this on an PHP enabled page:, rather than spring for .NET product that costs $250 (why-- I couldn't use it on a PHP site, and why not spend the time DIY coding it)?

<form action="product_search">
<input type="text" name="search" value="<? echo htmlentities($_GET['search']); ?>"/>
<input type="submit" value="Search"/>
$search_items = urlencode($_GET['search']);
// $search_items = 'eee';
$items = simplexml_load_file(''.$search_items);

if (($items) && (strlen($search_items) > 1)) {
print "<pre>\n";
foreach ($items->result->domain->{domain-listing} as $item) {
print l($item->title, $item->url)."<br/>";
print '</pre>';
else {
Search for products-- computers, eee pcs, sub-notebooks, and all that great stuff!