PHP- Kodu:
<?php
function baglan($feed,$coo=null,$ref=null){
$ch = curl_init();
$timeout = 0;
curl_setopt ($ch, CURLOPT_URL, $feed);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT,$_SERVER['HTTP_USER_AGENT']);
if(!empty($coo)){
curl_setopt($ch, CURLOPT_COOKIEFILE, $coo);
curl_setopt($ch, CURLOPT_COOKIEJAR, $coo); }
if(empty($ref)){
curl_setopt($ch, CURLOPT_REFERER,$feed);}
else{curl_setopt($ch, CURLOPT_REFERER,$ref);}
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$veri= curl_exec($ch); curl_close($ch); return $veri; }
function sef($text) {
$bul = array("Ý", "Þ", " ", "Ü", "Ç", "Ð", "Ö", "ý", "þ", "ü", "ç", "ð", "ö");
$degis = array("I", "S", "-", "U", "C", "G", "O", "i", "s", "u", "c", "g", "o");
$text = str_ireplace($bul, $degis, $text);
$text = preg_replace("@[^A-Za-z0-9\\-_]+@i", "", $text);
$text = strtolower($text);
return $text; }
$hedefler = $_POST['botLemsayfa'];
$yoLbuL = $_SERVER['REQUEST_URI'];
$bakyoLa = get_option('home');
function zamanekLe(){
echo '<div id="zamanSonucu"><input type="text" name="tarih" id="basic_example_" value="'.date('Y-m-d H:i:s',strtotime('+2 hour')).'" /><pre style=\'display:none;\'>$(\'#basic_example_\').datetimepicker({dateFormat: \'yy-mm-dd\',timeFormat: \'HH:mm:ss\',numberOfMonths: 2,});</pre></div>';
}
function ayir($ilk,$son,$nerde){
$x = explode($ilk,$nerde);
$x = explode($son,$x[1]);
return $x[0]; }
function temizlet($x){
return html_entity_decode(preg_replace('#<(.*?)>#i','',$x));}
function hallet($x){
$x = str_Replace(array("\n",","," ","<span>","</span>","<br>","<br />",">> Tüm Kadro"),"",$x);
return trim($x);}
function ETC_kategori()
{
$kategoriler = get_categories('hide_empty=0&orderby=name');
foreach ($kategoriler as $kat)
{
echo '<div class="ktx"><input type="checkbox" name="kategori[]" value="'.$kat->term_id.'"> '.$kat->cat_name.'</div>';
}
}
$parent_file = ''.$bakyoLa.'/wp-admin/options-general.php?page=ETC-Film-Botu/index.php&bot=';
function resimkaydet($link,$name){
$adresi = "../wp-content/uploads/".$name;
$curl = curl_init($link);
$fopen = fopen($adresi,'w');
curl_setopt($curl, CURLOPT_HEADER,0);
curl_setopt($curl, CURLOPT_RETURNTRANSFER,1);
curl_setopt($curl, CURLOPT_HTTP_VERSION,CURL_HTTP_VERSION_1_0);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_FILE, $fopen);
curl_exec($curl);
curl_close($curl);
fclose($fopen);}
?>