Forum Moderators: coopster
I want to show the results of smartsearch.cgi in my PHP page.
I have tried different options such as require, include, implode etc. All works sometimes and sometimes not.
I mostly tried with include and the code is as follows:
$keywords = $_GET['keywords'];
$search_n = (include ("http://mydomainxyz.com/cgi-bin/search_n/smartsearch.cgi?keywords=$keywords"));
$search_f = include ("http://mydomainxyz.com/cgi-bin/search_f/smartsearch.cgi?keywords=$keywords");
echo "$search_n";
echo "$search_f";
I have also tried with PATH rather URL but it works sometimes and sometimes not.
The error I got is from ERROR LOG.
PHP Warning: main(): Failed opening 'http://mydomainxyz.com/cgi-bin/search_n/smartsearch.cgi?keywords=abc' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php')
[22-Feb-2006 08:38:12] PHP Warning: main(http://mydomainxyz.com/cgi-bin/search_f/smartsearch.cgi?keywords=abc): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request
in /home/#*$!xx/public_html/search/search.php on line 7
Any Help will be highly appreiated.