Remote File Variable Injection Safety?



Hello,

suppose there is a file at http://otherhost.com/remote.php that looks like this:

<?php
if (!isset($safe_flag))
{
die("hacking attempt");
}
echo "You are in";
?>

Suppose i executed the following php file at http://myhost.com/local.php

<?php
require_once("http://otherhost.com/remote.php";);
?>

Is there any way to get local.php to display "You are in", by only modifying local.php? That is, is there a way to set $safe_flag on the remote host as one requests a file from the remote host from within local.php?

I have genuine, academic, non-belligerent intentions when asking this question.

Thanks,
dK




Relevant Pages

  • Re: PHP environment different under apache compared to standalone ??
    ... I've been running a standalone version of this script in a Terminal ... some lines of data on the remote host that look like: ... with angle-brackets in the data. ... However, when the same PHP ...
    (comp.lang.php)
  • Re: Keep connecting to remote host on port 7869
    ... I've found that it is really caused by PHP ... All packet disappeared after I have turned off the debugging ... >> My redhat linux mail host keeps connecting to other remote host quite ...
    (Incidents)
  • Re: [PHP] Re: Remote File Variable Injection Safety?
    ... Suppose i executed the following php file at http://myhost.com/local.php ... remote host as one requests a file from the remote host from within ... but not for the reason you state. ... file "scope" regardless of where the file resides. ...
    (php.general)
  • Re: [PHP] Re: Remote File Variable Injection Safety?
    ... Shawn McKenzie wrote: ... echo "You are in"; ... Suppose i executed the following php file at http://myhost.com/local.php ... remote host as one requests a file from the remote host from within ...
    (php.general)
  • Re: Obfuscating/Encrypting PHP
    ... >> remote host. ... PHP Classes - Free ready to use OOP components written in PHP ... PHP Reviews - Reviews of PHP books and other products ...
    (alt.php)