NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head>

<body>
<?php
error_reporting(E_ALL);
ini_set('display_errors','On');
set_time_limit(0);

#------------------Veritanbanı Ayarlar---------------------
$hostname_baglan = "ruxt.powwebmysql.com";
$database_baglan = "yenimalatyas";
$username_baglan = "yenimalatyas";
$password_baglan = "akpakp0!";
$table = "radyo_content"; //radyo_content
#------------------Veritanbanı Ayarlar----------------------

#------------------Site Ayarlar-----------------------------
$resim_yer="images/stories/2013/";

$side="http://www.yenimalatyaspor.org/";

$user_id=42; //Ekleyen ID

$gununhaberlerikategori=2; #günün haberleri kategori id
#------------------Site Ayarlar-----------------------------


$baglan = mysql_pconnect($hostname_baglan, $username_baglan, $password_baglan) or trigger_error(mysql_error(),E_USER_ERROR);
mysql_query("SET NAMES utf8");
mysql_query("SET CHARACTER SET utf8");
mysql_query("SET COLLATION_CONNECTION = 'utf8_general_ci'");
mysql_select_db($database_baglan, $baglan);


//Kontrol DB
mysql_query("CREATE TABLE IF NOT EXISTS `ilke` (
`link` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
UNIQUE KEY `link` (`link`),
KEY `link_2` (`link`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;");
//Kontrol DB

function trima($str)
{
$str = str_replace(array("n", "r", "t", "", "xOB", " ", " "), '', $str);
return $str;
}

function baglan($url){
$curl = curl_init();

// Setup headers - I used the same headers from Firefox version 2.0.0.6
// below was split up because php.net said the line was too long. :/
$header[0] = "Accept: text/xml,application/xml,application/xhtml+xml,";
$header[0] .= "text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5";
$header[] = "Cache-Control: max-age=0";
$header[] = "Connection: keep-alive";
$header[] = "Keep-Alive: 300";
$header[] = "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7";
$header[] = "Accept-Language: en-us,en;q=0.5";
$header[] = "Pragma: "; // browsers keep this blank.

curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; tr; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2');
curl_setopt($curl, CURLOPT_HTTPHEADER, $header);
curl_setopt($curl, CURLOPT_REFERER, "");
curl_setopt($curl, CURLOPT_ENCODING, 'gzip,deflate');
curl_setopt($curl, CURLOPT_AUTOREFERER, true);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_TIMEOUT, 600);

$html = curl_exec($curl); // execute the curl command
curl_close($curl); // close the connection

return $html; // and finally, return $html
}

function dosya_indir($link,$disim) {
$header[0] = "Accept: text/xml,application/xml,application/xhtml+xml,";
$header[0] .= "text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5";
$header[] = "Cache-Control: max-age=0";
$header[] = "Connection: keep-alive";
$header[] = "Keep-Alive: 300";
$header[] = "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7";
$header[] = "Accept-Language: en-us,en;q=0.5";
$header[] = "Pragma: "; // browsers keep this blank.
global $resim_yer; $yer=$resim_yer;
global $side; $site=$side;
$link_info = pathinfo($link);
$uzanti = strtolower($link_info['extension']);
$file = $disim.'.'.$uzanti;
$file=str_replace(array(" ","%20"),"_",$file);
$curl = curl_init($link);
$fopen = fopen($yer.$file,'w');
curl_setopt($curl, CURLOPT_URL, $link);
curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; tr; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2');
curl_setopt($curl, CURLOPT_HTTPHEADER, $header);
curl_setopt($curl, CURLOPT_REFERER, "");
curl_setopt($curl, CURLOPT_ENCODING, 'gzip,deflate');
curl_setopt($curl, CURLOPT_AUTOREFERER, true);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_TIMEOUT, 600);
curl_setopt($curl, CURLOPT_FILE, $fopen);
curl_exec($curl);
curl_close($curl);
fclose($fopen);
return $site.$yer.$file;
}

function dosya_kopyala($file,$disim) {
global $resim_yer; $yer=$resim_yer;
global $side; $site=$side;
$newfile = $yer.$disim.'.jpg';
copy($file,$newfile);
return $site.$newfile;
}

function uzanti($link)
{
$link_info = pathinfo($link);
$uzanti = strtolower($link_info['extension']);
return $uzanti;
}

function trle($deger) {
$deger=trim($deger);
$turkce=array("ş","Ş","ı","İ","ü","Ü","ö","Ö","ç","Ç","ğ","Ğ"," "," ","---");
$duzgun=array("s","S","i","I","u","U","o","O","c","C","g","G"," ","-","-");
$deger=str_replace($turkce,$duzgun,$deger);
$deger=strtolower($deger);
$deger = preg_replace("@[^A-Za-z0-9-_]+@i","",$deger);
return $deger;
}
function dil($as){
return @iconv("iso-8859-9","utf-8",$as);
}
function cevir($as){
if(strstr($as,"malatyacagdas.com")){}else{$as="http://www.malatyacagdas.com".$as;}
return str_replace(" ","%20",$as);
}
function veri_bul($basla,$bitir,$veri)
{
$veri1=explode($basla, $veri);
$veri1=explode($bitir, $veri1['1']);
$veri1=trim($veri1['0']);
return $veri1;
}
function verimi_bul($basla,$bitir,$veri)
{
preg_match('#'.$basla.'(.*?)'.$bitir.'#is',$veri,$verim);
$verimi=trim($verim[1]);
return $verimi;
}
function eklet($haber_link,$kategori_id)
{
global $baglan,$user_id,$table;
@$kontrol=mysql_fetch_array(mysql_query("select count(*) tane from ilke where link = '$haber_link'",$baglan));
if($kontrol['tane']==0) {
#Haber daha önce eklenmemiş.
//echo $haber_link."<br />";
$gir2=baglan($haber_link);

$haber_baslik=trim(strip_tags(veri_bul('<title>','</title>',$gir2)));
$haber_sef=trle($haber_baslik);

$haber_icerik=verimi_bul('<!-- news -->','<!-- news -->',$gir2);
$haber_icerik=html_entity_decode(strip_tags($haber_icerik,"<br><strong><hr><img><div><h1><h2>"), ENT_COMPAT, 'UTF-8');

if(strstr($haber_icerik,'<img')) {
preg_match_all('#<img(.+?)src="(.+?)"(.+?)>#is',$haber_icerik,$c);
for($d=0;$d<count($c[1]);$d++) {
$iresim=dosya_indir(cevir($c[2][$d]),$haber_sef.'-'.$d);
$abc='<img src="'.$iresim.'" alt="'.$haber_baslik.'" style="width: 300px; height: 200px; float: left; margin:5px; " >';
$cba='<img'.$c[1][$d].'src="'.$c[2][$d].'"'.$c[3][$d].'>';
$haber_icerik=str_replace($cba,$abc,$haber_icerik);
}
}

if(strstr($gir2,'<!-- news image -->'))
{
$resi=veri_bul('<!-- news image -->','<!-- news image -->',$gir2);
$resim=veri_bul('<img src="','"',$resi);
$resim=dosya_indir(cevir($resim),$haber_sef.'-'.uniqid());
$resim_kod='<img src="'.$resim.'" alt="'.$haber_baslik.'" style="width: 300px; height: 200px; float: left; margin:5px; " >';
$ekle=1;
}
else
{
$resim_kod="";
$ekle=0;
}


$fulltext='<p>'.$resim_kod.$haber_icerik.'</p>';

$etiketler=trim($haber_baslik);
$etiketler=str_replace(" ",",",$etiketler);
$etiketler=$haber_baslik.", ".$etiketler;

$rules=mysql_real_escape_string('{"core.delete":[],"core.edit":[],"core.edit.state":[]}');
$attribs=mysql_real_escape_string('{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":""}');
$metadata=mysql_real_escape_string('{"robots":"","author":"","rights":"","xreference":""}');
$fulltext=mysql_real_escape_string($fulltext);
$haber_baslik=strip_tags($haber_baslik);
$haber_baslik=mysql_real_escape_string($haber_baslik);

$tarih=date("Y-m-d H:i:s");
if($ekle==1)
{
mysql_query("insert into $table
(
title,
introtext,
state,
sectionid,
mask,
catid,
created,
created_by,
modified,
modified_by,
checked_out,
checked_out_time,
publish_up,
publish_down,
attribs,
version,
parentid,
ordering,
access,
hits,
metadata,
featured,
alias,
title_alias
)
values
(
'$haber_baslik',
'$fulltext',
'1',
'0',
'0',
'$kategori_id',
'$tarih',
'$user_id',
'0000-00-00 00:00:00',
'0',
'0',
'0000-00-00 00:00:00',
'$tarih',
'0000-00-00 00:00:00',
'$attribs',
'1',
'0',
'0',
'1',
'0',
'$metadata',
'0',
'$haber_sef',
'$haber_sef'
)",$baglan) or die(mysql_error());
mysql_query("insert ilke (link) values ('$haber_link')",$baglan) or die(mysql_error());
echo "<fieldset>";
echo "<b>Baslik :</b>$haber_baslik<br>";
echo "<b>Durum :</b> <font color='green'><b>Eklendi</b></font>";
echo "</fieldset>n<br>n";
}
else
{
echo "<fieldset>";
echo "<b>Link : </b>$haber_link<br>";
echo "<b>Durum :</b> <font color='red'><b>Resimsiz içerik, eklenemedi.</b></font>";
echo "</fieldset>n<br>n";
}

}else{
echo "<fieldset>";
echo "<b>Link : </b>$haber_link<br>";
echo "<b>Durum :</b> <font color='red'><b>Daha önce eklenmiş, eklenemedi.</b></font>";
echo "</fieldset>n<br>n";
}
}

$kategoriler=array
(
"http://www.malatyacagdas.com/yeni-malatyaspor|yms|29"
);


for($a=0;$a<count($kategoriler);$a++){
$kategori_bilgi=explode("|",$kategoriler[$a]);
$kategori_link=$kategori_bilgi[0];
$kategori_isim=$kategori_bilgi[1];
$kategori_id=$kategori_bilgi[2];

$gir1=baglan($kategori_link);
$verim=veri_bul('<!-- yatay haberler -->','<!-- yatay haberler -->',$gir1);
preg_match_all('#<a href="(.*?)" title="(.*?)"><img src="(.*?)" alt=""></a>#',$verim,$links);
for($b=0;$b<count($links[1]);$b++){
$haber_link=$links[1][$b];
eklet($haber_link,$kategori_id);
}
}

?>
</body>
</html>
<?php
exit;
?>
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.