|
|
[Perlfect-search] Search to php - wrapper doesn't work
Christian Mund info@1516-online.de
Mon, 30 Jul 2001 18:44:42 +0200
Hello,
I use perlfect-search, all other sites are written in php. A few weeks
ago Daniel has send me a wrapper
(php):
--------------------------------------------------
<... html or php - code>
<?
$search_url = "http://www.1516-online.de/cgi-bin/search/search.pl";
$url = $search_url."?";
$url .= "&q=".urlencode($q);
$url .= "&p=".urlencode($p);
$url .= "&lang=".urlencode($lang);
$url .= "&mode=".urlencode($mode);
$file = fopen($url, "r") or die ("Can't open file $url");
$result = fread($file, 100000);
fclose($file);
print $result;
/* Call this function of every output to avoid cross site scripting
attacks: */
function strip_html($str) {
$str = stripslashes($str);
$str = preg_replace("/[<>\"'&]/", "", $str);
return $str;
}
?>
<html or php - code ...>
--------------------------------------------------
At home (http://localhost) everything works. But in the internet - I
think I have modified all - I get
the following message:
--------------------------------------------------
Warning:
fopen("http://www.1516-online.de/cgi-bin/search320/search.pl?&q=irgendwas&p=1&lang=&mode=any","r")
-
Success in
/homepages/3/d26097787/htdocs/cgi-bin/search320/templates/template.php
on line 19
Can't open file
http://www.1516-online.de/cgi-bin/search320/search.pl?&q=irgendwa&p=1&lang=de&mode=any
--------------------------------------------------
Could you, Daniel, or somebody else help me? Why does it work local and
why doesn't it in the net?
Thanks, Christian
|
|