Article #1160
Subject: [MOO-coders] $network:open() to access web pages problem
Author: rv
Posted: 1/2/2004 04:46:56 PM
When executing the follwing script: @program #2:web host = "moo.kcc.hawaii.edu"; conn = $network:open("moo.kcc.hawaii.edu", 80); notify(conn, "GET /" + "~survey/tmp/test.txt" + " HTTP/1.0"); notify(conn, ""); while ($network:is_open(conn)) line = $network:read(conn); player:tell(line); endwhile $network:close(conn); . I obtain the follwing output: HTTP/1.1 200 OK Date: Fri, 02 Jan 2004 22:46:56 GMT Server: Apache/1.3.27 (Unix) (Red-Hat/Linux) mod_ssl/2.8.12 OpenSSL/0.9.6b DAV/1.0.3 PHP/4.2.3 mod_perl/1.26 Last-Modified: Fri, 02 Jan 2004 22:24:53 GMT ETag: "396346-8c-3ff5efb5" Accept-Ranges: bytes Content-Length: 140 Connection: close Content-Type: text/plain blabla:1212121212 bloublou:5654656464 bliblibli:23552352 qweqeqweqweqe:342342 fdfpoernerkenrwe:54534655 dfsjnfkjwenrewr:67657456 lastline; Invalid argument which is great until the last line: ---> Invalid argument Anybody could help me out figuring out what I'm doing wrong? Thank you, _______________________________________________ Moo-coders mailing list Moo-coders@nospam http://www.moo-cows.com/mailman/listinfo/moo-coders