|
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]
|