[FX.php List] Accessing a php file residing on an external server
Bob Patin
bob at patin.com
Sat Oct 11 17:46:15 MDT 2008
Jonathan,
I use this all the time
include_once('https://www.site.com/secure.htm');
when I want to go from one page to another and invoke an SSL cert at
the same time. I've also used it to go from one site to another,
without any trouble; for example, in one site I use pages on a 2nd
server in my network, by using an include_once() to include a page
that is sitting on a different machine in my network.
Perhaps my PHP is configured in such a way that it allows this, but if
so it's not something I did...
Bob Patin
Longterm Solutions
bob at longtermsolutions.com
615-333-6858
http://www.longtermsolutions.com
iChat: bobpatin
AIM: longterm1954
FileMaker 9 Certified Developer
Member of FileMaker Business Alliance and FileMaker TechNet
--------------------------
FileMaker hosting and consulting for all versions of FileMaker
PHP • Full email services • Free DNS hosting • Colocation • Consulting
On Oct 11, 2008, at 4:08 PM, Jonathan Schwartz wrote:
> 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
>
>
>
>
> At 11:47 AM -0700 10/11/08, Troy Meyers wrote:
>> Jonathan,
>>
>> I just found the function that will perform PHP code that is in a
>> variable. It's eval().
>>
>> Note that for eval() (unlike an include file) you do NOT use a
>> starting and ending tag in the content.... unless you use an ENDING
>> then STARTING tag to surround some HTML you want output.
>>
>> -Troy
>>
>>
>>
>>> This might be a pure PHP problem or an Apache problem, but it
>>> affects
>>> my fx.php project...
>>>
>>> Is there are trick to doing an include for a file residing on an
>>> external server?
>>>
>>> I use this in the target page:
>>>
>>> require('http://000.000.000.000/test.php');
>>>
>>> echo $value;
>>>
>>> The file test.php has a single line as follows: $value = "Hello
>>> World";
>>>
>>> echo $value produces no results at all.
>>>
>>> Am I doing something wrong?
>>>
>>> Remote server is OS X Server 10.2 running Php 5
>>>
>>> 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
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
More information about the FX.php_List
mailing list