It bears mentioning that executing a remote file is potentially a HUGE security issue. If you simply want to retrieve the value of a variable, you could have the remote script serialize and print said variable, then in the local script request the page and unserialize said variable:
<?php
#script located at http://mysite.com/myscript.php
$result = unserialize( file_get_contents('http://remotesite.com/theirscript.php') );
?>
<?php
#script located at http://remotesite.com/theirscript.php
echo serialize( $variable_we_want );
?>