PHPackages                             phpactiveresource/phpactiveresource - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. phpactiveresource/phpactiveresource

ActiveLibrary[HTTP &amp; Networking](/categories/http)

phpactiveresource/phpactiveresource
===================================

A PHP client library for easily accessing Ruby on Rails-based REST services.

1.0.0-stable(13y ago)1158.2k26[1 issues](https://github.com/jbroadway/phpactiveresource/issues)MITPHPPHP &gt;=5.3.6

Since Jan 19Pushed 7y ago5 watchersCompare

[ Source](https://github.com/jbroadway/phpactiveresource)[ Packagist](https://packagist.org/packages/phpactiveresource/phpactiveresource)[ Docs](https://github.com/jbroadway/phpactiveresource)[ RSS](/packages/phpactiveresource-phpactiveresource/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

PHP ActiveResource
==================

[](#php-activeresource)

[![Click here to lend your support to: phpactiveresource and make a donation at www.pledgie.com !](https://camo.githubusercontent.com/825865f0b1a65ddd512b62c70d48e909ddc8d841fbcc873ac88430d66cf2972f/687474703a2f2f7777772e706c65646769652e636f6d2f63616d706169676e732f343032302e706e673f736b696e5f6e616d653d6368726f6d65)](http://www.pledgie.com/campaigns/4020)

This is a PHP class for accessing Ruby on Rails REST APIs in an [ActiveResource](https://github.com/rails/activeresource) style of coding. The benefit is easier use of RoR-based REST services without having to roll your own CURL-based client each time. Hopefully this class saves a few people some time coding in PHP against RoR-based REST services. It’s by no means an exhaustive port, and some methods are missing, but it does try to cover all the basics.

Note: You will need the php curl extension installed on your system. On Ubuntu, you can install it via:

```
sudo apt-get install php5-curl
```

Usage
-----

[](#usage)

### With Composer

[](#with-composer)

Create a composer.json file with the following:

```
{
	"require": {
		"phpactiveresource/phpactiveresource": "dev-master"
	}
}
```

Now load the script via Composer’s autoloader:

```

```

### Without Composer

[](#without-composer)

```

```

Extra URL params
----------------

[](#extra-url-params)

If you want to add extra params to the end of the url eg: an API key, you can set $extra\_params

```
