href="http://hakan-leech.tr.gg/" target="_blank">hakan-leech.tr.gg

HAKANLEECH

Ana Sayfa

Merhaba link ceviri sitesine hosgeldin...
Reklam vermek için hakanleech@gmail.com iletişim adresimiz...
http://www.botlibre.com/chat?id=12844568&embedded=true&static=true 5, 'id' => 1, 'tag' => 'boxtag'); $bot = array('name' => 'bot', 'token' => 'bot_token', 'url' => ''); $msg = 'Bot here!'; $maxloops = 60; $id = cbox_post($msg, $bot, $box, $error); if (!$id) { echo $error; } else { echo "Posted ID $id"; } $loops = 0; while ($loops++ < $maxloops) { sleep(5); $msgs = cbox_get_msgs($id, $bot, $box); if (!$msgs || !is_array($msgs)) { continue; } $id = (int)$msgs[0]['id']; $triggered = false; for ($i = 0; $i < count($msgs); $i++) { if (preg_match('/time/', $msgs[$i]['message'])) { $triggered = true; break; } } if ($triggered) { $reply = 'Time is now '.date('Y-m-d H:i:s'); $id = cbox_post($reply, $bot, $box, $error); } } function cbox_get_msgs ($id, $user, $box, &$error = '') { $srv = $box['srv']; $boxid = $box['id']; $boxtag = $box['tag']; $host = "www$srv.cbox.ws"; $path = "/box/?boxid=$boxid&boxtag=$boxtag&sec=archive"; $port = 80; $timeout = 30; $get = array( 'i' => (int)$id, 'k' => $user['token'], 'fwd' => 1, 'aj' => 1 ); $req = ''; $res = ''; foreach ($get as $k => $v) { $path .= "&$k=".urlencode($v); } $hdr = "GET $path HTTP/1.1\r\n"; $hdr .= "Host: $host\r\n\r\n"; $fp = fsockopen ($host, $port, $errno, $errstr, $timeout); if (!$fp) { $error = "Could not open socket: $errno - $errstr\n"; return; } fputs ($fp, $hdr); while (!feof($fp)) { $res .= fgets ($fp, 1024); } fclose ($fp); if (!$res || !strpos($res, "200 OK")) { $error = "Bad response:\r\n $res"; return; } $matches = array(); preg_match_all('/\n([^\t\n]*)\t([^\t]*)\t([^\t]*)\t([^\t]*)\t' .'([^\t]*)\t([^\t]*)\t([^\t]*)\t([^\t]*)\t/', $res, $matches); $msgs = array(); $map = array('id', 'time', 'date', 'name', 'group', 'url', 'message'); for ($m = 0; $m < count($map); $m++) { for ($i = 0; $i < count($matches[$m+1]); $i++) { $msgs[$i][$map[$m]] = $matches[$m+1][$i]; } } return $msgs; } function cbox_post ($msg, $user, $box, &$error = '') { $srv = $box['srv']; $boxid = $box['id']; $boxtag = $box['tag']; $host = "www$srv.cbox.ws"; $path = "/box/?boxid=$boxid&boxtag=$boxtag&sec=submit"; $port = 80; $timeout = 30; $post = array( 'nme' => $user['name'], 'key' => $user['token'], 'eml' => $user['url'], 'pst' => $msg, 'aj' => '1' ); $req = ''; $res = ''; foreach ($post as $k => $v) { $req .= "$k=".urlencode($v)."&"; } $req = substr($req, 0, -1); $hdr = "POST $path HTTP/1.1\r\n"; $hdr .= "Host: $host\r\n"; $hdr .= "Content-Type: application/x-www-form-urlencoded\r\n"; $hdr .= "Content-Length: ".strlen($req)."\r\n\r\n"; $fp = fsockopen ($host, $port, $errno, $errstr, $timeout); if (!$fp) { $error = "Could not open socket: $errno - $errstr\n"; return; } fputs ($fp, $hdr.$req); while (!feof($fp)) { $res .= fgets ($fp, 1024); } fclose ($fp); if (!$res || !strpos($res, "200 OK")) { $error = "Bad response:\r\n $res"; return; } $matches = array(); preg_match('/1(.*)\t(.*)\t(.*)\t(.*)\t(.*)\t(.*)/', $res, $matches); $err = $matches[1]; $id = $matches[6]; if ($err) { $error = "Got error from Cbox: $err"; return; } return $id; } ?>


Stats Of Hits Bu web sitesi ücretsiz olarak Bedava-Sitem.com ile oluşturulmuştur. Siz de kendi web sitenizi kurmak ister misiniz?
Ücretsiz kaydol