git-svn-id: svn://svn.cccv.de/engel-system@160 29ba0400-6e00-0410-a75a-ca02368028f8
This commit is contained in:
cookie 2006-11-13 19:33:07 +00:00
parent 822ae3578d
commit c8713d0218
1 changed files with 9 additions and 7 deletions

View File

@ -48,10 +48,10 @@ if( isset($_POST["PentabarfUser"]) && isset($_POST["password"]) && isset($_POST[
echo "Update XCAL-File from Pentabarf.."; echo "Update XCAL-File from Pentabarf..";
//user uns password in url einbauen //user uns password in url einbauen
$FileNameIn = "https://". $FileNameIn = "pentabarf.cccv.de";/*.
$_POST["PentabarfUser"]. ":". $_POST["PentabarfUser"]. ":".
$_POST["password"]. "@". $_POST["password"]. "@".
$_POST["PentabarfURL"]; $_POST["PentabarfURL"];*/
//backup error messeges and delate //backup error messeges and delate
$Backuperror_messages = $error_messages; $Backuperror_messages = $error_messages;
$fp = fsockopen( $FileNameIn, 443, $errno, $errstr, 30); $fp = fsockopen( $FileNameIn, 443, $errno, $errstr, 30);
@ -59,21 +59,23 @@ if( isset($_POST["PentabarfUser"]) && isset($_POST["password"]) && isset($_POST[
if( !$fp) if( !$fp)
{ {
echo "$errstr ($errno)<br />\n"; echo "<h2>fail: File 'ssl://". $_POST["PentabarfURL"]. "' not readable!</h2>".
echo "<h2>fail: File 'https://". $_POST["PentabarfURL"]. "' not readable!</h2>"; "[$errstr ($errno)]<br>\n";
} }
else else
{ {
if( ($fileOut = fopen( "$Tempdir/engelXML", "w")) != FALSE) // if( ($fileOut = fopen( "$Tempdir/engelXML", "w")) != FALSE)
if( 1)
{ {
fputs( $fp, "GET / HTTP/1.0\r\n\r\n"); fputs( $fp, "GET / HTTP/1.0\r\n\r\n");
$Zeilen = 0; $Zeilen = 0;
while (!feof($fp)) while (!feof($fp))
{ {
$Zeilen++; $Zeilen++;
fputs( $fileOut, fgets($fp,128)); // fputs( $fileOut, fgets($fp,128));
echo fgets($fp,128);
} }
fclose( $fileOut); // fclose( $fileOut);
echo "<br>Es wurden $Zeilen Zeilen eingelesen<br>"; echo "<br>Es wurden $Zeilen Zeilen eingelesen<br>";
} }
else else