I'm having trouble with fopen. This is the site I'm testing it on:
http://myplanetside.station.sony.com/ou ... worldId=16
The first 41 lines of page source will be read, but then it stops.
If I copy the 3946 lines of page source and save it to a .txt file on my server the entire file will be read.
fopen - trouble reading in entire file
Moderator: General Moderators
Windows server? Try adding a "b":
(got that from user comments on http://uk2.php.net/manual/en/function.fopen.php)
Code: Select all
<?php
$fp = fopen('.. file path .. ', "rb");
?>
Last edited by McGruff on Wed Aug 10, 2005 8:32 pm, edited 1 time in total.
A friend telneted into the Sony server and apparently it is expecting some cookie information or somthin...
He telneted some info back after packet sniffin (or somthing, possibly with a program called Ethereal).
I may have to use raw sockets rather then fopen.
but I have no idea what "Raw Sockets" even means (relating to PHP programming anyway)
He telneted some info back after packet sniffin (or somthing, possibly with a program called Ethereal).
I may have to use raw sockets rather then fopen.
but I have no idea what "Raw Sockets" even means (relating to PHP programming anyway)
Code: Select all
$file = fsockopen ("myplanetside.station.sony.com", 80, $errno, $errstr, 30);
if (!$file)
{
echo "$errstr ($errno)</br>";
}
else
{
fputs ($file, "GET /outfit.jsp?outfitId=6723&worldId=16 HTTP/1.1\r\n");
fputs ($file, "Host: myplanetside.station.sony.com\r\n");
fputs ($file, "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)\r\n\r\n");
}