...

View Full Version : include() other sites



Taylor_1978
06-08-2004, 04:00 PM
Isn't possible to include() another site.. eg. include ("http://yahoo.com"); - or do I need a different function?

Thanks in advance! :thumbsup:

Taylor.

homerUK
06-10-2004, 03:16 PM
that should work fine!



include ("http://www.codingforums.com");

mordred
06-10-2004, 03:33 PM
that should work fine!



include ("http://www.codingforums.com");


Noooo! Don't do this! Security warning: When you include() a file, the content gets read and evaluated as PHP. This means if you should send PHP code inside <?php ?> from the foreign site, the foreign code gets executed on your site, with your permissions etc.!

If you want to get the content and that in a safe manner, use readfile() instead.

homerUK
06-10-2004, 03:36 PM
oh gosh! I never thought of that!! I've never needed to include another page like this, so its not been a problem, but thanks for the heads up!

One way do include a page might be to use an iFrame or ilayer to display it?

Taylor_1978
06-11-2004, 02:07 PM
Yeah - I finished up using iframe - but wasnt ideally what I wanted. No biggie. BUT.. what is ilayer??? LOL

Taylor. :thumbsup:

homerUK
06-11-2004, 02:10 PM
i think its the right name? Its the equivalent of an iFrame but for netscape.... I think!! :confused:

mindlessLemming
06-11-2004, 03:03 PM
Noooo! Don't do this! [...] This means if you should send PHP code inside <?php ?> from the foreign site, the foreign code gets executed on your site, with your permissions etc.!


Hahahaa! The idea of the C.F. PHP forum getting included and people's random scripts being run cracked me up straight away :D



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum