
So gut kenne ich mich mit PHP nicht aus, aber exec is IMHO nur für "lokale" Programme gedacht und nicht für GET-Requests. Außerdem solltest Du das Newline weglassen. Du könntest mit der Curl-Bibliothek arbeiten: |$url = "http*:*//www.example.com/page.htm"; | |$curl = curl_init (); | |curl_setopt ($curl, CURLOPT_URL, $url); | |curl_setopt ($curl, CURLOPT_HEADER, 0); | |curl_setopt ($curl, CURLOPT_RETURNTRANSFER, 1); | |$result = curl_exec ($curl); | |curl_close($curl); | |print $result;| Oder mit file $lines = file("http://www.example.com/"); foreach ($lines as $line) { // Do something. eg. $line = "document.write('".$line."')"; //watch out for escaping quotes etc. print $line; } oder mit include: |include ("http*:*//www.example.com/page.htm");| || |(alles ungetestet)| || Aber es sei Dir noch geraten, den Parameter in 'what' zu überprüfen, sonst hast Du mögliche Sicherheitslücken! Gruß, Renée Dipl.-Ing. Niedermayer Andreas (FH) schrieb:
Hallo!
Ich würde gern eine FAQ Site in PHP machen welche mir einfach nur ein QuickSearch macht. Hier mal ein auszug meiner php-site
echo "<body>"; echo "<h1>FAQ</h1>";
if (!isset($_REQUEST['submit'])) { echo "<form action='$PHP_SELF' method='post'>"; echo "<table style='width: 280px; margin-top: 10px;'> <tr> <td width='80px'>What:</td> <td><input type='text' name='what' /></td> </tr> <tr> <td colspan=2 style='text-align: center;'> <input type='submit' name='submit' value='send'> </td> </tr> </table>";
echo "</form>"; } else { $str = "http://myserver.com/otrs/public.pl?Action=PublicFAQ&Subaction=Search&Submit=yes&QuickSearch=1&CategoryIDs=0&What=".$_REQUEST['what']."\n";
echo $str;
exec($str, $output); foreach ($output as $value) { echo $value + "\n"; }
echo "<a href='$PHP_SELF'>zurück</a>"; }
echo "</body> </html>"; ?>
Kann mir da mal wer weiterhelfen. Ich bekomme einfach keinen Output.
Lg Andreas ------------------------------------------------------------------------
_______________________________________________ OTRS-de Mailingliste: otrs-de - Webpage: http://otrs.org/ Archiv: http://lists.otrs.org/pipermail/otrs-de/ Listenabo verwalten: http://lists.otrs.org/cgi-bin/listinfo/otrs-de/ Support oder Consulting fuer Ihr OTRS System? => http://www.otrs.com/