I'm trying to access a remote file that is htaccess password protected using the fopen command. I'm trying this syntax without success:
I've searched around for solutions but I'm drawing a blank. Does anyone know of a way I can read a remote htaccess password protected file via PHP?
TIA
Chris
Code:
fopen("username:password@[URL unfurl="true"]http://www.domain.com/protectedDir/file.csv","r");[/URL]
I've searched around for solutions but I'm drawing a blank. Does anyone know of a way I can read a remote htaccess password protected file via PHP?
TIA
Chris