I know the url is good, cause I can go on to this domain and look at all my
files.
I guess I should explain a little further...
This server is a game server for Counter-Strike. I'm trying to read a file
on there called "mapcycle.txt".
This server is a secure server, so I would need to use a username and
password to get on. I
I've tried a bunch of different things, and now I find that it has a problem
connecting to secure servers.
DO you know of a different way to connect to a secure server anhd get
information other than the way I have been trying?
This is what I'm usuing right now:
<?php
$prefix = "ftp://";
$username = "myUsername";
$password = "**********";
$url = "server.username.gameserver.com/";
$filename = "test.txt";
$result = readfile($prefix . $username . ":" . $password . "@" . $url .
$filename);
print ($result);
?>
// OUTPUT
0
if I use anythign other than the ftp:// for a prefix (like http. or https) I
get an error.
Cheers.
"Chris Shiflett" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> --- Thomas <[EMAIL PROTECTED]> wrote:
> > readfile("ftp://username:[EMAIL PROTECTED]/test.txt");
> >
> > It doesn't have any errors and comes up blank.
> >
> > If I put:
> >
> > $result =
> > readfile("ftp://username:[EMAIL PROTECTED]/test.txt");
> > print ($result);
> >
> > it ends up showing a '0' by iteself.
>
> The readfile() functions outputs the contents of the file and returns the
size
> of the file in bytes. So, when you assigned $result to the return value,
you
> demonstrated that readfile() output 0 bytes (which explains why you didn't
see
> anything).
>
> I'm pretty sure your php.ini is set to allow this, otherwise you would
receive
> an error. I'm doubting whether that URL actually contains any content. How
have
> you tested to be sure it does?
>
> Chris
>
> =====
> Become a better Web developer with the HTTP Developer's Handbook
> http://httphandbook.org/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php