File: example_batch.php

Recommend this page to a friend!
  Classes of Mark Rolich  >  PHP lib for PunyPNG API  >  example_batch.php  >  Download  
File: example_batch.php
Role: Example script
Content type: text/plain
Description: batch mode example
Class: PHP lib for PunyPNG API
Compress images using the PunyPNG Web service
Author: By
Last change:
Date: 7 years ago
Size: 418 bytes


Class file image Download
include 'PunyPNG.php';

$pp = new PunyPNG();
$pp->apiKey = 'replace-with-your-api-key';
$pp->batchMode = true;

$images = array(
// this will fail, filesize exceeds 500kb limit




For more information send a message to info at phpclasses dot org.