şu şekilde basit bişey hazırladım;

index.html:


Arama Motoru









sonuclar.php:


Sonuçlar



<script>
function sonuclar(response) {
for (var i = 0; i < response.items.length; i++) {
var item = response.items[i];
document.getElementById("sonuc_yukle").innerHTML += "
" + item.htmlTitle;
}
}
</script>

</script>




bunu php kullanmadanda yapabilirsin, olay js'de bitiyor sonuçta.


https://www.googleapis.com/customsearch/v1?key=GOOGLE_CUSTOM_SEARCH_API'Nİ_BURAYA GİR&cx=CX_KODUNU_BURAYA_GİR&q='.$_GET["aranan"].'&callback=sonuclar

Google custom search api'sini burdan alabilirsin: https://console.developers.google.com/apis/api/customsearch/overview

cx kodunu ise: https://cse.google.com/cse/all adresine girdikten sonra bir amrama motoru oluşturuyoruz, daha sonra soldaki menüden "kurulum" linkine tıklıyoruz, devamında ise kodu al butonuna basıyoruz. açılan sayfada önümüze gelen koddan sadece cx değişkenine atanan kısmı alıyoruz.

olay bu, gayet basit.