summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngelo Cuccato <cookie@cuccato.net>2011-12-23 22:34:54 +0100
committerAngelo Cuccato <cookie@cuccato.net>2011-12-23 22:34:54 +0100
commit07bc29128c05dc5ef24917fd953341658dbc6f87 (patch)
treed2c18c247937df461f0fd61bbbdf893b1fa23ded
parent23d82fecb4d1e40f2ef8fe1ebc16455fa7221f0f (diff)
fix import with fsockopen
-rw-r--r--includes/pages/admin_import.php19
1 files changed, 13 insertions, 6 deletions
diff --git a/includes/pages/admin_import.php b/includes/pages/admin_import.php
index f8afb409..82cfbe1a 100644
--- a/includes/pages/admin_import.php
+++ b/includes/pages/admin_import.php
@@ -40,18 +40,25 @@ function admin_import() {
} else {
$fileOut = fopen($import_file, "w");
$head = 'GET /' . $PentabarfXMLpath . $_REQUEST["url"] . ' HTTP/1.1' . "\r\n" .
- 'Host: ' . $PentabarfXMLhost . "\r\n" .
- 'User-Agent: Engelsystem' . "\r\n" .
- 'Authorization: Basic ' .
- base64_encode($_REQUEST["user"] . ':' . $_REQUEST["password"]) . "\r\n" .
- "\r\n";
+ 'Host: ' . $PentabarfXMLhost . "\r\n" .
+ 'User-Agent: Engelsystem' . "\r\n" .
+ 'Authorization: Basic ' .
+ base64_encode($_REQUEST["user"] . ':' . $_REQUEST["password"]) . "\r\n" .
+ "\r\n";
fputs($fp, $head);
$Zeilen = -1;
+ echo "<pre>";
while (!feof($fp)) {
$Temp = fgets($fp, 1024);
+ // show header
+ if ($Zeilen == -1) {
+ echo $Temp;
+ }
+
// ende des headers
- if ($Temp == "f20\r\n") {
+ if ($Temp == "\r\n") {
+ echo "</pre>\n";
$Zeilen = 0;
$Temp = "";
}