Türkiye'nin En Eski Webmaster Forumu İyinet'e Hoşgeldiniz!

Sayyac.com botunu veritabanına nasıl kayıt edilir

CoLd!uX

0
Onaylı Üye
Üye
Katılım
9 Mayıs 2008
Mesajlar
509
Açılan Konu
127
Tepki puanı
1
kodlamayı nereye ve nasıl entegre yapıcam ve mysqlde kaç tane sütün eklemem gerekiyor örneğin id,sonuc şeklindemi acaba aşağıda bir tane buldum çekiyor fakat veritabına yine kayıt etmiyor tablo sütün isimleri nelerdir kafam karıştı deliricem..

PHP:
<? 
include("vt.php"); 
mysql_connect($server,$dbuser,$pass); 
mysql_select_db($dbname); 
function cevir($url) 
{ 
$url = trim($url); 
$url = strtolower($url); 
$find = array('', ''); 
$url = str_replace ($find, '', $url); 
$url = preg_replace('/<(\/{0,1})img(.*?)(\/{0,1})\>/', 'image', $url); 
$find = array(' ', '"', '&', '&', '\r\n', '\n', '/', '\\', '+', '<', '>'); 
$url = str_replace ($find, '-', $url); 
$find = array('é', 'è', 'ë', 'ê', 'É', 'È', 'Ë', 'Ê'); 
$url = str_replace ($find, 'e', $url); 
$find = array('í', 'ı', 'ì', 'î', 'ï', 'I', 'İ', 'Í', 'Ì', 'Î', 'Ï'); 
$url = str_replace ($find, 'i', $url); 
$find = array('ó', 'ö', 'Ö', 'ò', 'ô', 'Ó', 'Ò', 'Ô'); 
$url = str_replace ($find, 'o', $url); 
$find = array('á', 'ä', 'â', 'à', 'â', 'Ä', 'Â', 'Á', 'À', 'Â'); 
$url = str_replace ($find, 'a', $url); 
$find = array('ú', 'ü', 'Ü', 'ù', 'û', 'Ú', 'Ù', 'Û'); 
$url = str_replace ($find, 'u', $url); 
$find = array('ç', 'Ç'); 
$url = str_replace ($find, 'c', $url); 
$find = array('ş', 'Ş'); 
$url = str_replace ($find, 's', $url); 
$find = array('ğ', 'Ğ'); 
$url = str_replace ($find, 'g', $url); 
$find = array('/[^a-z0-9\-<>]/', '/[\-]+/', '/<[^>]*>/'); 
$repl = array('', '-', ''); 
$url = preg_replace ($find, $repl, $url); 
$url = str_replace ('--', '-', $url); 
return $url; 
} 
  function getdata($url,$ref=lisanssız) 
    { 
        $ch = curl_init(); 
        curl_setopt($ch,CURLOPT_URL,$url); 
        curl_setopt($ch,CURLOPT_HEADER,0); 
        curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); 
        curl_setopt($ch,CURLOPT_USERAGENT,"Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"); 
        $data = curl_exec($ch); 
        curl_close($ch); 
        return $data; 
    } 
            $account    = 'xxxxxxx'; 
            $connection = getdata('http://www.sayyac.com/tr/stats/referrer_tracking/'.$account); 
            $tags = array(); 
            preg_match_all('#Google:(.*?)</td>#si',$connection,$match,PREG_SET_ORDER); 
            for($i=0; $i<count($match); $i++) 
            { 
                preg_match('#>(.*?)</a>#si',$match[$i][1],$tit); 
                $tags[] = $tit[1]; 
            } 
            foreach($tags as $tag) 
            { 
                echo $tag.'<br/>'; 
            } 
while($m<=20) { 
$aranan=$baslik[2][$m]; 
$aranan=str_replace(array("Ş","ÅŸ","Ç","ç","İ" ,"Ü","ü","Ö","ö","Ğ","ÄŸ","ı"),array("Ş","ş" ,"Ç","ç","İ","Ü","ü","Ö","ö","Ğ","ğ","ı"),$aranan) ; 
$td=mysql_query("select * from tag WHERE baslik='$aranan'"); 
$td_row=mysql_fetch_array($td); 
$url=cevir($aranan); 
if($td_row[baslik]=="" && $aranan!="") { mysql_query("insert into tag values('','$aranan','$url',NOW())"); } 
$bg=mysql_query("select * from tag"); 
$m++; 
} 
$toplam=mysql_num_rows($bg); 
$ra=$_GET[r]+1; 
if($_GET[r]==count($site)) { $ra="1"; } 
echo $ra; 
?>
 
Üst