Skip to content

Commit

Permalink
added php client link
Browse files Browse the repository at this point in the history
  • Loading branch information
bobrik committed Jun 11, 2012
1 parent 7d2e48b commit bf303ab
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion README.md
Expand Up @@ -18,7 +18,7 @@ This is lock server for system that need to share and lock common resources acro

[Client for node.js](https://github.com/bobrik/node-locker) is completely async.

Example
Example:

```javascript
var Locker = require("locker"),
Expand Down Expand Up @@ -46,6 +46,29 @@ locker.locked("five", 2000, 3000, function(error, callback) {
});
```

### PHP

[Client for php](https://github.com/bobrik/php-locker).

Example:

```php
require_once('Locker.php');

$Locker = new \Locker\Locker("127.0.0.1", 4545);

// Lock creation
$LockOne = $Locker->createLock('example');

// getting lock
$LockOne->acquire(200, 10000);
// doing very important stuff
echo 'Waiting for 5 seconds..'."\n";
sleep(5);
// releasing lock
$LockOne->release();
```

## Running

First create a dir for locker:
Expand Down

0 comments on commit bf303ab

Please sign in to comment.