You are here: Re: PHP fopen file_get_contents AND javascript top.location « PHP Programming Language « IT news, forums, messages
Re: PHP fopen file_get_contents AND javascript top.location

Posted by the DtTvB on 09/03/07 08:40

BPG wrote:
> Hi There,
>
> I'm running into a little problem using "file_get_contents".
> When i try to open a page just using my browser i can see the consents
> of the page, however, when i try to open this same page with
> file_get_contents all i get is:
>
> <html><script language="javascript">top.location='/default.asp?
> id=10script';></html>
>
> It's the exact same URL as the one i open in my browser, is there a
> way to get around this so that I can read the file using php?
>
> Thnaks in advance,
> BPG

Some sites require you to send the user-agent request header.
Try using curl <http://php.net/curl> instead.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация