
Added by roScripts on November-10-2007, 3:07 pm
function get_overture_results ( $term )
{
$url = "http://inventory.overture.com/d/searchinventory/suggestion/?term=". urlencode ( $term ) ."&mkt=us&lang=en_US";
$content = @file_get_contents ( $url );
$content = strip_tags ( $content );
$lines = explode ( "\n", $content );
$result = array ();
$i == 1;
foreach ( $lines as $element ) {
$first_letter = "";
if ( substr ( $element, 0, 6 ) == " " ) {
$element = str_replace ( " ", "", $element );
if ( ( $i%2 ) ) {
$number = trim ( $element );
}
else {
$keyword = trim ( $element );
preg_match ( "/^[+]?\d*$/", $number, $number_ver );
if ( ! empty( $number_ver [ 0 ] ) ) {
$result [ $keyword ] = $number;
}
}
}
$i ++;
}
return $result;
}
Added by roScripts on March-26-2008, 5:14 pm
Added by roScripts on March-26-2008, 5:13 pm
Added by roScripts on March-26-2008, 5:09 pm
Added by roScripts on March-26-2008, 5:08 pm
Added by roScripts on March-26-2008, 5:07 pm