remote include

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
m2babaey
Forum Contributor
Posts: 364
Joined: Sun May 20, 2007 9:26 am

remote include

Post by m2babaey »

Hi
I coded a page this way:
<?php
include 'index.php';
?>
but it's not working. I don't need to include here's index but want to know about remote including
thiscatis
Forum Contributor
Posts: 434
Joined: Thu Jul 20, 2006 11:00 am

Post by thiscatis »

is allow_url_fopen enabled?
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

It's something that must be enabled server-side. Otherwise, use cURL or something.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Remote inclusion is generally frowned upon. This is due largely to two this: security and speed.
  1. If the remote server is compromised the attacker compromises a second or third site for free.
  2. remote requests can take several seconds to finish gathering response data. The user will likely grow impatient.
Post Reply