Page 1 of 1

PHP Port

Posted: Wed May 22, 2002 2:43 pm
by carcoral
I need to know which is the port that PHP uses for the follow function:
fopen.

When I call the file, I get an error.

code:

<?
$sport=$_REQUEST["sport"];
$id=$_REQUEST["id"];

$archivo="http://www.booksportlines.com/rockislan ... t=".$sport;
$file = fopen ($archivo, "r");
if (!$file) {
echo "<p>Unable to open remote file for writing.\n";
exit;
}
else {
while (!feof ($file)) {
$line = fgets ($file, 1024);
echo $line;
}
}
?>[/list]

Posted: Wed May 22, 2002 5:19 pm
by volka
the common port for http is 80. If you'd like to connect the server on another port write something like http://the.server.ip:8080/whatever/