-1

I want to access some function written in some php file on another server. I include file by using file_get_contents. I set allow_url_include and allow_url_fopen to true. It opens the file. But still I am unable to access functions defined in the included file.

Error i got is:

Fatal error: Call to undefined function contact()

Can anybody guide me how can I do it.

Apb
  • 979
  • 1
  • 8
  • 25
  • To do this you'd have to be able to get the *raw PHP code* via an HTTP request. In other words, you'd be able to see PHP code when visiting the given URL in your browser. ... Doesn't sound like a great idea, does it? – deceze Mar 16 '13 at 10:13

1 Answers1

0

It's possible to use include function

include 'http://www.example.com/file.php?foo=1&bar=2';

http://www.php.net/include

Valery Viktorovsky
  • 6,487
  • 3
  • 39
  • 47