Page 1 of 1
How to include URL's content not a file?
Posted: Mon Sep 21, 2009 9:34 am
by juhaphu
http://www.redtie.ro/products/demo/weat ... s/FRXX0076
The URL above is not a file and it shows the weather in Paris. Is it possible to include the URL's content to my php-page? How? And I don't mean that page's code, it's a dynamic webpage. Thanks.
Re: How to include URL's content not a file?
Posted: Mon Sep 21, 2009 9:58 am
by jackpf
You can use cURL.
But are you allowed to be doing this :/
Have you asked the owners of the website?
Re: How to include URL's content not a file?
Posted: Mon Sep 21, 2009 10:03 am
by juhaphu
I tried cURL but got only blank page. I'm not going to use that url... it's only an example.
Re: How to include URL's content not a file?
Posted: Mon Sep 21, 2009 10:13 am
by juhaphu
The problem solved:
$Content = implode('',file("
http://www.geekpedia.com/index.php"));
echo $Content;
Re: How to include URL's content not a file?
Posted: Mon Sep 21, 2009 10:21 am
by jackpf
Oh right, I would have thought you had url_fopen turned off...but I guess your hosts allowed it.
Btw, you don't need the first arg for implode().