Page 1 of 1
creat php api to acess remote functions
Posted: Mon Oct 08, 2012 11:08 am
by srdva59
hi,
any one know how creat api to acess functions in a remote functions?
thanks for your help

Re: creat php api to acess remote functions
Posted: Mon Oct 08, 2012 6:38 pm
by requinix
What you actually said, no I have no clue. What I think you were trying to say, yes.
Details. Can haz them.
Re: creat php api to acess remote functions
Posted: Mon Oct 08, 2012 6:47 pm
by srdva59
hi,
what i want is creat my own php api
in server A i have many functions and classes that i what acess outside of that server.
like we use the cpanel api for example that we give the user and pass and add domains etc
thanks
Re: creat php api to acess remote functions
Posted: Mon Oct 08, 2012 7:46 pm
by requinix
Sure. You can make something as simple as a PHP script, or set up a REST API or a SOAP endpoint or two. Depends how you want to do it. What matters "most" is how it looks to the outside - once that's set you can change the internals as much as you'd like.
What kind of "functions and classes" do you want to expose? Will they require authentication?
Re: creat php api to acess remote functions
Posted: Mon Oct 08, 2012 7:51 pm
by srdva59
yes, but not require a login with user and pass, may be if i use only a token for example:
test as new api->
www.test.com?token=27272
call teste->name_of_function
then the server validate the token and return a value if the token is valid.
thanks
Re: creat php api to acess remote functions
Posted: Mon Oct 08, 2012 11:52 pm
by requinix
Go right ahead. Do you have specific questions on where to start? First step is making a PHP script that can, say, output the results you want. Once it does that then you can turn it into an "API".