Mega Code Archive

 
Categories / Php / Network
 

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'); ?>