loading an external site without the use of frames?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
thallish
Forum Commoner
Posts: 60
Joined: Wed Mar 02, 2005 11:38 am
Location: Aalborg, Denmark

loading an external site without the use of frames?

Post 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 :wink:

SO can it be done and if true then how?
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

file_get_contents() if url wrappers are allowed.

You should be careful, however, who you get stuff from...
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Post 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.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

Btw, google has a coupe of API's you could use instead of parsing their (once in a while changing) html.
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post 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?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

using include() on a remote file is dangerous, as always. PHP will execute any php code it finds in the file.
Post Reply