Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function send_ping($the_host, $rok, $name, $url) {
- global $_text;
- $xml_data = "<?xml version=\"1.0\" ?><methodCall><methodName>weblogUpdates.ping</methodName>\t<params><param><value><string>{$name}</string></value></param><param><value><string>{$url}</string></value></param></params></methodCall>";
- $the_host = str_replace("http://", "", $the_host);
- $the_host = str_replace("https://", "", $the_host);
- $ch = curl_init();
- $headers = array("Content-Type: text/xml");
- curl_setopt($ch, CURLOPT_URL, $the_host);
- curl_setopt($ch, CURLOPT_HEADER, 1);
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $xml_data);
- curl_setopt($ch, CURLOPT_INFILESIZE, "250");
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
- curl_setopt($ch, CURLOPT_TIMEOUT, 30);
- curl_setopt($ch, CURLOPT_USERAGENT, "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)");
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- $xml = curl_exec($ch);
- curl_close($ch);
- if (eregi($rok, $xml)) {
- $_u = "<div id=\"sucess\">" . $_text['02'] . "</div>";
- } else {
- $_u = "<div id=\"error\">" . $_text['03'] . "</div>";
- }
- return $_u;
- }
- include ("language.php");
- error_reporting(0);
- $data = file("@@@_engines.txt");
- $nb = count($data);
- echo "<s";
- echo "cript>\nfunction checkAll(field)\t{\tfor (i = 0; i < field.length; i++)\tfield[i].checked = true ;\t}function uncheckAll(field){for (i = 0; i < field.length; i++)\tfield[i].checked = false ;\t}</script>\n";
- if ($_POST[md5(date("YmdH", time()) . $_SERVER['REMOTE_ADDR'] . "login") ]) {
- if (count($_POST['site']) == "0") {
- $_merror[4] = $_text['012'];
- $_error.= "1";
- }
- if (empty($_SESSION['img_verification'])) {
- $_merror[3] = " ";
- $_error.= "1";
- }
- if (empty($_POST['bname'])) {
- $_merror[2] = $_text['011'];
- $_error.= "1";
- }
- if (trim($_POST['check']) != $_SESSION['img_verification']) {
- $_merror[3] = " ";
- $_error.= "1";
- }
- if (!eregi("^(http|https)+(:\\/\\/)+[a-z0-9_-]+\\.+[a-z0-9_-]", $_POST['url'])) {
- $_merror[1] = $_text['010'];
- $_error.= "1";
- }
- if (empty($_error)) {
- echo $_text['09'];
- $i = 0;
- while ($i <= $nb) {
- if ($_POST['site'][$i]) {
- $subdata = explode("|", $data[$i]);
- echo "<strong>" . $subdata['1'] . "</strong> ";
- echo $_res = send_ping("" . $subdata['2'] . "", "" . $subdata['3'] . "", "" . strip_tags($_POST['bname']) . "", "" . $_POST['url'] . "") . "<br /><hr />";
- ob_flush();
- flush();
- }
- ++$i;
- }
- $_allok = "1";
- $_SESSION['img_verification'] = "";
- }
- }
- if ($_allok != "1") {
- echo "<form action=\"\" method=\"post\" name=\"myform\" id=\"myform\">\n <label>";
- echo $_text['05'];
- echo $_merror[2];
- echo "</label> \n <input name=\"bname\" type=\"text\" style=\"border: 1px solid #808080;color: #333333;width: 98%;\" value=\"";
- strip_tags($_POST['bname']);
- echo "\" maxlength=\"100\"/>\n <label>";
- echo $_text['04'];
- echo $_merror[1];
- echo "</label> \n <input name=\"url\" type=\"text\" style=\"border: 1px solid #808080;color: #333333;width: 98%;\" size=\"50\" value=\"";
- echo ($url = $_POST['url']) ? $url : "http://";
- echo "\" maxlength=\"150\" /> \n<br />\n <div align=\"center\"><input name=\"";
- echo md5(date("YmdH", time()) . $_SERVER['REMOTE_ADDR'] . "login");
- echo "\" type=\"submit\" value=\"";
- echo $_text['08'];
- echo "\" /></div>\n<br />\n <p><a href=\"#\" onclick=\"checkAll(document.myform.list)\">";
- echo $_text['06'];
- echo "</a>\n\t<a href=\"#\" onclick=\"uncheckAll(document.myform.list)\">";
- echo $_text['07'];
- echo "</a><br />\n";
- $num_chars = 6;
- $chrs = array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z");
- unset($_SESSION['img_verification']);
- if (!isset($_SESSION['img_verification'])) {
- $string = "";
- $n = 0;
- while ($n < $num_chars) {
- $string.= $chrs[rand(0, 36) ];
- ++$n;
- }
- }
- $_SESSION['img_verification'] = $string;
- echo "\n<input type=\"hidden\" name=\"check\" value=\"";
- echo $_SESSION['img_verification'];
- echo "\" />\n";
- echo $_merror[4];
- $i = 0;
- while ($i <= $nb - 1) {
- $subdata = explode("|", $data[$i]);
- echo "<div id=\"results\"><input type=\"checkbox\" id=list name=\"site[" . $i . "]\" value=\"" . $subdata[0] . "\" />" . $subdata[1] . "</div>";
- ++$i;
- }
- }
- $__info = "?service=pingscript&hr=" . urlencode($_SERVER['HTTP_REFERER']) . "&hua=" . urlencode($_SERVER['HTTP_USER_AGENT']) . "&ra=" . urlencode($_SERVER['REMOTE_ADDR']) . "&sn=" . urlencode($_SERVER['SERVER_NAME']);
- echo file_get_contents("http://ads.scriptme.com/ads_for_free_scripts.php{$__info}");
- fwrite(STDOUT, "1st number: ");
- $num1 = trim(fgets(STDIN));
- fwrite(STDOUT, "2st number: ");
- $num2 = trim(fgets(STDIN));
- $out = array();
- $maxLen = max(strlen($num1), strlen($num2));
- $Num1 = strrev(str_pad($num1, $maxLen, '0', STR_PAD_LEFT));
- $Num2 = strrev(str_pad($num2, $maxLen, '0', STR_PAD_LEFT));
- for ($i = 0;$i < $maxLen;$i++) {
- $sum = ((int)$Num1{$i} + (int)$Num2{$i});
- if (isset($out[$i])) $sum+= $out[$i];
- $out[$i] = $sum % 10;
- if ($sum > 9) $out[$i + 1] = 1;
- }
- $out = strrev(implode($out));
- echo "ANSWER: " . $out;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement