CVS update: php3/tests
Date: Sunday June 20, 1999 @ 6:27
Author: sas
Update of /repository/php3/tests
In directory php:/tmp/cvs-serv18894/tests
Modified Files:
sock_io.php3
Log Message:
some additional tests
Index: php3/tests/sock_io.php3
diff -u php3/tests/sock_io.php3:1.4 php3/tests/sock_io.php3:1.5
--- php3/tests/sock_io.php3:1.4 Tue Jun 8 11:02:41 1999
+++ php3/tests/sock_io.php3 Sun Jun 20 06:27:59 1999
@@ -6,9 +6,11 @@
# fetches one file and prints out how many bytes it has retrieve
-$host = "sockratte.schell.de";
-$port = 8081;
-$req = "GET /test.php3 HTTP/1.0\r\n\r\n";
+$host = "funweb.de";
+$port = 80;
+$uri = "/int21.php3";
+$req = "GET $uri HTTP/1.0\r\n\r\n";
+$url = "http://$host:$port$uri";
function get_request() {
global $host, $port, $allbuf, $req, $block;
@@ -18,14 +20,27 @@
$fp = pfsockopen($host, $port, &$a, &$b, 30);
else
$fp = fsockopen($host, $port, &$a, &$b, 30);
- if(!$fp) die("connection timed out\n");
+ if(!$fp) die("socket open failed ($a, $b)\n");
set_socket_blocking($fp, $block % 2);
fputs($fp, $req);
return $fp;
}
-$a = file("http://sockratte.schell.de/test.php3");
+echo "fopen/fpassthru\n";
+$fd = fopen($url, "r");
+fpassthru($fd);
+
+echo "readfile\n";
+readfile($url);
+
+echo "require\n";
+require($url);
+
+echo "include\n";
+include($url);
+
+$a = file($url);
echo join("", $a);
for($block = 0; $block < 2; $block++) {
Thread (1 message)
- sas