Introduction to PHP Image Generator
Hello everyone, this is my new post after 2 weeks of nothing
By the way, i used to have an idea about automatic image or thumbnail generator. What is automatic image generator? Image generator is a generator for image:-)
Here is the demo.
- When you call the URL like
http://img.hokya.com/carit will generates the image of car. - When you call the URL like
http://img.hokya.com/cowit will generate the image of the cow.
How can it be? I am not saving the picture on the database and file storage that will be streamed while people trying to load it. I use Google Image databases for doing this. The method is using PHP CURL and simple PHP preg_match to load return address of Google Image Results. Pretty simple isn’t it? The algorithm goes:
- Extract the query from URL into variable using simple String commands and .htaccess mod rewrite
- Load Google Image Result Page using CURL
- Searching for random image src from img tag using preg_match and save it into variable
- Load the image from saved src variable using CURL
- Print the image content and put attribute Content-type: image/jpeg into it so the browser consider it as image, not as PHP script
Usage
It is a free script and mod for everyone. You can use it on yourown and on anything online. It’s work well and sometimes save your time looking for proper image for posts.
Pass it on your img tag for example:
<img src="http://img.hokya.com/book" />
<img src="http://img.hokya.com/bill-gates" />
<img src="http://img.hokya.com/barrack-obama" />
It’s just too easy to use it. You can pass an address when posting a post on WordPress (for example) .
- Open up Add New Post
- Insert An Image
- Point to From URL
- And Type your desired image about, for example http://img.hokya.com/desired
Globally, the usage is pointing to address http://img.hokya.com/your-desired-image-aboutI hope you love it and want to try and give feedback for me






Romeo
Considerably, the article is in reality the sweetest on this notable topic.
gucci handbags
Good! Thank you!
Nice tool
Samuel
Kip it up gal! I just found ur blog! Its nice thanks and hv contacted u dnt 4get to reply tanx