Closed Thread Icon

Topic awaiting preservation: PHP - retreive contents of a password protected page Pages that link to <a href="https://ozoneasylum.com/backlink?for=28276" title="Pages that link to Topic awaiting preservation: PHP - retreive contents of a password protected page" rel="nofollow" >Topic awaiting preservation: PHP - retreive contents of a password protected page\

 
Author Thread
H][RO
Paranoid (IV) Inmate

From: Australia
Insane since: Oct 2002

posted posted 07-30-2006 16:38

Hi folks..

You know how you used to be able to in IE and can still do in other browsers, access a password protected site via the URL. For example http://usernameassword@mysite.com


Is there a way to do this, via php and retrive the contents that would have been outputted to html. Currently you cant do this in IE6 normally because in a patch microsoft removed the ability to do so. Im not sure if this would effect things serverside since php isnt technically using a browser to get the URL, but im really not sure.

Any suggestions?

divinechaos
Bipolar (III) Inmate

From:
Insane since: Dec 2001

posted posted 07-30-2006 18:19

Yes, take a look at the CURL docs: http://ca.php.net/curl

quote:
libcurl also supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading (this can also be done with PHP's ftp extension), HTTP form based upload, proxies, cookies, and user+password authentication.



I'm convinced it would also be possible by hand with file handlers (fopen, fread), but the above will be much easier.

Cheers,
DC

H][RO
Paranoid (IV) Inmate

From: Australia
Insane since: Oct 2002

posted posted 07-31-2006 02:40

Awesome thanks, looks like it should do the trick. I have heard about curl but never used it, thought it was some big extension like PEAR that my host didnt have installed.

Turns out the php is compiled with it! Now i can make a new front end to cpanel for my clients hoorahh

« BackwardsOnwards »

Show Forum Drop Down Menu