Page 1 of 1
loading an external site without the use of frames?
Posted: Tue Sep 13, 2005 4:22 pm
by thallish
hi guys
Can loading an external site be done with php? I want to avoid using frames.
Did some fooling around with just including google to my site, but it kind of miss
some objects
SO can it be done and if true then how?
Posted: Tue Sep 13, 2005 5:28 pm
by Ambush Commander
file_get_contents() if url wrappers are allowed.
You should be careful, however, who you get stuff from...
Posted: Tue Sep 13, 2005 7:03 pm
by josh
Ambush Commander wrote:You should be careful, however, who you get stuff from...
heh, sounds like you're talking about drugs
but yeah, always use htmlspecialchars() if the data is not supposed to contain html, if it's only supposed to contain simple formatting tags, check to make sure it does.
Posted: Wed Sep 14, 2005 8:00 am
by timvw
Btw, google has a coupe of API's you could use instead of parsing their (once in a while changing) html.
Posted: Wed Sep 14, 2005 8:12 am
by shiznatix
you could also use include('
http://www.google.com'); to do this too. in the end the question is, which way would be fastest?
Posted: Wed Sep 14, 2005 11:02 am
by feyd
using include() on a remote file is dangerous, as always. PHP will execute any php code it finds in the file.