Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Urgent fopen question
August 31, 2004, 7:57 am
rate this thread
I would get the following error message:
Warning: fopen(): Circular redirect, aborting.
Warning: fopen(http://home.pchome.com.tw/world/qoo4ko/110.jpg): failed
to open stream: Permission denied
But when I use HTML (<img src="<?=$URL?>" alt="">), to display it, it
does display on the screen.
How come fopen cannot open certain URLs while <img> can display them.
Does anyone have any idea why this happens?
I'm try to use fopen to check if a link is broken. If anyone has a
workaround solution, it would be great, too.
Thanks very much.
Re: Urgent fopen question
On 08/31/2004 06:57 AM, Ming wrote:
This looks like the server is not accepting PHP user agent but it is
accepting certain browsers.
If that is the case, you need to spoof the request to look like other
browsers. In that case you may want to try this HTTP client class and
set the User-Agent: request header to Netscape or Internet Explorer user
PHP Classes - Free ready to use OOP components written in PHP
PHP Reviews - Reviews of PHP books and other products
Metastorage - Data object relational mapping layer generator