PHPackages                             jsobeslav/webproxy - 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. jsobeslav/webproxy

ActiveLibrary[API Development](/categories/api)

jsobeslav/webproxy
==================

WebProxy is PHP library that offers consistent interface for communicating with standard third-party web services, be it API or an ordinary website

0.1.6(6y ago)11332[1 issues](https://github.com/jsobeslav/WebProxy/issues)CC-BY-4.0PHPPHP &gt;=7.1

Since Jan 17Pushed 6y ago1 watchersCompare

[ Source](https://github.com/jsobeslav/WebProxy)[ Packagist](https://packagist.org/packages/jsobeslav/webproxy)[ RSS](/packages/jsobeslav-webproxy/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (2)Dependencies (7)Versions (6)Used By (0)

Overview
========

[](#overview)

- WebProxy is PHP library that offers consistent interface for communicating with standard third-party web services, be it API or an ordinary website.
- It offers parsing JSON response from REST API, scrapping and crawling HTML code from website, or calling methods on SOAP services.
- To clarify certain potential misconceptions, please see terminology chapter below.

Included libraries / dependencies
---------------------------------

[](#included-libraries--dependencies)

- For HTTP: `guzzlehttp/guzzle` |
- For HTML crawling: `symfony/dom-crawler` | [https://symfony.com/doc/current/components/dom\_crawler.html](https://symfony.com/doc/current/components/dom_crawler.html)
- For SOAP: native `SoapClient` |

Usage
=====

[](#usage)

Examples
--------

[](#examples)

- For implemented examples, see `demo` folder.

General guide
-------------

[](#general-guide)

- Create Service class that extends suitable child
    - Options are:
        - `RestApi` (for REST APIs)
        - `Website` (for crawling trough Websites)
        - `SoapService` (for SOAP APIs)
    - Fill in the missing interface methods
        - `getUri()`: return base URI where service is located.
            - For `HttpService` it's base URI. E.q. `return 'https://jsonplaceholder.typicode.com';`
            - For `SoapService` it's WSDL URI. E.q. `return 'https://soapexample.com?wsdl';`
- Create Endpoint classes that extends children appropriate to selected Service type
    - Options are:
        - `RestResource` (for `RestApi`)
        - `Webpage` (for crawling trough `Website`)
        - `SoapEndpoint` (for `SoapService`)
    - Fill in the missing interface methods, and optional class variables
        - `getServiceClass()`: Return class of appropriate service. E.q. `return JsonPlaceholderRestApi::class;`
        - `getRequestName()`: Return specification of request that the endpoint performs.
            - For `HttpService`, it's URI appendend after base Service URI. E.q. `return '/posts';`
            - For `SoapService`, it's method name. E.q. `return 'getPosts';`
        - `$supportedMethods`: Optional whitelist for HttpServices. E.q. `return [Method::POST];`
    - Write methods to filter the results
        - For `RestResource`, utilize parsed data object: `return $this->getResponseData()['id'];`
        - For `Websites`, utilize Symfony DOM Crawler: `return $this->getCrawler()->filter('.address h3')->text();`
        - For `SoapEndpoints`, utilize parsed data: `return $this->getResponseData()['result'];`
- Initialize `WebProxy` object (`new WebProxy()`) and desired endpoints (`new ExampleResource()`)
- Pass new instance of the custom endpoint to `WebProxy` trough one of its methods
    - `get`, `post`, `put`, `delete` as shorthands for HTTP Requests
    - `httpRequest` for customized HTTP Requests
    - `call` as shorthand for SOAP request
    - `soapRequest` for customized SOAP Requests
- for specific purposes, you might want to use `httpRequest` and `soapRequest` methods with custom `Request` object
    - For example, default POST body type is Form-data, or Multipart (if files are sent with it). To send JSON, use `Request::create(Method::POST)->withJsonBody(['array','content])`
    - pass instance of the `Request` as second parameter to mentioned methods
- Use returned modified instance of endpoint to return parsed data

Terminology used
================

[](#terminology-used)

- `Client`: A class that is responsible for performing request on `Endpoint` located on `Service`, and fetching the response body
    - `HttpClient`: Contains single Guzzle instance to perform all requests
    - `SoapClient`: Passes requests to every independent `SoapService`'s own instance of **native** `SoapClient`
- `Service`: A collection of endpoints located on single domain.
    - `HttpService`: Service acessible trough HTTP requests
        - `RestApi`: REST API containing multiple `RestResource`s
        - `Website`: Site containg multiple `Webpage`s
    - `SoapService`: Service accessible trough SOAP calls
- `Endpoint`: One specific function of `Service`
    - `HttpEndpoint`: Specific URI on `HttpService`
        - `RestResource`: RESTful `HttpEndpoint`
        - `Webpage`: `HttpEndpoint` that returns HTML
    - `SoapEndpoint`: A method of `SoapService`

###  Health Score

20

↓

LowBetter than 14% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity49

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

Every ~50 days

Total

5

Last Release

2476d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e32308a00bbaa83d516152c1ba9a56a693ee04971b35fe5c94561fe077b10b4c?d=identicon)[jsobeslav](/maintainers/jsobeslav)

---

Top Contributors

[![jsobeslav](https://avatars.githubusercontent.com/u/12729500?v=4)](https://github.com/jsobeslav "jsobeslav (16 commits)")

###  Code Quality

TestsCodeception

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/jsobeslav-webproxy/health.svg)

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

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.6k](/packages/craftcms-cms)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[sleeping-owl/apist

Package to provide api-like access to foreign sites based on html parsing

3105.3k](/packages/sleeping-owl-apist)[sproutcms/cms

Enterprise content management and framework

241.6k4](/packages/sproutcms-cms)

PHPackages © 2026

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