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