Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rem42/scraper-tinypng
TinyPNG uploader via scraper
https://github.com/rem42/scraper-tinypng
Last synced: 3 days ago
JSON representation
TinyPNG uploader via scraper
- Host: GitHub
- URL: https://github.com/rem42/scraper-tinypng
- Owner: rem42
- License: mit
- Created: 2018-08-28T10:41:55.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-09-07T06:34:39.000Z (over 6 years ago)
- Last Synced: 2024-11-08T18:04:48.675Z (2 months ago)
- Language: PHP
- Size: 4.88 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Scraper TinyPNG
=======This scraper TinyPNG use [Scraper](https://github.com/rem42/scraper).
Installation
------------````bash
$ composer require rem42/scraper-tinypng "^1.0"
````Configuration
-------------Nothing Needed
Usage
-----````php
setFileContent(file_get_contents('path to your file'))
->setUserAgent('Need a browser user agent to work !')
;
$client = new Client();
$result = $client->api($request);
````In the result var there is the Upload entity wich contains all the result from tinypng json response serialized in this entity.
You can also use a web upload and you only need tu set an url :
````php
setUrl('url to your file')
->setUserAgent('Need a browser user agent to work !')
;
$client = new Client();
$result = $client->api($request);
````