creat php api to acess remote functions

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
srdva59
Forum Commoner
Posts: 77
Joined: Sun Feb 15, 2009 10:58 am

creat php api to acess remote functions

Post by srdva59 »

hi,
any one know how creat api to acess functions in a remote functions?
thanks for your help
:)
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: creat php api to acess remote functions

Post by requinix »

What you actually said, no I have no clue. What I think you were trying to say, yes.

Details. Can haz them.
srdva59
Forum Commoner
Posts: 77
Joined: Sun Feb 15, 2009 10:58 am

Re: creat php api to acess remote functions

Post 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
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: creat php api to acess remote functions

Post 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?
srdva59
Forum Commoner
Posts: 77
Joined: Sun Feb 15, 2009 10:58 am

Re: creat php api to acess remote functions

Post 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
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: creat php api to acess remote functions

Post 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".
Post Reply