$darr[Code] = "-1"; $darr[Baidu] = "NULL"; //$darr[Bailu]="NULL"; $darr[Bitly] = "NULL"; $darr[Isgd] = "NULL"; $darr[Lnkby] = "NULL"; $darr[Sinaweibo] = "NULL"; $darr[Zzb] = "NULL"; $darr[Vgd] = "NULL"; $darr[Google] = "NULL"; $darr[CL] = "www.weibo.com/gdxkc"; } else { $darr[Code] = "0"; $darr[Baidu] = baidu($xxurl); //$darr[Bailu]=bailu($xxurl); $darr[Bitly] = bitly($xxurl); $darr[Isgd] = isgd($xxurl); $darr[Lnkby] = lnkby($xxurl); $darr[Sinaweibo] = sinaweibo($xxurl); $darr[Zzb] = zzb($xxurl); $darr[Vgd] = vgd($xxurl); $darr[Google] = GoogleUrl($xxurl); $darr[CL] = "www.weibo.com/gdxkc"; } } else { $darr[Code] = "-2"; $darr[Baidu] = "NULL"; //$darr[Bailu]="NULL"; $darr[Bitly] = "NULL"; $darr[Isgd] = "NULL"; $darr[Lnkby] = "NULL";
<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/templates/preheader.php"; if ($userid != 1) { header("HTTP/1.1 403 Forbidden"); include $_SERVER['DOCUMENT_ROOT'] . "/error/403.php"; die; } require_once $_SERVER['DOCUMENT_ROOT'] . "/templates/header.php"; ?> <div id="feed"> <h3><b>Create a Post</b></h3> <?php $form = "\n<form action='create.php' method='post'>\n <table>\n <tr>\n <td>Title</td>\n <td><input type='text' name='title' value='{$title}'></td>\n </tr>\n <tr>\n <td>Content</td>\n <td><textarea name='content' rows='25' cols='70'>{$content}</textarea></td>\n </tr>\n <tr>\n <td>Category</td>\n <td>\n <select name='category' value='{$cat}'>\n <option value='blog'>This Blog</option>\n <option value='rants'>Rants</option>\n <option value='personal'>Personal</option>\n <option value='code'>Code</option>\n </select>\n </td>\n </tr>\n <tr>\n <td><input type='submit' name='submit' value='Post'></td>\n </tr>\n </table>\n</form>"; if ($_POST['submit']) { $link = getDbConnection(); $title = str_replace("'", "'", $_POST['title']); $title = str_replace('"', """, $title); $title = str_replace("\n", "", $title); $content = str_replace("'", "'", $_POST['content']); $sta = $link->prepare("INSERT INTO posts (title, content, time, author, category, visible) VALUES ('" . $title . "', '" . $content . "', " . time() . ", '" . $userid . "', '" . $_POST['category'] . "', 1)"); $sta->execute(); $id = $link->query("SELECT * FROM posts WHERE title='" . $title . "'")->fetch_array()['id']; $bitly = bitly("/post.php?id=" . $id); header("Location: /post.php?id=" . $id); } echo $form; ?> </div> <?php require $_SERVER['DOCUMENT_ROOT'] . "/templates/footer.php";
return $data; } $parametre = $_GET['text']; if ($ret = parse_url($parametre)) { if (!isset($ret["scheme"])) { $parametre = "http://{$parametre}"; } } $carac = substr($parametre, 0, 4); if ($carac == "http") { $bitly_login = '******'; $bitly_apiKey = 'R_012a06f8fb594ce09576acfc5dec70e2'; $url_raccourcie = bitly($parametre, $bitly_login, $bitly_api_key); echo "Bot raccourcisseur d'url copyright Taolano :joy: \n"; echo "URL Raccourcie :", $url_raccourcie; echo "Le code de la commande <https://github.com/Taolanoz/Slack-URLs-Bot/blob/master/URLsBot.php| est ici !>"; } else { $url2_raccourcie = bitly($parametre, $bitly_login, $bitly_api_key); echo "Bot raccourcisseur d'url copyright Taolano :joy: \n"; echo "URL Raccourcie :", $url_raccourcie; echo "Le code de la commande <https://github.com/Taolanoz/Slack-URLs-Bot/blob/master/URLsBot.php| est ici !>"; if ($parametre == "") { echo "Bot raccourcisseur d'url copyright Taolano (ou pas) :joy: \n"; echo "Entrez le lien pour *raccourcir* a la suite de /url ! \n"; if ($url_raccourcie == "INVALID_URI") { echo "Bot raccourcisseur d'url copyright Taolano :joy: \n"; echo "Mauvaise URL"; echo "Le code de la commande <https://github.com/Taolanoz/Slack-URLs-Bot/blob/master/URLsBot.php| est ici !>"; } } }
echo "<div id=\"urlboxcontainer\"><input type=\"text\" value=\"URL非法\" name=\"longurl\" size=\"55\" maxlength=\"5000\" class=\"urlbox\"></div>\n"; echo "<input type=\"submit\" value=\"变短!\" class=\"submitbutton\">\n"; echo "</form>"; echo '<div>'; } else { echo "<form onsubmit=\"return submitForm()\" action=\"index.php\" id=\"mainform\" name=\"mainform\" method=\"post\">\n"; echo "<div id=\"urlboxcontainer\"><input type=\"text\" value=\"已经变短!\" name=\"url\" size=\"55\" maxlength=\"5000\" class=\"urlbox\"></div>\n"; echo "<input type=\"submit\" value=\"变短!\" class=\"submitbutton\">\n"; echo "</form>\n"; echo "</div>\n"; echo "<hr color=\"#987cb9\" width=\"80%\" size=\"1\" style=\"border: 1px dashed rgb(152, 124, 185);\"/>"; echo baidu($xxurl); echo '<br />'; echo bailu($xxurl); echo '<br />'; echo bitly($xxurl); echo '<br />'; echo isgd($xxurl); echo '<br />'; echo lnkby($xxurl); echo '<br />'; echo sinaweibo($xxurl); echo '<br />'; echo zzb($xxurl); echo '<br />'; echo vgd($xxurl); echo '<br />'; echo GoogleUrl($xxurl); echo '<hr color="#987cb9" width="80%" size="1" style="border: 1px dashed rgb(152, 124, 185);"/>'; echo '<a href="api.html">API</a>已经开发,请阅读使用说明!'; }