Login   Register  
PHP Classes
elePHPant
Icontem

File: uploadfile.example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Jakub Krol  >  Glowfoto API  >  uploadfile.example.php  >  Download  
File: uploadfile.example.php
Role: Example script
Content type: text/plain
Description: Complex example - will upload local file - show: local file, uploaded file, thumbnail + all codes and URLs
Class: Glowfoto API
Upload images to Glowfoto using its API
Author: By
Last change: __DIR__ added
Date: 2012-10-01 09:49
Size: 693 bytes
 

Contents

Class file image Download
<?php
    
// In this example we will upload file from filesystem (image.example.jpg).

    
include_once('glowFoto.class.php');
    
$glowFoto = new GlowFotoAPI();
    
$glowFoto->setThumbSize(GlowFotoAPI::THUMB_SIZE_100);
    echo 
__DIR__.'/image.example.jpg...<br>';
    
$URLs=$glowFoto->fastSendFromFile(__DIR__.'/image.example.jpg');
    echo 
'READY!<br><center><table><tr><th>Original image</th><th>Uploaded image</th><th>Thumbnail 100x100</th></tr><tr><td><img src="image.example.jpg"></td><td><img src="'.$URLs['img'].'"></td><td><img src="'.$URLs['thumb'].'"></td></tr></table><br><br>All codes:<br><textarea rows=10 cols=55>'.  var_export($URLstrue).'</textarea></center>';
?>