PHPackages                             splitice/rage4-api - 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. [API Development](/categories/api)
4. /
5. splitice/rage4-api

ActiveLibrary[API Development](/categories/api)

splitice/rage4-api
==================

1.2.5(5mo ago)34.2k↑33.3%1MITPHPPHP &gt;=5.4

Since Jun 4Pushed 5mo ago2 watchersCompare

[ Source](https://github.com/splitice/php-rage4-dns)[ Packagist](https://packagist.org/packages/splitice/rage4-api)[ RSS](/packages/splitice-rage4-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (1)Versions (10)Used By (1)

Rage4 DNS PHP5 class
====================

[](#rage4-dns-php5-class)

[![Build Status](https://camo.githubusercontent.com/a1d4fafffd5acf4de0456965554b499d457d922e913489545004fa745d73957c/68747470733a2f2f7472617669732d63692e6f72672f73706c69746963652f7068702d72616765342d646e732e737667)](https://travis-ci.org/splitice/php-rage4-dns)

This is a PHP5 wrapper to easily integrate Rage4 DNS service ([www.rage4.com](http://www.rage4.com)). There is no official PHP SDK currently.

Number of API calls is not limited at the moment hence no mechanism added to track/limit the same.

The methods introduced in this first release are

- getDomains()
- getDomainByName()
- createDomain()
- createReverseDomain4()
- createReverseDomain6()
- deleteDomain()
- importDomain()
- getRecords()
- getGeoRegions()
- createRecord()
- updateRecord()
- deleteRecord()

You can also consult the official documentation available at the following URL:

Official set of SDKs by Rage4:  (only .NET available at the moment)

Requirements
------------

[](#requirements)

You need PHP 5.3.2+ compiled with the cURL extension.

Install PHP Rage4 API
---------------------

[](#install-php-rage4-api)

### Installing via Composer

[](#installing-via-composer)

The recommended way to install OVH SDK is through [Composer](http://getcomposer.org).

1. Add `splitice/rage4-api` as a dependency in your project's `composer.json` file:

    ```
     {
         "require": {
             "splitice/rage4-api": "dev-master"
         }
     }

    ```
2. Download and install Composer:

    ```
     curl -s http://getcomposer.org/installer | php

    ```
3. Install your dependencies:

    ```
     php composer.phar install

    ```
4. Require Composer's autoloader

    Composer also prepares an autoload file that's capable of autoloading all of the classes in any of the libraries that it downloads. To use it, just add the following line to your code's bootstrap process:

    ```
     require 'vendor/autoload.php';

    ```

You can find out more on how to install Composer, configure autoloading, and other best-practices for defining dependencies at [getcomposer.org](http://getcomposer.org).

Examples
--------

[](#examples)

Here are some examples on how to do basic operations.

### Configure the API client

[](#configure-the-api-client)

```
using Splitice\Rage4\Rage4Api;
$r4 = new Rage4Api("username","password");

```

### Get all domain names (zones)

[](#get-all-domain-names-zones)

```
$response = $r4->getDomains();
print_r($response);

```

### Create a new domain name (zone)

[](#create-a-new-domain-name-zone)

```
// createDomain($domain_name, $email)
$response = $r4->createDomain('my-domain-name-here.com', 'you@yourhost.com');
print_r($response);

```

### Create Reverse IPv4 domain

[](#create-reverse-ipv4-domain)

```
// createReverseDomain4($domain_name, $email, $subnet)
$response = $r4->createReverseDomain4('155.39.97.in-addr.arpa', 'you@yourhost.com', '27');
print_r($response);

```

### Create Reverse IPv6 domain

[](#create-reverse-ipv6-domain)

```
// createReverseDomain6($domain_name, $email, $subnet)
$response = $r4->createReverseDomain6('0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa', 'you@yourhost.com', '48');
print_r($response);

```

### Delete a new domain name (zone)

[](#delete-a-new-domain-name-zone)

In this example, 627 is the ID of the domain zone to be deleted. To know the IDs of the domain zones, do $r4-&gt;getDomains(); first

```
// deleteDomain($domain_id)
$response = $r4->deleteDomain(627);
print_r($response);

```

### Import a new domain name (zone)

[](#import-a-new-domain-name-zone)

Note! You need to allow AXFR transfers Note! Only regular domains are supported

```
// importDomain($domain)
$response = $r4->importDomain('my-domain-name-here.com');
print_r($response);

```

### Get all records of a domain name (zone)

[](#get-all-records-of-a-domain-name-zone)

You need to mention the domain ID for which you need to get all records for. Again, if you are unsure please do a $r4-&gt;getDomains(); first

```
// getRecords($domain_id);
$response = $r4->getRecords(55);
print_r($response);

```

### Create a new record for a particular domain name (zone)

[](#create-a-new-record-for-a-particular-domain-name-zone)

```
// createRecord($domain_id, $name, $content, $type="TXT", $priority="", $failover="", $failovercontent="", $ttl=3600)
$response = $r4->createRecord(55, 'my-domain-name-here.com', 'ns1.4dns.com', "NS", 1500);
print_r($response);

```

### Update an existing record

[](#update-an-existing-record)

5555 is the record id that was returned from the function $r4-&gt;createRecord()

Note! No domain\_name/domain\_id is required while updating a record Note! There is no way to update the record-type at the moment, so the easy way is to delete the record first and then recreate with new values (if record-type is changed) e.g. from CNAME to TXT etc

```
// updateRecord($record_id, $name, $content, $priority="", $failover="", $failovercontent="", $ttl=3600)
$response = $r4->updateRecord(5555, 'my-domain-name-here.com', 'ns1.4dns.com', 1500);
print_r($response);

```

### Delete an existing record

[](#delete-an-existing-record)

```
// deleteRecord($record_id)
$response = $r4->deleteRecord(5555);
print_r($response);

```

TODO / Wish List
----------------

[](#todo--wish-list)

- Monolog support

Credits
-------

[](#credits)

- [Asim Zeeshan](https://github.com/asimzeeshan): The original class
- Piotr Ginalski from gbshouse.com for being very useful :)

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance70

Regular maintenance activity

Popularity25

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 90.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~523 days

Recently: every ~127 days

Total

9

Last Release

175d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/64550cf2479d8e12424d51917f2adea34149494df1ae435952432c6fbd701c87?d=identicon)[splitice](/maintainers/splitice)

---

Top Contributors

[![splitice](https://avatars.githubusercontent.com/u/468579?v=4)](https://github.com/splitice "splitice (55 commits)")[![asimzeeshan](https://avatars.githubusercontent.com/u/2176442?v=4)](https://github.com/asimzeeshan "asimzeeshan (6 commits)")

---

Tags

Rage4

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/splitice-rage4-api/health.svg)

```
[![Health](https://phpackages.com/badges/splitice-rage4-api/health.svg)](https://phpackages.com/packages/splitice-rage4-api)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
