PHPackages                             zguillez/php-tools - 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. zguillez/php-tools

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

zguillez/php-tools
==================

PHP module for common tools

v1.0.3(5y ago)0194MITPHP

Since May 10Pushed 5y ago1 watchersCompare

[ Source](https://github.com/zguillez/php-tools)[ Packagist](https://packagist.org/packages/zguillez/php-tools)[ RSS](/packages/zguillez-php-tools/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (4)Versions (15)Used By (0)

php-tools
=========

[](#php-tools)

[![Join the chat at https://gitter.im/zguillez/php-tools](https://camo.githubusercontent.com/4a25fa9c31709b525a84a811ee8d3b94a512b0d4c3cabbcd5357dfc81abb46d0/68747470733a2f2f6261646765732e6769747465722e696d2f7a6775696c6c657a2f7068702d746f6f6c732e737667)](https://gitter.im/zguillez/php-tools?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)[![License](https://camo.githubusercontent.com/e498eead712d82d9ee1af0a4850acd2e46ea48c48fb9ce5a3d2ab64f28f95b34/687474703a2f2f696d672e736869656c64732e696f2f3a6c6963656e73652d6d69742d626c75652e737667)](http://doge.mit-license.org)

PHP module for common tools

Getting Started
===============

[](#getting-started)

### Add package to composer.json

[](#add-package-to-composerjson)

`composer require zguillez/php-tools`

```
//packaje.json
{
    "require": {
        "zguillez/php-tools": "^0.1.0"
    }
}

```

Usage:
======

[](#usage)

```
require 'vendor/autoload.php';
use Z\Tools;

$tools = new Tools();
$tools->test('This is a test!');

```

Examples
========

[](#examples)

HTTP/GET
--------

[](#httpget)

```
$data  = ['nombre' => 'test', 'apellidos' => 'test', 'email' => 'test@test.com'];
$result = $tools->get('https://dummy.webservice.com/json', $data, true);
$tools->test($result);

```

HTTP/POST
---------

[](#httppost)

```
$data  = ['nombre' => 'test', 'apellidos' => 'test', 'email' => 'test@test.com'];
$result = $tools->post('https://dummy.webservice.com/json', $data, true);
$tools->test($result);

```

DATABASE
--------

[](#database)

```
$db = $tools->database('***.***.***.***', 'user', '********', 'database');
$db->sql('INSERT INTO dummy_table SET value=1']);
leadid = $db->sql2lead('INSERT INTO dummy_table SET value=1']);
$tools->test($result);

```

EXCEL
-----

[](#excel)

```
$data = [[1, "a"], [2, "b"], [3, "c"], [4, "d"]];
$tools->excel('test', $data, ['id', 'value']);

```

DATABASE 2 EXCEL
----------------

[](#database-2-excel)

```
$data = $tools->sql2array('SELECT * FROM dummy_table');
$tools->excel('test', $data, ['id', 'value', 'created_at'], true);

```

```
$tools->sql2csv('test', 'SELECT * FROM dummy_table', ['id', 'value', 'created_at']);

```

```
$tools->sql2excel('test2', 'SELECT * FROM dummy_table', ['id', 'value', 'created_at']);

```

Contributing and issues
=======================

[](#contributing-and-issues)

Contributors are welcome, please fork and send pull requests! If you have any ideas on how to make this project better then please submit an issue or send me an [email](mailto:mail@zguillez.io).

License
=======

[](#license)

©2020 Zguillez.io

Original code licensed under [MIT](https://en.wikipedia.org/wiki/MIT_License) Open Source projects used within this project retain their original licenses.

Changelog
=========

[](#changelog)

### v1.0.0 (Mar 10, 2020)

[](#v100-mar-10-2020)

- z-database package
- z-http package

### v0.1.0 (May 31, 2017)

[](#v010-may-31-2017)

- GET/POST curl
- Database connect
- CSV/EXCEL file export

### v0.0.1 (May 10, 2017)

[](#v001-may-10-2017)

- Initial implementation

[![Analytics](https://camo.githubusercontent.com/308dd711602c0a46027be27e8cf2d64205394c4e1e665eb6a4e0f7b7b8932d3d/68747470733a2f2f67612d626561636f6e2e61707073706f742e636f6d2f55412d313132353231372d33302f7a6775696c6c657a2f7068702d746f6f6c733f706978656c)](https://github.com/igrigorik/ga-beacon)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity71

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 ~98 days

Recently: every ~62 days

Total

14

Last Release

2010d ago

Major Versions

v0.1.5 → v1.0.02020-03-10

### Community

Maintainers

![](https://www.gravatar.com/avatar/5ae4906406c20dee4d4ea1cfe9245b7e416dd4a8d19f9963a195e38707dbd16a?d=identicon)[zguillez](/maintainers/zguillez)

---

Top Contributors

[![zguillez](https://avatars.githubusercontent.com/u/2631152?v=4)](https://github.com/zguillez "zguillez (20 commits)")

---

Tags

phpcurlmysqlmailgunwebservice

### Embed Badge

![Health badge](/badges/zguillez-php-tools/health.svg)

```
[![Health](https://phpackages.com/badges/zguillez-php-tools/health.svg)](https://phpackages.com/packages/zguillez-php-tools)
```

###  Alternatives

[stefangabos/zebra_curl

A high performance solution for making multiple HTTP requests concurrently, asynchronously from your PHP projects using cURL

21971.3k2](/packages/stefangabos-zebra-curl)[khr/react-curl

multi curl driver for reactphp.

1637.2k1](/packages/khr-react-curl)[maurobonfietti/rest-api-slim-php

Example of REST API with Slim PHP Framework.

3061.7k](/packages/maurobonfietti-rest-api-slim-php)[ismaeltoe/osms

PHP library wrapper of the Orange SMS API.

4540.0k](/packages/ismaeltoe-osms)

PHPackages © 2026

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