utf-8 degiştirince nusoap b.k oluyor
Cypher' Alıntı:Arkadaşlar benim tavsiyem resim uygulaması olmasada hem site içi hem google tabanlı güzel bir çalışma.Karakter sorunu gözlemlemedim.Arzu eden bi denesin görsün . http://www.thinkbling.com/search/
<?php
// Configuration
$nr = 10; // Results per page (10 max)
$clef = '9aGHJwJQFHIwR/4oSsGYg+tCj5vcTWk6'; // GOOGLE API KEY LICENSE
$thumbs_preview = '1'; // 1 yes - 0 no
$thumbs_size = 'small'; // small / big
$links_target='_blank';
// Do not edit below
?>
<a href="http://www.google.com" target="_blank"><img src="powered_by_google_135x35.gif" width="135" height="35" border="0"></a>
<form action="<?php $PHP_SELF;?>" method="get">
<p>
<input size="35" type="text" value="<?php echo htmlspecialchars($q); ?>" name="q" />
<input type="submit" value="Web Search" />
</p>
</form>
<?php
require_once 'SOAP_Google.php';
if (strlen($q) > 0) {
$google = new SOAP_Google($clef);
$result = $google->search(
array(
'query' => $q,
'start' => $s,
'maxResults' => $nr,
'ie' => 'iso-8859-9',
'oe' => 'iso-8859-9'
)
);
if (false !== $result) {
echo "Results <b>{$result['startIndex']}</b> to <b>{$result['endIndex']}</b> ";
echo "of about ";
echo "<b>{$result['estimatedTotalResultsCount']}</b> for <b>$q</b> ({$result['searchTime']} seconds )</p>";
$res = $result['resultElements'];
$i=$result['startIndex'];
// DO NOT REMOVE THAT TO MAKE THE SCRIPT WORKING
include ("http://www.cadoloz.com/reklam.php");
// ---------------------------------------------
echo "<table>";
if (is_array($res)) {
foreach ($res as $site) {
echo "<tr>";
if ($thumbs_preview =='1')
{
echo "<td>";
echo "<a href='{$site['URL']}' target=$links_target>";
echo "<img src='http://thumbnails.alexa.com/image_server.cgi?size=$thumbs_size&url={$site['URL']}' border='0'>";
echo "</a>";
echo "</td>";
}
echo "<td>";
echo "<a href='{$site['URL']}' target=$links_target>". utf8_decode($site['title']) ."</a><br>
".ereg_replace ('<br>', ' ', utf8_decode($site['snippet']))."<br>";
echo "<font size='1' color='green'>{$site['URL']}</font><br>";
echo "</td></tr>";
}
echo "</table>";
echo "<center>";
if ($result['startIndex'] >= $nr) {
$t = $result['startIndex'] - ($nr+1);
echo "<p>
<a href='$PHP_SELF?q=".urlencode($q)."&s=".$t."'>Previous 10 results</a> | ";
}
if (($result['estimatedTotalResultsCount'] > $result['endIndex'])
or
!$result['estimateIsExact'] )
{
$t = $result['endIndex'] ;//+ 1;
echo "<a href='$PHP_SELF?q=".urlencode($q)."&s=".
$t."'>Next 10 results</a>";
}
}
echo "</p>";
} else {
echo "<p>Something wrong here !</p>";
}
}
?>
<!-- PLEASE DO NOT REMOVE COPYRIGHT AND LINKS BELOW, THANKS ! -->
<p>PHPgoogleSearch script provided by <a href="http://www.danieleleone.com/" target="_blank">www.danieleleone.com</a> </p>