$value) { $post_string .= $key.'='.urlencode(trim($value)).'&'; } rtrim($post_string, '&'); curl_setopt($ch,CURLOPT_POST, count($post)); curl_setopt($ch,CURLOPT_POSTFIELDS, $post_string); } $result=curl_exec($ch); return $result; } function paging($c,$t,$link,$seperator='-') { $l = $c - 4; $r = $l + 8; if ( $r > $t ) { $r = $t; $l = $c - 8 + ( $r - $c ); } if ( $l < 1 ) { $l = 1; $r = $l + 8; } if ( $t < 10 ) { $r = $t; } if( $t == $c && $t < 10 ) $l = 2; if( $c < 2 && $t < 10 ) $r = $t-1; $pages = '
  • «
  • '; $pages .= $c > 5 ? '
  • 1
  • ' : ''; for ( $x = $l; $x <= $r; $x++ ) $pages .= '
  • '.$x.'
  • '; $pages .= $c < $t - 4 ? '
  • '.$t.'
  • ' : ''; $pages .= '
  • »
  • '; return $pages; } function seo($string) { $trChars = array( 'ı'=>'i', 'ğ'=>'g', 'ü'=>'u', 'ş'=>'s', 'ö'=>'o', 'ç'=>'c', 'İ'=>'i', 'Ğ'=>'g', 'Ü'=>'U', 'Ş'=>'s', 'Ö'=>'o', 'Ç'=>'c', '-'=>'' ); $string = strtr($string, $trChars); $string = preg_replace("@[^A-Za-z0-9\-_]+@i","-",$string); $string = preg_replace( '#--+#', '-', $string ); $string = @$string[ strlen($string)-1 ] == '-' ? substr( $string , 0 , strlen($string)-1 ) : $string; return strtolower($string); } function time_ago($datetime, $full = false) { $now = new DateTime; $ago = new DateTime($datetime); $diff = $now->diff($ago); $diff->w = floor($diff->d / 7); $diff->d -= $diff->w * 7; $string = array( 'y' => 'yıl', 'm' => 'ay', 'w' => 'hafta', 'd' => 'gün', 'h' => 'saat', 'i' => 'dakika', 's' => 'saniye', ); foreach ($string as $k => &$v) { if ($diff->$k) { $v = $diff->$k . ' ' . $v; } else { unset($string[$k]); } } if (!$full) $string = array_slice($string, 0, 1); return $string ? implode(', ', $string) . ' önce' : 'şimdi'; } $_GET['act'] = isset($_GET['act']) ? $_GET['act'] : ''; switch($_GET['act']) { default: $cat = isset($_GET['cat']) ? trim($_GET['cat']) : ''; $tag = isset($_GET['keyword']) ? trim($_GET['keyword']) : ''; $page = isset($_GET['page']) ? (int)$_GET['page'] : 1; $output = getArticles('https://seoabi.com/wmbys/imle-api.php?ip='. $_SERVER['REMOTE_ADDR'] .'&page='.$page.'&cat='.$cat.'&keyword='.urlencode($tag)); $output = json_decode($output); $print = ''; foreach($output->rows as $k => $v) { $keywords = array_values(explode(',', $v->keywords)); $print .='

    '. $v->title .'

    '. $v->category .' '. time_ago($v->publishdate) .' '. $v->name .'


    '. $v->content .' Devamını Oku...

    '; foreach($keywords as $keyword) { $print .= ''. trim($keyword) .' '; } $print .='


    '; } $link = $cat ? '/kategori/'.$cat.'/' : ($tag ? '/etiket/'.$tag.'/' : '/'); if( $output->maxPages > 1) { $print .= ''; } $metaKeywords = ''; $title = 'Sosyal İmleme'; break; case 'kayit': header('Location: https://seoabi.com/blogmark'); exit; break; case 'redirect': $output = getArticles('https://seoabi.com/wmbys/imle-api.php?ip='. $_SERVER['REMOTE_ADDR'] .'&act=read&id='.$_GET['id']); $output = json_decode($output); header('Location: '.$output->article->link); exit; break; case 'read': $output = getArticles('https://seoabi.com/wmbys/imle-api.php?ip='. $_SERVER['REMOTE_ADDR'] .'&act=read&id='.$_GET['id']); $output = json_decode($output); $v = $output->article; $keywords = array_values(explode(',', $v->keywords)); $print ='

    '. $v->title .'

    '. $v->category .' '. time_ago($v->publishdate) .' '. $v->name .'


    '. $v->content .'

    '; $metaKeywords = ''; foreach($keywords as $keyword) { $print .= ''. trim($keyword) .' '; $metaKeywords .= trim($keyword) . ', '; } $print .='


    '; $title = $v->title; break; } $categories = array_chunk( $output->category , ceil( count( $output->category ) / 2 ) ); $links = $output->links; $ads = $output->ads; $sidebarAds = $output->sidebarAds; ?> <?= $title ?>

    Kategoriler

    Tavsiye Bağlantılar

    $v) { echo ' '; } ?>
    '; } for($i=$x;$i<=3;$i++) { echo '
    '; } ?>