PHP Port

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
carcoral
Forum Newbie
Posts: 1
Joined: Wed May 22, 2002 2:43 pm

PHP Port

Post 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]
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post 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/
Post Reply