saintx adlı üyeden alıntı: mesajı görüntüle
Yapılan aramada 16 adet sonuç döndürür. Oluşturduğum yapı üzerinden çalışmanıza devam edebilirsiniz. İyi çalışmalar

<?php
	
	/*
	 * SAINTX > Google Resim Botu
	 *
	 * @author: SAINTX
	 * @web: http://saintx.net
	 * @email: im[at]saintx[net]
	 * @date: 18.06.2013
	 */
	
	class SAINTX {
		const AUTHOR = 'SAINTX';
		const GOOGLE_IMAGES_API_URL = 'https://ajax.googleapis.com/ajax/services/search/images';
		
		public $results = null;
		public $api_request_query_string = null;
		public $api_request_url = null;
		public $api_request_returned_contents = null;
		
		public function getResults() {
			$this->buildApiRequestQueryString();
			$this->buildApiRequstURI();
			$this->getContent();
			
			foreach(end($this->api_request_returned_contents) as $result)
				array_push($this->api_request_returned_contents[0], $result);
			
			array_pop($this->api_request_returned_contents);
			$this->api_request_returned_contents = end($this->api_request_returned_contents);
			
			$this->results = $this->api_request_returned_contents;
		}
		
		public function buildApiRequestQueryString() {
			$this->api_request_query_string = array(
				"q1" => array(
					"v=1.0",
					"q=".(($_POST['kelime'] == '') ? urlencode('diren gezi parkı') : urlencode($_POST['kelime'])),
					"start=".(($_POST['sayfa'] <= 0) ? 0 : ($_POST['sayfa'] * 8)),
					"rsz=8"
				),
				"q2" => array(
					"v=1.0",
					"q=".(($_POST['kelime'] == '') ? urlencode('diren gezi parkı') : urlencode($_POST['kelime'])),
					"start=".(($_POST['sayfa'] <= 0) ? 1 : (($_POST['sayfa'] + 1) * 8)),
					"rsz=8"
				),
			);
		}
		
		public function buildApiRequstURI() {
			$this->api_request_url = array(
				"r1" => static::GOOGLE_IMAGES_API_URL.'?'.implode('&', $this->api_request_query_string["q1"]),
				"r2" => static::GOOGLE_IMAGES_API_URL.'?'.implode('&', $this->api_request_query_string["q2"])
			);
		}
		
		public function getContent() {
			$this->api_request_returned_contents = array(
				json_decode($this->html($this->api_request_url["r1"]))->responseData->results,
				json_decode($this->html($this->api_request_url["r2"]))->responseData->results
			);
		}
		
		public function html($url, $iconv=false, $iconv_in_charset='', $iconv_out_charset='') {
			return ($iconv) ? iconv($iconv_in_charset, $iconv_out_charset, @file_get_contents($url)) : @file_get_contents($url);
		}
	}
	
	$BOT = new SAINTX;
	
?><!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>.google resim botu</title>
		<link rel="stylesheet" type="text/css" href="http://necolas.github.io/normalize.css/2.1.2/normalize.css" />
		<style type="text/css">
			html, body { margin: 0; padding: 1em; font-family: "Georgia" }
			div.bosluk { width: 100%; height: 1em; clear: both }
			h1 { margin: 0; padding: 0; font-weight: normal; font-size: 125%; text-decoration: underline }
			a.url { font-size: 125%; color: #666666; text-decoration: none }
			a.url:hover { text-decoration: underline; color: #000 }
		</style>
	</head>
	<body>
		<form method="post">
			<label for="kelime">.kelime;</label>
			<input type="text" name="kelime" id="kelime" />
			<label for="sayfa">.sayfa;</label>
			<input type="text" name="sayfa" id="sayfa" value="1" />
			<button type="submit">.getir</button>
		</form><?php if($_POST): $BOT->getResults(); ?>
		<div class="bosluk"></div>
		<div id="sonuclar">
			<h1>.sonuclar</h1>
			<div class="bosluk"></div><?php foreach($BOT->results as $result): ?>
			<img src="<?=$result->url;?>" width="160" height="160" />
			<br />
			<a href="<?=$result->url;?>" class="url" target="_blank"><?=$result->titleNoFormatting;?></a><br /><hr /><br />
		</div><?php endforeach; endif; echo PHP_EOL; ?>
	</body>
</html>
gerçekten süpere benziyor fakat, bir takım hata aldım.
Notice: Trying to get property of non-object in D:\xampp\htdocs\botz\google2.php on line 61

Notice: Trying to get property of non-object in D:\xampp\htdocs\botz\google2.php on line 61

Notice: Trying to get property of non-object in D:\xampp\htdocs\botz\google2.php on line 62

Notice: Trying to get property of non-object in D:\xampp\htdocs\botz\google2.php on line 62

Warning: Invalid argument supplied for foreach() in D:\xampp\htdocs\botz\google2.php on line 26
.sonuclar

Warning: Invalid argument supplied for foreach() in D:\xampp\htdocs\botz\google2.php on line 98