Using a password with FTP or HTTP : FTP Functions « Network « PHP






Using a password with FTP or HTTP

 
<?php
$fh = fopen('ftp://username:password@ftp.example.com/pub/Index','r');
$fh = fopen('http://username:password@www.example.com/robots.txt','r');
?>
  
  








Related examples in the same category

1.FTP Functions
2.Write to file with ftp functions
3.Write to remote file on a ftp server
4.Saving a remote file via FTP with file_put_contents()
5.ftp put
6.use the ftp_* functions to upload a single file to an FTP server.