Page 1 of 1

Problem with include php file from different domain

Posted: Thu Aug 13, 2009 5:48 am
by kostasps
Hallo friends,

I desparate need your help.
Suppose there are two different domains: the http://www.mydomain.com and the http://www.customerdomain.com.
Also suppose that these two domains belong to 2 different servers.
Now in the mydomain.com there is the post.php file and in the customerdomain.com there is the action.php file.

I am trying to execute the post.php file through the action.php file by using the function include("http://www.mydomain.com/post.php").
Unfortunately, this doesn't work because the file i am calling belongs to different domain in a different server.

Is there any way to solve this problem?

Thank you in advance

(I forgot to tell you that these two servers are not mine, so i can not turn "allow_url_fopen" to on)

Re: Problem with include php file from different domain

Posted: Thu Aug 13, 2009 8:44 am
by Eric!
You can't include() a file that is being served via a html server.

If you can't fopen the url from where you are trying to read those sites, then try cURL to read the contents.