3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_time_limit(0); require_once 'Zend/Loader.php'; Zend_Loader::loadClass('Zend_Gdata_YouTube'); Zend_Loader::loadClass('Zend_Gdata_AuthSub'); Zend_Loader::loadClass('Zend_Gdata_ClientLogin'); function printVideoEntry($videoEntry) { $ver = array('title' => $videoEntry->getVideoTitle(), 'desc' => $videoEntry->getVideoDescription(), 'category' => $videoEntry->getVideoCategory(), 'tags' => implode(", ", $videoEntry->getVideoTags()), 'video' => $videoEntry->getVideoWatchPageUrl()); return $ver; } if($_SERVER['REQUEST_METHOD'] == "POST") { function kanalgetir($kanal){ $kanal = parse_url($kanal); $kanal = explode("/",$kanal['path']); return $kanal[2]; } $knl = $_POST['url']; if(parse_url($knl, PHP_URL_HOST)) { $knl = kanalgetir($knl); } else { $knl = $knl; } $kanal = $_POST['kanal']; $dir = "C:/wamp/www/tr/dl/video/"; $yt = new Zend_Gdata_YouTube(); $videoFeed = $yt->getUserUploads($knl); foreach ($videoFeed as $entry) { $ver = printVideoEntry($entry); $bolunecek = dosyaindir($ver['video']); $name = pathinfo($bolunecek, PATHINFO_BASENAME); $ext = pathinfo($bolunecek, PATHINFO_EXTENSION); ytyukle ($kanal, $dir.$name, $ext, $ver['title'], $ver['desc'], '', $ver['category']); $dosyasil = unlink($dir.$name); } echo '<div style="width:250px;center;margin: 0 auto;"> <button class="btn btn-success"> <i class="icon icon-ok-circle icon-white"></i> Video Başarıyla Yüklendi... </button> </div>'; exit; } ?> <DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>YT Up/Down Bot</title> <script type="text/javascript" src="http://code.jquery.com/jquery-1.10.1.min.js"></script> <script type="text/javascript"> $(function(){ $('#bot').submit(function(event){ $('#bas').html('<div style="width:200px;text-align:center;margin: 0 auto;"><div class="progress progress-striped active"><div class="bar" style="width: 100%;"></div></div><p>Video Bilgileri Alınıyor...</p></div>'); var data = $(this).serialize(); $.post('index.php?islem=ytbot', data) .success(function(result){ $('#bas').html(result); }) .error(function(){ console.log('Error loading page'); }) return false; }); }); </script> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta name="author" content=""> <!-- Le styles --> <link href="assets/css/bootstrap.min.css" rel="stylesheet"> <style> body { padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */ } </style> <link href="assets/css/bootstrap-responsive.min.css" rel="stylesheet"> <!-- HTML5 shim, for IE6-8 support of HTML5 elements --> <!--[if lt IE 9]> <script src="../assets/js/html5shiv.js"></script> <![endif]--> <!-- Fav and touch icons --> <link rel="apple-touch-icon-precomposed" sizes="144x144" href="../assets/ico/apple-touch-icon-144-precomposed.png"> <link rel="apple-touch-icon-precomposed" sizes="114x114" href="../assets/ico/apple-touch-icon-114-precomposed.png"> <link rel="apple-touch-icon-precomposed" sizes="72x72" href="../assets/ico/apple-touch-icon-72-precomposed.png"> <link rel="apple-touch-icon-precomposed" href="../assets/ico/apple-touch-icon-57-precomposed.png"> <link rel="shortcut icon" href="../assets/ico/favicon.png"> </head> <body> <div class="navbar navbar-inverse navbar-fixed-top"> <div class="navbar-inner"> <div class="container"> <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="brand" href="index.php">YT Up/Down Bot</a> <div class="nav-collapse collapse"> <ul class="nav"> <li class="dropdown"> <ul class="dropdown-menu"> </ul> </li> <li><a href="bots.php">Bot Listesi</a></li> <li><a href="botlar.php">Video Yükle</a></li> <li><a href="index.php?islem=ytbot">Youtube Kanal Çekme</a></li <li class="dropdown"> <ul class="dropdown-menu"> </ul> </li> <li><a href="index.php?islem=hesap">Hesap Ayarları</a></li> <li><a href="index.php?islem=ythesap">Youtube Hesabı Ekle</a></li> <li><a href="http://109.73.64.148/destek/">Bot İstekleri</a></li> <li><a href="cikis.php">Çıkış</a></li> </ul> </div><!--/.nav-collapse --> </div> </div> </div> <div class="container"> <form id="bot" method="post" class="well"> BİLGİ: Youtube kanal botu sadece çektiğiniz kanalın en son yüklediği 25 videoyu kanalınıza çeker! <br /> <h2>Youtube Kanal Çek</h2> <br /> <input type="text" name="url" class="span5" placeholder="Youtube Kanal Linki veya Kanal ID"/></br> <div class="control-group"> <label class="control-label" for="select01">Kanalınız</label> <div class="controls"> <select name="kanal" id="select"> <?php $select = mysql_query("SELECT * FROM ythesap WHERE hesapid = '".$_SESSION['uyeid']."'"); while($row = mysql_fetch_row($select)) { echo '<option value="'.$row[0].'">'.$row[2].'</option>'; } ?> </select> </div> </div> <button class="btn btn-primary">Yüklemeyi Başlat</button> <button class="btn" type="reset">Temizle</button> </form> <div id="bas"></div> </div> <!-- /container --> <!-- Le javascript ================================================== --> <!-- Placed at the end of the document so the pages load faster --> <script src="assets/js/jquery.js"></script> <script src="assets/js/bootstrap-transition.js"></script> <script src="assets/js/bootstrap-alert.js"></script> <script src="assets/js/bootstrap-modal.js"></script> <script src="assets/js/bootstrap-dropdown.js"></script> <script src="assets/js/bootstrap-scrollspy.js"></script> <script src="assets/js/bootstrap-tab.js"></script> <script src="assets/js/bootstrap-tooltip.js"></script> <script src="assets/js/bootstrap-popover.js"></script> <script src="assets/js/bootstrap-button.js"></script> <script src="assets/js/bootstrap-collapse.js"></script> <script src="assets/js/bootstrap-carousel.js"></script> <script src="assets/js/bootstrap-typeahead.js"></script> </body> </html>

preferences:
26.7 ms | 402 KiB | 5 Q