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 Rik Wasmus on 09/03/07 08:40

On Mon, 03 Sep 2007 10:32:05 +0200, BPG <mail@bpg.nu> 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=3D"javascript">top.location=3D'/default.asp?
> id=3D10script';></html>
>
> It's the exact same URL as the one i open in my browser,

Keep an eye on the addressbar... It will not be the same.. after a secon=
d.

> is there a
> way to get around this so that I can read the file using php?

Not automatically, no. This would require a javascript engine somewhere.=
=

You can do this by either fetching to page through a UA on the server =

itself which is javascript capable, or by examening the javascript 'by =

hand' and fix things.

Quick fix in this case: regardless of what your original url might be, =

fetch http://<the domain in question>/default.asp?id=3D10script
-- =

Rik Wasmus

 

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

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