Use a php function that is in a different domain

Asked

Viewed 42 times

0

Boas. I need to use a function that’s in a file php in a different domain http://exx.exemplo.com/pasta/ficheio_da_funcao.php on another site that is http://meusite.com. What the function does is when you complete a form sends an email to the person. Is there any way to do that? I have the allow_url_include in the .ini active. I have tried with require ( htp://exx.exemplo.com/folder/ficheio_da_funcao.php) and below called the function and did not give. I tried also the file_get_contents And I couldn’t either. Can someone help me?

1 answer

0

Can do with include http://php.net/include

include('http://exx.exemplo.com/pasta/ficheio_da_funcao.php');

and in your file can call the function

  • It didn’t work. And I know the function works and I’m calling it well because if I put the file in the same domain (with the appropriate changes) it works. However in my situation it does not suit me to have the file in the same domain...

  • why not copy the function to your file ?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.