PHPackages                             grithin/phpwebtools - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. grithin/phpwebtools

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

grithin/phpwebtools
===================

PHP Curl, DOM, web data parsing tools.

v1.0.0(10y ago)138Apache-2.0PHPPHP &gt;=5.5.9

Since Oct 9Pushed 9y ago1 watchersCompare

[ Source](https://github.com/grithin/phpwebtools)[ Packagist](https://packagist.org/packages/grithin/phpwebtools)[ Docs](http://devtools.grithin.com)[ RSS](/packages/grithin-phpwebtools/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Grithin's PHP Web Tools
=======================

[](#grithins-php-web-tools)

Curl
----

[](#curl)

Basic curl class to handle the various curl function and avoid some common pitfalls of php curl (ex: post encoding being larger than browser post encoding).

### Common Use

[](#common-use)

```
use \Grithin\Curl;

$curl = new Curl;

# can set headers either directly using 'options' or through instance attributes
$curl->options['CURLOPT_USERAGENT'] = 'harmless autobot';
$curl->user_agent = 'harmless autobot';

# can provide GET parameters as an array or as a string
$response = $curl->get('http://google.com/?s=bob');
$response = $curl->get('http://google.com/',['s'=>'bob']);

$response = $curl->post('http://google.com/',['s'=>'bob']);
$response = $curl->post('http://google.com/','s=bob');
$response = $curl->post('http://google.com/',json_encode(['bob'=>'s']));
```

### File upload

[](#file-upload)

Uses the old style, but works well enough

```
$response = $curl->post('http://thoughtpush.com/', ['s'=>'bob'], ['file1'=>'@'.__FILE__]);
```

### Response Object

[](#response-object)

The Curl-send methods return a CurlReponse object with a `headers` array attribute and a `body` string attribute.

```
use \Grithin\Curl;

$curl = new Curl;
$response = $curl->get('http://thoughtpush.com');

\Grithin\Debug::out($response->headers);
/*
[base:index.php:14] 1: [
	'Http-Version' : '1.1'
	'Status-Code' : '200'
	'Status' : '200 OK'
	'Server' : 'nginx/1.4.6 (Ubuntu)'
	'Date' : 'Fri, 09 Oct 2015 19:36:01 GMT'
	...
*/
\Grithin\Debug::out($response->body);
/*
[base:index.php:15] 2: '

        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

*/
```

### Debugging

[](#debugging)

```
$curl->options[CURLOPT_VERBOSE] = true;
```

DomTools
--------

[](#domtools)

Methods used for better handling of DOM and xpath.

Read the inline code comments

```
list($dom, $xpath) = DomTools::loadHtml($response->body);
```

WebData
-------

[](#webdata)

Various web data methods including ones used to fulfill ASP validations by parsing responses and setting post parameters.

Read the inline code comments

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

3920d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4543facab3c88d548b98d8472b532faf7bcd00555cc47c0dc808d935f8d3d73f?d=identicon)[grithin](/maintainers/grithin)

---

Top Contributors

[![grithin](https://avatars.githubusercontent.com/u/7241358?v=4)](https://github.com/grithin "grithin (3 commits)")

---

Tags

php tools curl dom xpath asp

### Embed Badge

![Health badge](/badges/grithin-phpwebtools/health.svg)

```
[![Health](https://phpackages.com/badges/grithin-phpwebtools/health.svg)](https://phpackages.com/packages/grithin-phpwebtools)
```

###  Alternatives

[graze/data-structure

Data collections and containers

12295.9k10](/packages/graze-data-structure)[joungkyun/ereg-extension-wrapper

pure PHP EREG extension wrapper

102.9k](/packages/joungkyun-ereg-extension-wrapper)

PHPackages © 2026

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