[FX.php List] Accessing a php file residing on an external server
Jonathan Schwartz
jschwartz at exit445.com
Sat Oct 11 17:52:41 MDT 2008
Still no joy.
This works (local):
include('auth.php');
echo $thingie;
This doesn't work (remote via include):
include('http://www.domain.com/auth.php');
echo $thingie;
This doesn't work either (remote via fsockopen):
$thingie = fsockopen('http://www.domain.com/auth.php');
echo $thingie;
Not sure what to to with the eval() statement.
Anyone? Anyone?
Jonathan
At 2:33 PM -0700 10/11/08, Troy Meyers wrote:
>Johnathan,
>
>I'm pretty sure you can pull in remote data right into a variable
>using fsockopen() and fgets(), then execute it with eval(). I do
>this, not with PHP script text and eval(), but other data from
>remote servers. If it turns out you can't change a setting to allow
>remote includes, then give this a try. If this doesn't make sense, I
>may be able to set up a test and some code to demonstrate later. I'm
>heading out the door right now. Just say the word.
>
>-Troy
>
>
>> Troy,
>>
>> Thanks for the suggestions.
>>
>> The challenge boils down to local vs remote.
>>
>> The include works as intended when the included file is located on
>> the same server.
>>
>> It does not work when the included file is located on a remote
>> server...at least the remote server I am working with.
>>
>> I seem to recall that there is a setting somewhere that
>> allows/restricts access from external servers, but I don't remember the
>> details, or if it is a PHP setting, an Apache/OS X Server setting or
>> what.
>>
>> Thanks
>>
>> Jonathan
>
>_______________________________________________
>FX.php_List mailing list
>FX.php_List at mail.iviking.org
>http://www.iviking.org/mailman/listinfo/fx.php_list
--
Jonathan Schwartz
Exit 445 Group
jonathan at exit445.com
http://www.exit445.com
415-370-5011
More information about the FX.php_List
mailing list