How to search images from diferent websites and display without storing it.

(Problem is how to search and display images like google image search with perticular word entered by user)

Recommended Answers

All 2 Replies

Member Avatar for nileshgr

You can use cURL.
Here's a sample -

<?php

$query = $_GET['query'];

curl_exec(curl_init("http://images.google.com/images?q=" . $query));

This would echo the full page returned by Google on the page where you ran this code.

You can use cURL.
Here's a sample -

<?php

$query = $_GET['query'];

curl_exec(curl_init("http://images.google.com/images?q=" . $query));

This would echo the full page returned by Google on the page where you ran this code.

Can u explain this code how it works?
And is it possible to search images from different websites without using GOOGLE as
" curl_exec(curl_init("http://images.google.com/images?q=" . $query)); ??? "

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.