<?php
$q = "bedava araba resimleri";
function f($start, $end, $string) {
preg_match_all('/' . preg_quote($start, '/') . '(.*?)'. preg_quote($end, '/').'/i', $string, $m);
return $m[1];}
$url = "http://www.google.com.tr/search?q=" . urlencode($q) . "&num=100&lr=&cr=&safe=off&start=0&sa=N&filter=0";
$buff = file_get_contents($url);
$links = f('<h2 class=r><a href="','"',$buff);
for ($x=0;$x<count($links);$x++) {
echo $links[$x] . "<br>\n";
}
?>tabi bu google tarfından hoş karşılanırmı bilemem =)
php ile google da arama yaptırmak
11
●1.561
- 04-03-2008, 23:06:45Üyeliği durduruldu
- 08-03-2008, 10:43:32başka bir arama sitesinden, linkleri çekmeye çalıştım ama olmadı yav

hep boş sayfa döndü, amaan neyse ... - 08-03-2008, 17:20:12bunu bir form yardımıyla dahada geliştirmek gerek

teşekkürler bir bakayım nasılmış
edit: bu arada 1 sitenin ikiden fazla linkini almamak için;
http://www.google.com.tr/search?q=" . urlencode($q) . "&num=100&lr=&cr=&safe=off&start=0&sa=N&filter =0 kodunu
http://www.google.com.tr/search?q=" . urlencode($q) . "&num=100&lr=&cr=&safe=off&start=0&sa=N&filter =1 şeklinde değişiverin - 13-04-2008, 10:59:00<center>
<form method="GET" action="arama.php">
</b> <input type="text" name="q" size="30">
<input type="SUBMIT" value="ARA!">
</form>
<center>
<?php
$q = $_GET[q];
function f($start, $end, $string) {
preg_match_all('/' . preg_quote($start, '/') . '(.*?)'. preg_quote($end, '/').'/i', $string, $m);
return $m[1];}
$url = "Google=" . urlencode($q) . "&num=900&lr=&cr=&safe=off&start=0&sa=N&filter =0";
$buff = file_get_contents($url);
$links = f('<h2 class=r><a href="','"',$buff);
for ($x=0;$x<count($links);$x++) {
echo $links[$x] . "<br>\n";
}
?>
şu an bende bi script yazdırdım google api ile çalısıyor ve bişey olacagını sanmıyorum

