Please Help,
I am trying to open a password protected URL with PHP, using the normal method of fopen as in $fp = fopen('http://[username]:[password]@domain.com', 'r') does not work. I think the problem is that the username portion is an email address which obviously contains the '@' symbol.
Here is the error that I get.
Warning: fopen(http://adsl114354@dsl512.llink.co.za:aa ... .saix.net/) [function.fopen]: failed to create stream: Inappropriate ioctl for device in /var/www/html/somesite/adsl.php on line 10.
Usernames, Passwords and Domains are ficticious.
Please Help.
PHP fopen of password protected URLs
Moderator: General Moderators
as far as i'm aware, i don't think the E operator int he fopen statement is valid.
a good site for you to view right now would be http://us3.php.net/fopen.
a good site for you to view right now would be http://us3.php.net/fopen.
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
something tells me.. rawurlencode()
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
Or you can always use "Curl" Sometimes fopen just can't do everything. http://us4.php.net/manual/en/ref.curl.php
Tried it but it did not work. I will try CURL and see. Thanks anywaysAmbush Commander wrote:Or you can always use "Curl" Sometimes fopen just can't do everything. http://us4.php.net/manual/en/ref.curl.php