Jump to content

How to include PHP file from another server?


deecee2000

Recommended Posts

Hi All,

 

  I want to include other(remote) server's PHP file in my current server. I tried below command, but it is not working.

 

include('http://www.server2.com/index.php');

 

My Server1 Settings are:

allow_url_fopen = On

allow_url_include = On

 

I can't access any variable from server2 php file in current file.

 

Can anyone please focus how do I handle this?

 

Thanks in Advance.

 

Deecee

Yes that's true...

 

If I use below code in server2(remote), I can able to see output in my server1.

 

server2 php file.

echo $test = "ABC";

 

And if I include this file in my server, it is showing "ABC" as output.

 

But my is there any way I can see output if I echo this $test variable in my server php file?

In other words how can I access any variable from remote server to my server?

 

Thanks,

 

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.