Re: [PHP] Rest Authentication

2012-11-11 Thread Stuart Dallas
On 10 Nov 2012, at 23:28, Adam Tong adam.to...@gmail.com wrote:

 I am developing a REST API. I found the Slim micro-framework usefull.
 I need authentication of course, and I see that Slim does not provide
 authentication for Rest. Is there any lightweight alternative to
 manually implementing http authentication and the hassle of apache
 configurations?

HTTP auth doesn't need to involve the web server at all:

http://stut.net/2012/11/11/snippet-http-authentication/

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Rest Authentication

2012-11-11 Thread shiplu
Its rather better to auto using a apikey. You'll provide this apikey on the
website where user registers their application.


On Mon, Nov 12, 2012 at 12:45 AM, Stuart Dallas stu...@3ft9.com wrote:

 On 10 Nov 2012, at 23:28, Adam Tong adam.to...@gmail.com wrote:

  I am developing a REST API. I found the Slim micro-framework usefull.
  I need authentication of course, and I see that Slim does not provide
  authentication for Rest. Is there any lightweight alternative to
  manually implementing http authentication and the hassle of apache
  configurations?

 HTTP auth doesn't need to involve the web server at all:

 http://stut.net/2012/11/11/snippet-http-authentication/

 -Stuart

 --
 Stuart Dallas
 3ft9 Ltd
 http://3ft9.com/

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Shiplu.Mokadd.im
ImgSign.com | A dynamic signature machine
Innovation distinguishes between follower and leader


[PHP] Rest

2012-10-27 Thread Adam Tong
Hi,

I need to develop a rest API.I want your feedback on how you develop
rest apis. I don't want to use a heavy framework just for that, and I
find url rewriting time consuming.

Any suggestions?

Thank you

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Rest

2012-10-27 Thread Marco Behnke
Am 27.10.12 19:47, schrieb Adam Tong:
 Hi,

 I need to develop a rest API.I want your feedback on how you develop
 rest apis. I don't want to use a heavy framework just for that, and I
 find url rewriting time consuming.

 Any suggestions?

 Thank you

Let us see what you have done so far towards your goal, so we can
discuss on how we can improve it.

-- 
Marco Behnke
Dipl. Informatiker (FH), SAE Audio Engineer Diploma
Zend Certified Engineer PHP 5.3

Tel.: 0174 / 9722336
e-Mail: ma...@behnke.biz

Softwaretechnik Behnke
Heinrich-Heine-Str. 7D
21218 Seevetal

http://www.behnke.biz




signature.asc
Description: OpenPGP digital signature


Re: [PHP] Rest

2012-10-27 Thread Matijn Woudt
On Sat, Oct 27, 2012 at 7:47 PM, Adam Tong adam.to...@gmail.com wrote:
 Hi,

 I need to develop a rest API.I want your feedback on how you develop
 rest apis. I don't want to use a heavy framework just for that, and I
 find url rewriting time consuming.

 Any suggestions?

 Thank you


I'd suggest you google for PHP REST.
It has plenty of information. There are even lightweight frameworks
that do nothing more than providing REST API. And while URL rewriting
may be time consuming, you could use a single rewrite that pushes all
to PHP and you can do the rest in PHP.

- Matijn

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Fwd: Re: [PHP] Rest

2012-10-27 Thread Volmar Machado
-- Mensagem encaminhada --
De: Volmar Machado qi.vol...@gmail.com
Data: 27/10/2012 17:07
Assunto: Re: [PHP] Rest
Para: Matijn Woudt tijn...@gmail.com

But if what you want to know, is how to works inside, google for
PHPMaster.org REST PHP. They have a two part article about it, and is
really good
Em 27/10/2012 14:49, Matijn Woudt tijn...@gmail.com escreveu:

On Sat, Oct 27, 2012 at 7:47 PM, Adam Tong adam.to...@gmail.com wrote:
  Hi,
 
  I need to develop a rest API.I want your feedback on how you develop
  rest apis. I don't want to use a heavy framework just for that, and I
  find url rewriting time consuming.
 
  Any suggestions?
 
  Thank you
 

 I'd suggest you google for PHP REST.
 It has plenty of information. There are even lightweight frameworks
 that do nothing more than providing REST API. And while URL rewriting
 may be time consuming, you could use a single rewrite that pushes all
 to PHP and you can do the rest in PHP.

 - Matijn

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] REST, SOAP or XML-RPC?

2007-02-04 Thread Paul Scott

I am developing a webservice like module for our framework that will
enable downloads of module code into the framework modules from a remote
server.

Basically what this should do is:

1. User requests a list of available stable modules from server
2. User clicks on install from the returned list
3. Client code will download a tgz/zip module and plonk it in the users
modules directory (taken care of)
4. Framework then unzips/untars it and installs (taken care of)

My question here is...

For the server/client code, I am thinking around REST (much the same way
as the PEAR channel server works). Is this the wisest choice? Should I
rather go with FTP or a mail request or something? If I go for FTP, that
will require the PHP FTP extension, how common is that in shared hosting
environments? 

The file size of a typical  module is around 100k, and we must take into
account that this is in/for bandwidth starved Africa. Is REST/SOAP
robust enough to do that?

Any help would be greatly appreciated!

--Paul



All Email originating from UWC is covered by disclaimer 
http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] REST, SOAP or XML-RPC?

2007-02-04 Thread Richard Lynch
On Sun, February 4, 2007 10:38 pm, Paul Scott wrote:
 I am developing a webservice like module for our framework that will
 enable downloads of module code into the framework modules from a
 remote
 server.

 Basically what this should do is:

 1. User requests a list of available stable modules from server

I'd go for RSS for this bit, personally.

 2. User clicks on install from the returned list

Presumably one can choose to install only some of the options.

Of course, now you're into the wonderful land of module
dependencies...  Good luck!

 3. Client code will download a tgz/zip module and plonk it in the
 users
 modules directory (taken care of)

 4. Framework then unzips/untars it and installs (taken care of)

 My question here is...

 For the server/client code, I am thinking around REST (much the same
 way
 as the PEAR channel server works). Is this the wisest choice?

REST should be fine.

You should perhaps design it modularly enough that swapping in SOAP or
RPC would not be too difficult.

 Should I
 rather go with FTP or a mail request or something? If I go for FTP,
 that
 will require the PHP FTP extension, how common is that in shared
 hosting
 environments?

I don't think you'll need FTP in PHP...

Your client code can just download with fopen/fread, same as it
already is doing the tar.gz files...

You're more likely to be bitten by hosts turning off allow_url_fopen
though.

 The file size of a typical  module is around 100k, and we must take
 into
 account that this is in/for bandwidth starved Africa. Is REST/SOAP
 robust enough to do that?

I believe REST is the most light-weight bandwidth of the REST/SOAP/RPC
crowd...

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] REST, SOAP or XML-RPC?

2007-02-04 Thread Paul Scott

On Sun, 2007-02-04 at 23:00 -0600, Richard Lynch wrote:
 Presumably one can choose to install only some of the options.
 
 Of course, now you're into the wonderful land of module
 dependencies...  Good luck!
 

Module dependencies are sorted out by the framework already. We have
modelled our dependency issues around debian's aptitude, although in
text/php...

 REST should be fine.
 
 You should perhaps design it modularly enough that swapping in SOAP or
 RPC would not be too difficult.
 

Yes, I think that that would probably be wise. Most of our code is
designed in this way anyway, like we have 3 different WYSIWYG editor
choices as well...

 I don't think you'll need FTP in PHP...
 
 Your client code can just download with fopen/fread, same as it
 already is doing the tar.gz files...
 
 You're more likely to be bitten by hosts turning off allow_url_fopen
 though.

Oh yeah, forgot about that one!

 I believe REST is the most light-weight bandwidth of the REST/SOAP/RPC
 crowd...

I believe so too. I am taking a look at hacking around with the PEAR
channel server code.

--Paul

All Email originating from UWC is covered by disclaimer 
http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php