Finds bigger image versions online
A tiny PHP class to find bigger versions of images online. And also guess the name of any image. It's actually a hack, that makes use of Google Similar Image Search.
- Tiny size
- Zero dependencies
- Object-oriented usage
- Easy to use (1 function, returns an array)
Just copy the class.webimagemaximizer.php into your working path, where it is easily accessible by your PHP script.
A Simple Example
<?php require_once("class.webimagemaximizer.php"); // url for any small image $smallImage = "http://4.bp.blogspot.com/-V0A30kKCaKE/U9YgNkcnKzI/AAAAAAACV4I/4ECi9eQGxxY/s1600/borjkajpiza.jpg"; // $result will contain the images information $result = webImageMaximizer::getRelatedImages($smallImage); header('content-type: text/plain'); echo "Your image: " . $smallImage . "\n"; echo "Online search results: \n"; echo "\n"; print_r($result); ?>
You'll find plenty more to play with in the examples folder.
You can use this class to make a tiny guessing game where people input their images and this class finds out the name of given image. Check out the guessing game demo.
To find out what an image infront of you actually means, you can make use of the
- Since this class works on Google's unofficial API. Thing's might change unexpectedly.
- This class was made during a 2 hour educational hackathon. Don't use it in your proprietary code without checking Google's TOS.
Please submit bug reports, suggestions and pull requests to the GitHub issue tracker. I would be happy if someone helps in expanding its functionality by adding more useful threading features such as joining threads and thread-pooling.
This software is licenced under the LGPL 2.1. Please read LICENSE for information on the software availability and distribution.