02 | $xmlDoc = new DOMDocument( ); |
03 | $xmlDoc ->load( "links.xml" ); |
04 | $x = $xmlDoc ->getElementsByTagName( 'link' ); |
10 | if ( strlen ( $q ) > 0 ) { |
12 | for ( $i =0; $i <( $x ->length); $i ++ ) { |
13 | $y = $x ->item( $i )->getElementsByTagName( 'title' ); |
14 | $z = $x ->item( $i )->getElementsByTagName( 'url' ); |
15 | if ( $y ->item(0)->nodeType == 1 ) { |
17 | if ( stristr ( $y ->item(0)->childNodes->item(0)->nodeValue, $q ) ) { |
20 | $z ->item(0)->childNodes->item(0)->nodeValue . "' target='_blank'>" . |
21 | $y ->item(0)->childNodes->item(0)->nodeValue . "</a>" ; |
24 | $hint = $hint . "<a href='" . |
25 | $z ->item(0)->childNodes->item(0)->nodeValue . "' target='_blank'>" . |
26 | $y ->item(0)->childNodes->item(0)->nodeValue . "</a>" ; |
36 | $response = "No suggestion" ; |
|