PHPackages                             olssonm/loopia-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. olssonm/loopia-api

ActiveLibrary[API Development](/categories/api)

olssonm/loopia-api
==================

Simple interface for the Loopia XMLRPC-API

v2.0(4y ago)11281MITPHPPHP ^7.0|^8.0

Since Jun 7Pushed 4y ago1 watchersCompare

[ Source](https://github.com/olssonm/loopia-api)[ Packagist](https://packagist.org/packages/olssonm/loopia-api)[ Docs](https://github.com/olssonm/loopia-api)[ RSS](/packages/olssonm-loopia-api/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (2)Dependencies (5)Versions (3)Used By (0)

Loopia API
==========

[](#loopia-api)

A super simple wrapper for the [Loopia XML RPC-API](https://www.loopia.se/api/) for PHP.

Relies on [lstrojny/fxmlrpc](https://github.com/lstrojny/fxmlrpc) to make fast and efficient calls to the API. Requires PHP ^7.2 or PHP ^8.0.

Installation
------------

[](#installation)

```
$ composer require olssonm/loopia-api
```

Usage
-----

[](#usage)

Using the package is straight forward – just include the client, create an instance and make your calls.

All methods are listed over at the [Loopia API-documentation](https://www.loopia.se/api/).

**Get all your domains**

```
    use Olssonm\LoopiaApi\Client;

    $response = (new Client('username', 'password'))
        ->getDomains()
        ->getResponse();
```

If needed, you may of course separate your code, like so:

```
    use Olssonm\LoopiaApi\Client;

    $client = new Client('username', 'password');
    $client->getDomains();
    $response = $client->getResponse();
```

**Check the zone records for a domain (with subdomain)**

```
    use Olssonm\LoopiaApi\Client;

    $response = (new Client('username', 'password'))
        ->getZoneRecords('example.com', '@')
        ->getResponse();
```

**Update your DNS (name)-servers**

```
    use Olssonm\LoopiaApi\Client;

    $response = (new Client('username', 'password'))
        ->updateDNSServers('example.com', ['ns1.loopia.se', 'ns2.loopia.se'])
        ->getResponse();
```

**Update your zone records**

```
    use Olssonm\LoopiaApi\Client;

    $response = (new Client('username', 'password'))
        ->updateZoneRecord('example.com', '@', [
            'type' => 'A',
            'ttl' => '3600',
            'priority' => 10,
            'rdata' => '74.125.0.0',
            'record_id' => 0
        ])
        ->getResponse();
```

Testing
-------

[](#testing)

Copy `/tests/boot.example.php` to `/tests/boot.php` and edit your settings. Then run:

```
vendor/bin/phpunit --bootstrap ./tests/boot.php ./tests/LoopiaApiTests.php
```

Of course the domain under testing needs to be owned by your Loopia account. **Note:** The last test (`test_update_name_servers`) actually modifies your name servers, use with caution.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

© 2021 [Marcus Olsson](https://marcusolsson.me).

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~1111 days

Total

2

Last Release

1787d ago

Major Versions

v1.0 → v2.02021-06-23

PHP version history (2 changes)v1.0PHP ^7.0

v2.0PHP ^7.0|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/74a309aadadeae81baef2394d37375673d03f11133b28a831a30825361d1d68c?d=identicon)[olssonm](/maintainers/olssonm)

---

Top Contributors

[![olssonm](https://avatars.githubusercontent.com/u/907114?v=4)](https://github.com/olssonm "olssonm (7 commits)")

---

Tags

apiloopiaphpxmlrpcxml-rpcolssonmLoopia

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/olssonm-loopia-api/health.svg)

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

###  Alternatives

[phpxmlrpc/phpxmlrpc

A php library for building xmlrpc clients and servers

2414.9M45](/packages/phpxmlrpc-phpxmlrpc)[php-heroku-client/php-heroku-client

A PHP client for the Heroku Platform API

24404.8k4](/packages/php-heroku-client-php-heroku-client)[tivoka/tivoka

The universal JSON-RPC client/server library. JSON-RPC done right!

74159.0k3](/packages/tivoka-tivoka)[ihor/supervisor-xml-rpc

Simple Supervisor XML RPC Client in PHP (http://supervisord.org)

34130.4k1](/packages/ihor-supervisor-xml-rpc)[tbondois/odoo-ripcord

Ripoo : a PHP8 XML-RPC client handler for Odoo External API

16124.3k1](/packages/tbondois-odoo-ripcord)[monitorbacklinks/yii2-wordpress

Yii2 component for integration with Wordpress CMS via XML-RPC API

3326.9k](/packages/monitorbacklinks-yii2-wordpress)

PHPackages © 2026

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