$ch = curl_init(); $timeout = 10; curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (X11; U; Linux x86_64; en; rv:1.9.0.19) Gecko/20080528 Epiphany/2.22'); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout); $data = curl_exec($ch); curl_close($ch); return $data; } if ($_POST) { $dizi = array(); $keyword = $_POST['keyword']; $etiketGoogleTag = str_replace(' ', '+', $keyword); $Site = getir('https://www.google.com.tr/search?hl=tr&as_q=' . $etiketGoogleTag . ''); $Site = str_replace(array("\t", "\n", "\r"), "", $Site); $Pattern = '|<p class="(.*?)"><a href="/search?(.*?)">(.*?)</a></p>|si'; preg_match_all($Pattern, $Site, $Sonuc); $tags = array(); foreach ($Sonuc[3] as $tag) { $tags[] = strip_tags($tag); } $tags = implode(',', $tags); $dizi['data'] = $tags; echo json_encode($dizi); } } ?>
$sorgu = "INSERT INTO mesajciklar "; $sorgu .= "(sira,mesaj,yazar,ip,tarih,gun,ay,yil,saat)"; $sorgu .= " VALUES "; $sorgu .= "('$id','".mysql_real_escape_string($mesaj)."','$yazar','$ip','$tarih','$gun','$ay','$yil','$saat')"; mysql_query($sorgu); // mesajida yazdik //rss pingliyoruz. include "config.php"; $sitemap = $siterss; if ($sorgu) { $pingle = pingGoogleSitemaps($sitemap); $rss = "http://pingomatic.com/ping/?title=Anka+Sozluk&blogurl=$site&rssurl=$siterss&chk_weblogscom=on&chk_blogs=on&chk_technorati=on&chk_feedburner=on&chk_syndic8=on&chk_newsgator=on&chk_myyahoo=on&chk_pubsubcom=on&chk_blogdigger=on&chk_blogrolling=on&chk_blogstreet=on&chk_moreover=on&chk_weblogalot=on&chk_icerocket=on&chk_newsisfree=on&chk_topicexchange=on&chk_google=on&chk_tailrank=on&chk_bloglines=on&chk_postrank=on&chk_skygrid=on&chk_collecta=on&chk_audioweblogs=on&chk_rubhub=on&chk_geourl=on&chk_a2b=on&chk_blogshares=on"; $rss=getir($rss); } else {} // ekranada basiyoz echo " <script language=\"javascript\">goUrl('sozluk.php?process=today','left');</script> <META HTTP-EQUIV=\"REFRESH\" CONTENT=\"0;URL=sozluk.php?process=word&q=$baslik\">"; } // bitirdik IF i function form($baslik) { ?>
<?php $sql = "select * from m_terim"; function getir($sql) { $conn = oci_connect("yeni3", "yeni3", "//10.6.30.11/mykdb"); $s = oci_parse($conn, $sql); $res = oci_execute($s); oci_fetch_all($s, $res); return $res; oci_close($conn); } function isle($sql) { $conn = oci_connect("yeni3", "yeni3", "//10.6.30.11/mykdb"); $s = oci_parse($conn, $sql); $res = oci_execute($s); oci_fetch_all($s, $res); return $res; oci_close($conn); } $a = getir($sql); print_r($a[TERIM_ID]); for ($i = 0; $i < $a[TERIM_ID]; $i++) { echo $row[TERIM_ID][$i] . " - " . $row[TERIM_ADI][$i] . " - " . $row[TERIM_ACIKLAMA][$i] . "<br>"; }