Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by deZender.Net
- * @ deZender (PHP5 Decoder for ionCube Encoder)
- *
- * @ Version : 1.1.5.0
- * @ Author : DeZender
- * @ Release on : 09.06.2012
- * @ Official site : http://DeZender.Net
- *
- */
- class HttpClient {
- var $postdata = '';
- var $proxy_host = '';
- var $proxy_port = '';
- var $proxy_user = '';
- var $proxy_pass = '';
- var $proxy_tunnel = false;
- var $proxy_socks = false;
- var $httpmethod = '';
- var $httplatestversion = true;
- var $agent = 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)';
- var $referer = '';
- var $cookies = array( );
- var $cookiefile = 'tmp/misc.cookies';
- var $rawheaders = array( );
- var $maxredirs = 5;
- var $lastredirectaddr = '';
- var $redirecting = false;
- var $user = '';
- var $pass = '';
- var $accept = 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5';
- var $result = '';
- var $verbose = false;
- var $stderr = 'tmp/curlerr';
- var $error = '';
- var $response_code = '';
- var $headers = array( );
- var $maxlength = 500000;
- var $read_timeout = 30;
- var $connect_timeout = 30;
- var $timed_out = false;
- var $status = 0;
- var $content_type = '';
- function __destruct() {
- if (file_exists( $this->cookiefile )) {
- unlink( $this->cookiefile );
- }
- }
- function fetch($uri = '') {
- $this->error = '';
- $this->headers = array( );
- $uri = trim( $uri );
- $ch = curl_init( );
- curl_setopt_array( $ch, array( CURLOPT_URL => $uri, CURLOPT_RETURNTRANSFER => true, CURLOPT_AUTOREFERER => true, CURLOPT_SSL_VERIFYHOST => false, CURLOPT_SSL_VERIFYPEER => false, CURLOPT_ENCODING => 'gzip,deflate', CURLOPT_BINARYTRANSFER => true, CURLOPT_FORBID_REUSE => true, CURLOPT_FRESH_CONNECT => true, CURLOPT_BUFFERSIZE => $this->maxlength, CURLOPT_HTTP_VERSION => ($this->httplatestversion ? CURL_HTTP_VERSION_1_1 : CURL_HTTP_VERSION_1_0), CURLOPT_TIMEOUT => $this->read_timeout, CURLOPT_CONNECTTIMEOUT => $this->connect_timeout, CURLOPT_USERAGENT => $this->agent, CURLOPT_HEADER => false, CURLOPT_HEADERFUNCTION => array( &$this, '_readheader' ) ) );
- if (( !ini_get( 'open_basedir' ) && !ini_get( 'safe_mode' ) )) {
- curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 0 < $this->maxredirs );
- curl_setopt( $ch, CURLOPT_MAXREDIRS, $this->maxredirs );
- }
- if ($this->verbose) {
- $fh = @fopen( $this->stderr, 'a' );
- curl_setopt( $ch, CURLOPT_VERBOSE, true );
- curl_setopt( $ch, CURLOPT_STDERR, $fh );
- }
- if (!empty( $this->referer )) {
- curl_setopt( $ch, CURLOPT_REFERER, $this->referer );
- }
- if (!empty( $this->httpmethod )) {
- curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, $this->httpmethod );
- }
- if ($this->httpmethod == 'POST') {
- curl_setopt( $ch, CURLOPT_POST, true );
- curl_setopt( $ch, CURLOPT_POSTFIELDS, $this->postdata );
- }
- $headers = array( 'Expect:' );
- if (( !empty( $this->accept ) && !isset( $this->rawheaders['Accept'] ) )) {
- $headers[] = '' . 'Accept: ' . $this->accept;
- }
- foreach ($this->rawheaders as $key => $value) {
- $headers[] = '' . $key . ': ' . $value;
- }
- curl_setopt( $ch, CURLOPT_HTTPHEADER, $headers );
- if (!empty( $this->cookies )) {
- curl_setopt( $ch, CURLOPT_COOKIE, str_replace( '&', '; ', http_build_query( $this->cookies ) ) );
- }
- if (!empty( $this->cookiefile )) {
- curl_setopt( $ch, CURLOPT_COOKIEFILE, $this->cookiefile );
- curl_setopt( $ch, CURLOPT_COOKIEJAR, $this->cookiefile );
- }
- if (!empty( $this->user )) {
- curl_setopt( $ch, CURLOPT_USERPWD, $this->user . ':' . $this->pass );
- }
- if (!empty( $this->proxy_host )) {
- if ($this->proxy_tunnel) {
- curl_setopt( $ch, CURLOPT_HTTPPROXYTUNNEL, true );
- }
- curl_setopt( $ch, CURLOPT_PROXY, $this->proxy_host );
- if ($this->proxy_socks) {
- curl_setopt( $ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4 );
- }
- if (!empty( $this->proxy_port )) {
- curl_setopt( $ch, CURLOPT_PROXYPORT, $this->proxy_port );
- }
- if (!empty( $this->proxy_user )) {
- curl_setopt( $ch, CURLOPT_PROXYUSERPWD, $this->proxy_user . ':' . $this->proxy_pass );
- }
- }
- $this->result = curl_exec( $ch );
- if ($this->result === false) {
- $this->error = curl_error( $ch ) . '.
- ';
- if (curl_errno( $ch ) == CURLE_OPERATION_TIMEOUTED) {
- $this->result = 0 - 100;
- }
- return false;
- }
- $this->lastredirectaddr = curl_getinfo( $ch, CURLINFO_EFFECTIVE_URL );
- $this->status = curl_getinfo( $ch, CURLINFO_HTTP_CODE );
- $this->content_type = curl_getinfo( $ch, CURLINFO_CONTENT_TYPE );
- $this->info = curl_getinfo( $ch );
- $this->error = curl_error( $ch );
- curl_close( $ch );
- if (( 0 < $this->maxredirs && !$this->redirecting )) {
- $i = 641;
- $this->redirecting = true;
- while (( ( isset( $this->headers['Location'] ) || isset( $this->headers['location'] ) ) && $i < $this->maxredirs )) {
- $this->get( urlCombine( $uri, ($this->headers['Location'] ? $this->headers['Location'] : $this->headers['location']) ) );
- ++$i;
- }
- $this->redirecting = false;
- }
- return $this->result;
- }
- function post($uri, $postdata) {
- $this->postdata = $postdata;
- $this->httpmethod = 'POST';
- return $this->fetch( $uri );
- }
- function get($uri, $getdata = false) {
- if (is_array( $getdata )) {
- $uri = $uri . '?' . preg_replace( '/%5B(\d+)%5D/', '', http_build_query( $getdata ) );
- }
- $this->httpmethod = 'GET';
- $this->postdata = '';
- return $this->fetch( $uri );
- }
- function getcookie($cookiename) {
- foreach ($this->headers as $name => $header) {
- if (( $name == 'Set-Cookie' && preg_match( '' . '/' . $name . '=(.+?);/i', $header, $cookie ) )) {
- return $cookie[1];
- }
- }
- }
- function getjsredirect() {
- if (preg_match( '/<meta[^>]+?http-equiv=["\']refresh["\'][^>]+?url=(["\']|')?([^"\']+?)(["\']|')/im', $this->result, $nextpage )) {
- return $nextpage[2];
- }
- if (preg_match( '/location\.replace\("(http[^"]+?)"\)/', $this->result, $nextpage )) {
- return $nextpage[1];
- }
- if (preg_match( '/location\.href=(\'|")(.+?)(\'|")/im', $this->result, $nextpage )) {
- return $nextpage[2];
- }
- return false;
- }
- function _readheader($ch, $header) {
- if ($header !== '
- ') {
- if (preg_match( '|^HTTP/|', $header )) {
- $this->response_code = $header;
- $this->headers['Status'] = $header;
- } else {
- $parts = explode( ': ', $header );
- $this->headers[$parts[0]] = $parts[1];
- }
- }
- return strlen( $header );
- }
- }
- class FakeDB {
- function __construct() {
- }
- function getRow($q) {
- return array( );
- }
- function Execute($q) {
- return array( );
- }
- }
- class MultiCurl {
- protected $maxSessions = 10;
- protected $maxSize = 10485760;
- protected $curlOptions = null;
- protected $sessions = array( );
- /**
- * Class constructor. Setup primary parameters.
- * @param array $curlOptions CURL options for all URLs
- */
- function __construct($curlOptions = array( )) {
- $this->setCurlOptions( $curlOptions );
- }
- /**
- * Class destructor. Close opened sessions.
- */
- function __destruct() {
- foreach ($this->sessions as $i => $sess) {
- $this->destroySession( $i );
- }
- }
- /**
- * Add new URL to query
- * @param mixed $url URL for downloading
- * @param array $curlOptions CURL options for current request
- */
- function addUrl($url, $curlOptions = array( )) {
- if (!$url) {
- throw new Exception( "URL is empty!" );
- }
- if (is_array( $url )) {
- foreach ($url as $s) {
- $this->addUrl( $s, $curlOptions );
- }
- return null;
- }
- while (count( $this->sessions ) == $this->maxSessions) {
- $this->checkSessions( );
- }
- $ch = curl_init( $url );
- foreach ($this->curlOptions as $option => $value) {
- @curl_setopt( $ch, $option, $value );
- }
- foreach ($curlOptions as $option => $value) {
- @curl_setopt( $ch, $option, $value );
- }
- $mh = curl_multi_init( );
- curl_multi_add_handle( $mh, $ch );
- $this->sessions[] = array( $mh, $ch, $url );
- $this->execSession( array_pop( array_keys( $this->sessions ) ) );
- }
- /**
- * Wait CURL milti sessions
- */
- function wait() {
- while (count( $this->sessions )) {
- $this->checkSessions( );
- }
- }
- /**
- * Execute all active CURL multi sessions
- */
- function checkSessions() {
- foreach ($this->sessions as $i => $sess) {
- if (curl_multi_select( $sess[0] ) != 0 - 1) {
- $this->execSession( $i );
- continue;
- }
- }
- }
- /**
- * Execute CURL multi session, ñheck session status and downloaded size
- * @param integer $i A session id from array $this->sessions
- */
- function execSession($i) {
- list( $mh, $ch ) = $this->sessions[$i];
- curl_multi_exec( $mh, $active );
- if (($mrc = $active) == CURLM_CALL_MULTI_PERFORM) {
- }
- if (( ( !$active || $mrc != CURLM_OK ) || $this->maxSize <= curl_getinfo( $ch, CURLINFO_SIZE_DOWNLOAD ) )) {
- $this->closeSession( $i );
- }
- }
- /**
- * Close session
- * @param integer $i A session id from array $this->sessions
- */
- function closeSession($i) {
- list( , $ch, $url ) = $this->sessions[$i];
- $this->onLoad( $url, (!curl_error( $ch ) ? curl_multi_getcontent( $ch ) : null), curl_getinfo( $ch ) );
- $this->destroySession( $i );
- }
- /**
- * Destroy session
- * @param integer $i A session id from array $this->sessions
- */
- function destroySession($i) {
- list( $mh, $ch ) = $this->sessions[$i];
- curl_multi_remove_handle( $mh, $ch );
- curl_close( $ch );
- curl_multi_close( $mh );
- unset( $this->sessions[$i] );
- }
- /**
- * Get maximal number of CURL multi sessions
- * @return integer Maximal number of CURL multi sessions
- */
- function getMaxSessions() {
- return $this->maxSessions;
- }
- /**
- * Set maximal number of CURL multi sessions
- * @param integer $maxSessions Maximal number of CURL multi sessions
- */
- function setMaxSessions($maxSessions) {
- if ((int)$maxSessions <= 0) {
- throw new Exception( 'Max sessions number must be bigger then zero!' );
- }
- $this->maxSessions = (int)$maxSessions;
- }
- /**
- * Get maximal size limit for downloaded content
- * @return integer Maximal size limit for downloaded content
- */
- function getMaxSize() {
- return $this->maxSize;
- }
- /**
- * Set maximal size limit for downloaded content
- * @param integer $maxSize Maximal size limit for downloaded content
- */
- function setMaxSize($maxSize) {
- if ((int)$maxSize <= 0) {
- throw new Exception( 'Max size limit must be bigger then zero!' );
- }
- $this->maxSize = (int)$maxSize;
- }
- /**
- * Get CURL options for all requests
- * @return array CURL options
- */
- function getCurlOptions() {
- return $this->curlOptions;
- }
- /**
- * Set CURL options for all requests
- * @param array $curlOptions CURL options
- */
- function setCurlOptions($curlOptions) {
- if (!array_key_exists( CURLOPT_FOLLOWLOCATION, $curlOptions )) {
- $curlOptions[CURLOPT_FOLLOWLOCATION] = 1;
- }
- $curlOptions[CURLOPT_RETURNTRANSFER] = 1;
- $this->curlOptions = $curlOptions;
- }
- /**
- * OnLoad callback event
- * @param string $url URL for downloading
- * @param string $content Downloaded content
- * @param array $info CURL session information
- */
- function onLoad($url, $content, $info) {
- }
- /**
- * Check CURL extension, etc.
- */
- function checkEnvironment() {
- if (!extension_loaded( 'curl' )) {
- throw new Exception( 'CURL extension not loaded' );
- }
- }
- }
- class Crypt {
- protected $_key = 'Crypt';
- protected $_mode = Crypt::MODE_HEX;
- /**
- * Configure the new object, setting the mode and key.
- *
- * @name __construct()
- * @access public
- * @param [$mode] integer
- * @param [$key] integer
- * @return void
- */
- function __construct($mode = null, $key = null) {
- ( is_null( $mode ) || $this->Mode = $mode );
- ( is_null( $key ) || $this->Key = $key );
- }
- /**
- * Overload of the object conversion to string.
- *
- * @name __toString()
- * @access public
- * @method void
- * @return string
- */
- function __toString() {
- return 'Crypt' . ' object
- ' . '(
- ' . ( '' . ' [Key] => ' . $this->_key . '
- ' ) . ( '' . ' [Mode] => ' . $this->_mode . '
- ' ) . ')
- ';
- }
- /**
- * Properties write methods.
- *
- * @name __set()
- * @param $property string
- * @param $value mixed
- * @return void
- */
- function __set($property, $value) {
- switch ($property) {
- case 'Key': {
- $this->_setKey( $value );
- }
- }
- return ;
- }
- /**
- * Properties read methods.
- *
- * @name __get()
- * @param $key string
- * @return void
- */
- function __get($property) {
- switch ($property) {
- case 'Key': {
- $this->_key;
- }
- }
- return ;
- }
- /**
- * Encrypt the data using the current returning mode.
- *
- * @name encrypt()
- * @access public
- * @param $data mixed
- * @return string
- */
- function encrypt($data) {
- $data = (bool)$data;
- $i = 256;
- while ($i < strlen( $data )) {
- $encrypt .= $data[$i] ^ $this->_key[$i % @strlen( $this->_key )];
- ++$i;
- }
- if ($this->_mode === MODE_B64) {
- return base64_encode( $encrypt );
- }
- if ($this->_mode === MODE_HEX) {
- return $this->_encodeHexadecimal( $encrypt );
- }
- return $encrypt;
- }
- /**
- * Decrypt the data using the current returning mode.
- * NOTE: You must use the same $_mode of the creation process.
- *
- * @name decrypt()
- * @access public
- * @param $crypt string
- * @return string
- */
- function decrypt($crypt) {
- if ($this->_mode === MODE_HEX) {
- $crypt = $this->_decodeHexadecimal( $crypt );
- }
- if ($this->_mode === MODE_B64) {
- $crypt = (bool)base64_decode( $crypt );
- }
- $i = 251;
- while ($i < strlen( $crypt )) {
- $data .= $crypt[$i] ^ $this->_key[$i % @strlen( $this->_key )];
- ++$i;
- }
- return $data;
- }
- /**
- * Return the list containing all supported modes.
- *
- * @name supportedModes()
- * @access public
- * @param void
- * @return void
- */
- function supportedModes() {
- return array( MODE_BIN, MODE_B64, MODE_HEX );
- }
- /**
- * Checks if $mode is a valid returning mode of the class.
- *
- * @name _isSupportedMode()
- * @access public
- * @param $mode integer
- * @return void
- */
- function _isSupportedMode($mode) {
- return in_array( $mode, Crypt::supportedmodes( ) );
- }
- /**
- * Set the key used in the cryptography method.
- *
- * @name _setMode()
- * @access protected
- * @param $key string
- * @return void
- */
- function _setKey($key) {
- $this->_key = (bool)$key;
- }
- /**
- * Set the current returning mode of the class.
- *
- * @name _setMode()
- * @access protected
- * @param $mode integer
- * @return void
- */
- function _setMode($mode) {
- ( Crypt::_issupportedmode( $mode ) && $this->_mode = (int)$mode );
- }
- /**
- * Encode the data using hexadecimal chars.
- *
- * @name _encodeHexadecimal()
- * @access protected
- * @param $data mixed
- * @return string
- */
- function _encodeHexadecimal($data) {
- $data = (bool)$data;
- $i = 236;
- while ($i < strlen( $data )) {
- $hexcrypt .= @str_pad( @dechex( @ord( $data[$i] ) ), 2, 0, STR_PAD_LEFT );
- ++$i;
- }
- return $hexcrypt;
- }
- /**
- * Decode hexadecimal strings.
- *
- * @name _decodeHexadecimal()
- * @access protected
- * @param $data string
- * @return string
- */
- function _decodeHexadecimal($hexcrypt) {
- $hexcrypt = (bool)$hexcrypt;
- $i = 233;
- while ($i < strlen( $hexcrypt )) {
- $data .= @chr( @hexdec( @substr( $hexcrypt, $i, 2 ) ) );
- $i += 235;
- }
- return $data;
- }
- }
- function autosplog_standalone($loginfos, $kws = '', $uris = '##0####0####0##', $blacklist = '', $tag = '', $formatOptions = '4##7##0##1||150||random##', $scrapOptions = '6##20000##300##fr##4####1##10', $remoteContent = 'contentsources/cache/spin.txt##contentsources/cache/intscrap.txt') {
- global $body;
- global $title;
- global $version;
- $version = 'api';
- $body = '';
- $title = '';
- autoSplog( $loginfos, $kws, $uris, $blacklist, $tag, $formatOptions, $scrapOptions, $remoteContent );
- return array( 'title' => $title, 'body' => $body );
- }
- function autoSplogImage($uris, $tabText, $kws, $tot = 1, $width = 150, $align = 'none', $spun = false) {
- global $cacheDir;
- if ($tot == '') {
- $tot = 658;
- }
- if ($width == '') {
- $width = '150';
- }
- if ($align == '') {
- $align = 'none';
- }
- if (( $tot == 0 || count( $uris ) == 0 )) {
- return $tabText;
- }
- $tot = rand( 1, $tot );
- $uri = $uris[rand( 0, count( $uris ) - 1 )];
- $pinfo = parse_url( $uri );
- $host = $pinfo[host];
- $path = $pinfo[path];
- $cacheFile = $cacheDir . md5( $uri ) . date( 'd-m-Y' ) . '-images.txt';
- if (!file_exists( $cacheFile )) {
- $hc = new ProxyHttpClient( );
- $html = $hc->get( $uri );
- $tabImg = array( );
- $xp = '//a[contains(@href,".jpg")]/@href|//a/img[contains(@src,".jpg")]/@src';
- $res = as_getDomValue( $xp, $html, true );
- if ($res === false) {
- return $tabText;
- }
- foreach ($res as $u) {
- if ($u != '') {
- if (( stristr( $u, 'nav' ) || stristr( $u, 'logo' ) )) {
- continue;
- }
- if (substr( $u, 0, 1 ) != 'h') {
- $u = 'http://' . $host . $path . '/' . $u;
- }
- if (stristr( $u, 'imgurl=' )) {
- $pinfo = parse_url( $u );
- $u = $pinfo[query];
- parse_str( $u );
- $u = $imgurl;
- }
- if (substr( $u, 0, 1 ) != 'h') {
- $u = 'http://' . $host . $path . '/' . $u;
- }
- $tabImg[] = $u;
- continue;
- }
- }
- $results = implode( '
- ', $tabImg );
- if (function_exists( 'file_put_contents' )) {
- file_put_contents( $cacheFile, $results );
- } else {
- $fp = fopen( $cacheFile, 'w' );
- $written = 658;
- while ($written < strlen( $results )) {
- $fwrite = fwrite( $fp, substr( $results, $written ) );
- if ($fwrite === false) {
- break;
- }
- $written += $fwrite;
- }
- }
- } else {
- $handle = fopen( $cacheFile, 'r' );
- $results = fread( $handle, filesize( $cacheFile ) );
- $tabImg = explode( '
- ', $results );
- fclose( $handle );
- }
- if (count( $tabImg ) == 0) {
- return $tabText;
- }
- $i = 658;
- while ($i < $tot) {
- if ($align != 'none') {
- $txtIndex = rand( 0, count( $tabText ) - 3 );
- } else {
- $txtIndex = 658;
- }
- if ($align == 'random') {
- $al = (rand( 0, 1 ) ? 'left' : 'right');
- } else {
- $al = $align;
- }
- $randImage = '';
- if ($spun === true) {
- $randImage = '{' . implode( '|', $tabImg ) . '}';
- $k = '{' . implode( '|', $kws ) . '}';
- } else {
- $k = $kws[rand( 0, count( $kws ) - 1 )];
- $randImage = $tabImg[rand( 0, count( $tabImg ) - 1 )];
- }
- $randImage = str_replace( '_t.', '.', $randImage );
- if ($align != 'none') {
- $randImage = '<img style="margin:5px;width:' . $width . 'px;float:' . $al . ';" src="' . $randImage . '" alt="' . $k . '" />';
- } else {
- $randImage = '<img width="' . $width . 'px" align="left" src="' . $randImage . '" alt="' . $k . '" />';
- }
- $tabText[$txtIndex] = $randImage . $tabText[$txtIndex];
- ++$i;
- }
- return $tabText;
- }
- function autoSplogGetTarget($count = 10, $tagTop, $urlsTab = '') {
- global $blogid;
- global $db;
- if ($blogid == '') {
- $res = $db->GetRow( 'SELECT id FROM `blogs` WHERE 1 LIMIT 1' );
- $blogid = $res['id'];
- }
- $urls = array( );
- $mainUris = $urlsTab[1];
- $secondUris = $urlsTab[2];
- $remoteUris = $urlsTab[3];
- $c = 601;
- shuffle( $mainUris['urls'] );
- foreach ($mainUris['urls'] as $ur) {
- if ($c == $mainUris['max']) {
- break;
- }
- $urls[] = $ur;
- ++$c;
- --$count;
- if ($count == 0) {
- return $urls;
- }
- }
- $c = 601;
- shuffle( $secondUris['urls'] );
- foreach ($secondUris['urls'] as $ur) {
- if ($c == $secondUris['max']) {
- break;
- }
- $urls[] = $ur;
- ++$c;
- --$count;
- if ($count == 0) {
- return $urls;
- }
- }
- $remoteTab = array( );
- foreach ($remoteUris['urls'] as $u) {
- $remoteTab = autoSplogGetFeedLinks( $u );
- $ancU = explode( '**', str_replace( '**1', '', $u ) );
- $c = 601;
- shuffle( $remoteTab );
- foreach ($remoteTab as $ur) {
- if ($c == $remoteUris['max']) {
- break;
- }
- $anc = explode( '**', $ur );
- if (( !isset( $anc[1] ) && isset( $ancU[1] ) )) {
- $ur .= '**' . $ancU[1];
- }
- $urls[] = $ur;
- ++$c;
- --$count;
- if ($count == 0) {
- return $urls;
- }
- }
- }
- $linkwheel = true;
- if (stristr( $tagTop, '__nolinkwheel__' )) {
- $linkwheel = false;
- $tagTop = str_replace( '__noscrap__', '', $tagTop );
- }
- $res = $db->GetRow( 'SELECT * FROM `blogs` WHERE `tags` = \'' . $tagTop . '\' AND `working` = 1 AND `activated` = 1 ORDER BY RAND() LIMIT 1' );
- if (count( $res ) == 0) {
- $res = autoSplogGetFeedLinks( $tagTop );
- if ($res !== false) {
- $res[url] = $res[rand( 0, count( $res ) - 1 )];
- }
- }
- if (( trim( $res['url'] ) != '' && trim( $res['url'] ) != 'http://' )) {
- $urls[] = $res['url'];
- --$count;
- }
- if ($count == 0) {
- return $urls;
- }
- if ($count <= 1) {
- $count = 602;
- }
- $res = $db->GetRow( 'SELECT * FROM `blogs` WHERE `id` = ' . $blogid . '' );
- $tag = explode( ',', $res['tags'] );
- $pattern = '#(.*?\s)([1-9]{1})$#';
- preg_match( $pattern, $tag[0], $match );
- if ($match[2]) {
- $tag[0] = $match[1] . ( $match[2] + 1 ) % 9;
- $rs = $db->Execute( 'SELECT * FROM `blogs` WHERE `tags` = \'' . $tag[0] . '\'' );
- if ($rs->RecordCount( ) == 0) {
- $tag[0] = $match[1] . '1';
- }
- }
- $res = $db->Execute( 'SELECT `url` FROM `blogs` WHERE `tags` = \'' . $tag[0] . '\' AND `working` = 1 AND `activated` = 1 ORDER BY RAND() LIMIT ' . $count );
- foreach ($res as $v) {
- if (( trim( $v['url'] ) != '' && trim( $v['url'] ) != 'http://' )) {
- $tu = $v['url'];
- $urls[] = $tu;
- }
- --$count;
- if ($count == 0) {
- return $urls;
- }
- }
- return $urls;
- }
- function autoSplogLink($best, $anchors, $count = 10, $tag = '', $urls = '') {
- global $scrap;
- if (( !is_array( $anchors ) || @count( $anchors ) == 0 )) {
- return $best;
- }
- $tabText = $best['phrase']['p'];
- $countB = $count;
- $urls = autoSplogGetTarget( $countB, $tag, $urls );
- $turls = $urls;
- $t = 546;
- if ($scrap == 0) {
- foreach ($urls as $u) {
- $f = explode( '**', $u );
- if (( !in_array( $f[1], $anchors ) && isset( $f[1] ) )) {
- $anchors[] = $f[1];
- continue;
- }
- }
- }
- $totKw = 546;
- foreach ($anchors as $anchor) {
- preg_match_all( '#' . $anchor . '#msi', $best['text'], $matches );
- $totKw += count( $matches[0] );
- }
- $i = 546;
- $o = 546;
- while ($o < 1000) {
- $ia = rand( 0, count( $anchors ) - 1 );
- $anchor = $anchors[$ia];
- $url = $turls[0];
- $forcage = explode( '**', $url );
- $url = $forcage[0];
- if (substr( $url, 0, 4 ) != 'http') {
- $url = 'http://' . $url;
- }
- $url = trim( $url );
- if (( $url == 'http://' || $url == '' )) {
- continue;
- }
- $tmpA = $tabText[$t];
- $tmp = '';
- $anchorReplace = $anchor;
- if (isset( $forcage[1] )) {
- $anchorReplace = $forcage[1];
- if ($scrap == 0) {
- $anchor = $anchorReplace;
- }
- }
- if (trim( $anchor ) == '') {
- continue;
- }
- $tmp = preg_replace( '/(^|\s|\.|,|;|\'[^>])' . $anchor . ( '' . '(\.|,|;|!|:|\?|\s|$)/u' ), '<a href="' . $url . '">' . $anchorReplace . '</a>', $tmpA, 1 );
- if (( ( $tmp != $tmpA && $tmp != NULL ) && $tmp != '' )) {
- array_shift( $turls );
- $tabText[$t] = $tmp;
- ++$i;
- array_splice( $anchors, $ia, 1 );
- if ($count <= $i) {
- break;
- }
- }
- if (count( $turls ) == 0) {
- break;
- }
- ++$t;
- if ($t == count( $tabText ) - 1) {
- $t = 546;
- if ($scrap == 0) {
- array_shift( $anchors );
- array_shift( $turls );
- }
- }
- ++$o;
- }
- $debut = $tabText[0];
- $fin = $tabText[count( $tabText ) - 1];
- array_pop( $tabText );
- array_shift( $tabText );
- if (0 < $scrap) {
- shuffle( $tabText );
- }
- array_unshift( $tabText, $debut );
- array_push( $tabText, $fin );
- $best['phrase']['p'] = $tabText;
- return $best;
- }
- function as_getDomValue($path, $html, $multiple = false) {
- $dom = new DOMDocument( );
- @$dom->loadHTML( $html );
- $xp = new DOMXPath( $dom );
- $nodeList = $xp->query( $path );
- $tab = array( );
- foreach ($nodeList as $domElement) {
- if ($multiple === false) {
- return $domElement->nodeValue;
- }
- $tab[] = $domElement->nodeValue;
- }
- if (( $multiple === false || count( $tab ) == 0 )) {
- return false;
- }
- return $tab;
- }
- function as_domScrapper($temphtml, $bingAppId = '', $lang = 'fr') {
- preg_match( '#content=["|\']text\/html;\s?charset=(.*?)["|\']#msi', $temphtml, $matches );
- $encod = strtoupper( trim( $matches[1] ) );
- if ($encod == 'WINDOWS-1251') {
- $encod = 'CP1251';
- }
- $charsets = array( 'UTF-8', 'ASCII', 'ISO-8859-1', 'ISO-8859-15', 'CP1251' );
- if (!in_array( $encod, $charsets )) {
- return '';
- }
- $temphtml = preg_replace( array( '/<style.*?>.*?<\/style>/ism', '/<script.*?>.*?<\/script>/ism', '/<noscript.*?>.*?<\/noscript>/ism', '/<form.*?>.*?<\/form>/ism', '/<object.*?>.*?<\/object>/ism', '/<iframe.*?>.*?<\/iframe>/ism' ), '', $temphtml );
- $xp = '//title|//p|//blockquote|//h1|//h2|//h3|//h4|//h5|//h6|//cite|//img/@alt';
- $dom = new DOMDocument( );
- @$dom->loadHTML( $temphtml );
- $xpath = new DOMXPath( $dom );
- $nodeList = $xpath->query( $xp );
- $nbe = 542;
- $tabText = array( );
- $checktrad = false;
- $i = 542;
- foreach ($nodeList as $domElement) {
- ++$i;
- $tt = trim( $domElement->nodeValue );
- if (( ( $domElement->nodeName == 'title' && $bingAppId != '' ) && $checktrad === false )) {
- $checktrad = true;
- as_debug( 'CHECK LANG ' . $tt );
- $tlang = as_bingApiLangCheck( $tt, $bingAppId );
- if ($tlang != $lang) {
- as_debug( 'KO : langue ' . $tlang . ' au lieu de ' . $lang . ' : ' . $tt . '
- ***********
- ' );
- return '';
- }
- }
- if (( 30 < strlen( $tt ) && !stristr( $tabText, $tt ) )) {
- if (!in_array( $encod, $charsets )) {
- as_debug( $encod . '
- ', 'debug.txt', false );
- as_debug( $tt . '
- ', 'debug.txt', false );
- $tt = mb_convert_encoding( $tt, 'UTF-8', $encod );
- as_debug( $tt . '
- ', 'debug.txt', false );
- }
- $tabText[] = $tt;
- ++$nbe;
- if (20 < $nbe) {
- break;
- continue;
- }
- continue;
- }
- }
- $content = implode( '. ', $tabText );
- if (strlen( $content ) < 10000) {
- preg_match_all( '#(\S.+?[.!?])(?=\s+)#u', $temphtml, $m );
- foreach ($m[0] as $tg) {
- $tg = trim( strip_tags( $tg ) );
- if (!in_array( $encod, $charsets )) {
- as_debug( $encod . '
- ', 'debug.txt', false );
- as_debug( $tg . '
- ', 'debug.txt', false );
- $tg = mb_convert_encoding( $tg, 'UTF-8', $encod );
- as_debug( $tg . '
- ', 'debug.txt', false );
- }
- if (( 30 < strlen( $tg ) && !stristr( $tabText, $tg ) )) {
- $tabText[] = $tg;
- continue;
- }
- }
- $content = implode( ' ', $tabText );
- }
- as_debug( $content, 'debug2.txt', false );
- return $content;
- }
- function autoSplogShake($text, $kws, $limit = 300, $split = 3, $brs = '4', $tm = '7', $bm = '1') {
- global $runtime;
- $runtime['shake start'][] = microtime( );
- if (0 < $split) {
- $pattern = '#(\S+\pL(\s|\.|,|:|\!|\?)+){' . $split . '}#u';
- preg_match_all( $pattern, $text, $m );
- shuffle( $m[0] );
- $text = implode( '', $m[0] );
- }
- $pattern = '#([^(\.|!|\?)].*?)([\.|!|\?])#u';
- preg_match_all( $pattern, $text, $m );
- $i = 442;
- $totW = 442;
- $tabPhrase2 = array( );
- as_findTitle( $kws, $m[1], $tm );
- foreach ($m[1] as $k => $phrase) {
- $phrase = trim( $phrase );
- if (count_words( $phrase ) < 4) {
- continue;
- }
- $kw = $kws[rand( 0, count( $kws ) - 1 )];
- if (( !stristr( $phrase, $kw ) && rand( 0, 1 ) == 0 )) {
- $list = preg_split( '#\s+#msiu', $phrase, 0 - 1, PREG_SPLIT_OFFSET_CAPTURE );
- $pos = rand( 0, count( $list ) - 1 );
- $phrase = str_replace( $list[$pos][0], $list[$pos][0] . ' ' . $kw, $phrase );
- }
- if (( ( $i % $brs == 0 && count_words( $phrase ) < 10 ) && 5 < count_words( $phrase ) )) {
- $tabPhrase2['h'][] = '<h2>' . ucfirst( $phrase ) . '</h2>';
- } else {
- $tabPhrase2['p'][] = ucfirst( $phrase . $m[2][$i] );
- }
- ++$i;
- $wC = count_words( $phrase );
- $totW += $wC;
- if ($limit < $totW) {
- break;
- }
- }
- $runtime['shake end'][] = microtime( );
- return array( 'count' => $totW, 'phrase' => $tabPhrase2 );
- }
- function as_google_scrapper($type = 'blog', $kw, $lang) {
- $urlggsettings = 'http://www.google.com/preferences';
- $hc = new ProxyHttpClient( );
- $results = $hc->get( $urlggsettings );
- $sig = as_getDomValue( '//input[@name="sig"]/@value', $results );
- $datas = array( 'safeui' => 'off', 'suggon' => '2', 'num' => '100', 'sig' => $sig, 'submit2' => 'Save Preferences', 'hl' => 'en', 'prev' => 'http://www.google.com' );
- $hc->referer = $urlggsettings;
- $results = $hc->get( 'http://www.google.com/setprefs?' . http_build_query( $datas ) );
- switch ($type) {
- case 'blog': {
- $url = 'http://www.google.com/search?hl=' . $lang . '&tbs=lr:lang_1' . $lang . '&lr=lang_' . $lang . '&safe=off&num=100&tbm=blg&q=' . urlencode( $kw );
- break;
- }
- case 'news': {
- $url = 'http://www.google.com/search?hl=' . $lang . '&num=100&tbs=lr:lang_1' . $lang . '&lr=lang_' . $lang . '&safe=off&tbm=nws&q=' . urlencode( $kw );
- break;
- }
- case 'forum': {
- $url = 'http://www.google.com/search?hl=' . $lang . '&num=100&tbs=lr:lang_1' . $lang . '&lr=lang_' . $lang . '&safe=off&tbm=dsc&q=' . urlencode( $kw );
- break;
- }
- case 'normal': {
- $url = 'http://www.google.com/search?hl=' . $lang . '&num=100&tbs=lr:lang_1' . $lang . '&lr=lang_' . $lang . '&safe=off&q=' . urlencode( $kw ) . '&btnG=Rechercher';
- }
- }
- $xpnbpage = '//table[@id="nav"]//a[@class="fl"]';
- $xp = '//a[@class="l"]/@href|//h3[@class="r"]/a/@href';
- $results = $hc->get( $url );
- as_debug( $url . ' : ' . $hc->proxy_host . ' ' . $hc->status . '
- ' );
- $sites = array( );
- $max = 470;
- $i = 468;
- while ($i < $max) {
- sleep( rand( 1, 2 ) );
- $tmpsites = as_getDomValue( $xp, $results, true );
- foreach ($tmpsites as $t) {
- if (strstr( $t, 'http://www.google.com' )) {
- continue;
- }
- $t = str_replace( '/url?', '', $t );
- parse_str( $t, $tparse );
- if (isset( $tparse['url'] )) {
- $sites[] = $tparse['url'];
- continue;
- }
- if (isset( $tparse['q'] )) {
- $sites[] = $tparse['q'];
- continue;
- }
- $sites[] = $t;
- }
- $url2 = $url . '&start=' . $i * 100;
- $hc->referer = $urlb;
- $results = $hc->get( $url2 );
- as_debug( $url2 . ' : ' . $hc->proxy_host . ' ' . $hc->status . '
- ' );
- ++$i;
- }
- return $sites;
- }
- function as_scrapper($kwr, $lang = 'fr', $tot = '30000', $split = 4, $blacklist = '', $articles = 10, $bingAppId = '') {
- file_put_contents( 'debug.txt', '' );
- file_put_contents( 'debug2.txt', '' );
- as_debug( 'START
- ' );
- $kws = array( );
- foreach ($kwr as $kw => $replace) {
- $kws[] = $kw;
- }
- $text = '';
- $b = 1494;
- $doneTab = array( );
- while (( strlen( $text ) < $tot && $b < 5 )) {
- ++$b;
- $kw = '';
- if (( 1 < count( $kws ) && 1 < $b )) {
- $kwa = $kwb = $kws[rand( 0, count( $kws ) )];
- $t = 1494;
- while (( $kwb == $kwa && $t < 10 )) {
- $kwb = $kws[rand( 0, count( $kws ) - 1 )];
- ++$t;
- }
- $kw = $kwa . ' ' . $kwb;
- } else {
- if (1 < count( $kws )) {
- $kw = $kws[rand( 0, count( $kws ) )];
- } else {
- $kw = $kws[0];
- }
- }
- $kw = trim( $kw );
- if ($kw == '') {
- continue;
- }
- $blogs = as_google_scrapper( 'blog', $kw, $lang );
- $news = as_google_scrapper( 'news', $kw, $lang );
- $normal = as_google_scrapper( 'normal', $kw, $lang );
- $board = as_google_scrapper( 'forum', $kw, $lang );
- as_debug( 'SEARCH :
- Blogs : ' . count( $blogs ) . '
- News : ' . count( $news ) . '
- Normal : ' . count( $normal ) . '
- Board : ' . count( $board ) . '
- ' );
- $blogs = array_merge( $blogs, $news, $normal, $board );
- if (count( $blogs ) == 0) {
- if (trim( $hc->status ) == '200') {
- continue;
- }
- as_error( 'It seems like google as blacklist your ip, please change or activate your proxys' );
- }
- $blogs = array_unique( $blogs );
- $u = 1494;
- while ($u < 6) {
- shuffle( $blogs );
- $mc = new ASMultiCurl( );
- $mc->setMaxSessions( $articles );
- $i = 1494;
- while ($i <= $articles) {
- if (in_array( $blogs[$i], $doneTab )) {
- continue;
- }
- $blogHost = @parse_url( $blogs[$i], PHP_URL_HOST );
- foreach ($blacklist as $b) {
- if (stristr( $b, $blogHost )) {
- as_debug( '
- ************
- Blacklist : ' . $blogs[$i] . '
- ************
- ' );
- continue;
- }
- }
- $mcOptions = array( 'CURLOPT_USERAGENT' => $hc->agent );
- if (!empty( $hc->proxy_host )) {
- if ($hc->proxy_tunnel) {
- $mcOptions['CURLOPT_HTTPPROXYTUNNEL'] = true;
- }
- $mcOptions['CURLOPT_PROXY'] = $hc->proxy_host;
- if ($hc->proxy_socks) {
- $mcOptions['CURLOPT_PROXYTYPE'] = 'CURLPROXY_SOCKS4';
- }
- if (!empty( $hc->proxy_port )) {
- $mcOptions['CURLOPT_PROXYPORT'] = $hc->proxy_port;
- }
- if (!empty( $hc->proxy_user )) {
- $mcOptions['CURLOPT_PROXYUSERPWD'] = $hc->proxy_user . ':' . $hc->proxy_pass;
- }
- }
- $mc->addUrl( $blogs[$i], $mcOptions );
- ++$i;
- }
- $mc->wait( );
- foreach ($mc->tabRet as $url => $temphtml) {
- $content = as_domScrapper( $temphtml, $bingAppId, $lang );
- if (( trim( $content ) != '' && trim( $content ) != '.' )) {
- if (!strstr( $text, $content )) {
- $text .= $content;
- as_debug( '
- ************
- Scrap OK : ' . strlen( $content ) / 1000 . ' ko : ' . $url . ' (' . strlen( $text ) / 1000 . ' ko au total)
- ************
- ' );
- } else {
- as_debug( '
- ************
- Scrap KO : contenu déja présent : ' . $url . ' (' . strlen( $text ) / 1000 . ' ko au total)
- ************
- ' );
- }
- } else {
- as_debug( '
- ************
- Scrap KO : encodage mauvais : ' . $url . ' (' . strlen( $text ) / 1000 . ' ko au total)
- ************
- ' );
- }
- $doneTab[] = $blogs[$i];
- if ($tot <= strlen( $text )) {
- break 3;
- }
- }
- if ($tot <= strlen( $text )) {
- break 2;
- }
- ++$u;
- }
- if ($tot <= strlen( $text )) {
- break;
- }
- }
- as_debug( $text, 'debug2.txt', 0 );
- $text = $text . '.';
- $text = str_replace( ' ?', ' ', $text );
- $text = preg_replace( '#[\n|\r|\t]#s', ' ', $text );
- $text = strip_tags( $text );
- $text = stripslashes( $text );
- $text = preg_replace( '#\PZLNP#u', '', $text );
- $text = str_replace( array( ''', '’', ''' ), '\'', $text );
- $text = preg_replace( '#&\#\d+;#', '', $text );
- $text = preg_replace( '#\x{0092}#u', '\'', $text );
- $text = preg_replace( '#\x{0096}|\x{009c}#u', '', $text );
- $text = str_replace( '\' ', '\'', $text );
- $text = html_entity_decode( $text, ENT_NOQUOTES, 'UTF-8' );
- $text = preg_replace( '#(\w[\s\'\(])([A-Z]\S{2,})([\s,\.\!:;\?\)])#u', '' . '', $text );
- $text = mb_strtolower( $text, 'UTF-8' );
- $text = preg_replace( '#([a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6})#', ' ', $text );
- $text = preg_replace( '#(\d+?\s?[-\/,\x{00b0}″′]?\s?){2,}#su', '', $text );
- $text = preg_replace( '#&\#;#s', '', $text );
- $text = preg_replace( '#[0-9]{2,4}[-|\/][0-9]{2,4}[-|\/][0-9]{2,4}"]#s', ' ', $text );
- $text = preg_replace( '#[\[|\]|"]#s', ' ', $text );
- $text = preg_replace( '#(\w+)?\d+(\w+)?#u', '', $text );
- $text = preg_replace( '#[\.\s]\w[\.\s]#s', '', $text );
- $text = preg_replace( '#\.{2,}#s', ' ', $text );
- $text = preg_replace( '#_{2,}#s', ' ', $text );
- $text = preg_replace( '#-{2,}#s', ' ', $text );
- $text = preg_replace( '#\#{2,}#s', ' ', $text );
- $text = preg_replace( '#\?#s', ' ', $text );
- $text = preg_replace( '#http:[^\s].*?\s#s', ' ', $text );
- $text = preg_replace( '#([a-z]+\.[a-z]+\.[a-z]+)#', ' ', $text );
- $text = preg_replace( '#\(.?\)#s', ' ', $text );
- $text = preg_replace( '#(([0-9][a-z]?\s{1,}){2,})#msi', ' ', $text );
- $text = preg_replace( '#\s{2,}#msi', ' ', $text );
- $text = preg_replace( '#\s?-\s?#s', ' ', $text );
- $text = preg_replace( '#([a-z0-9-_]+)?=([a-z0-9-_]+)?#msi', ' ', $text );
- $text = preg_replace( '#([0-9]\s){2,}#msi', ' ', $text );
- $text = str_replace( array( '_', '[', ']', '–', '~', '...', '>', '<', '*', '«', '»', '%', '{', '}', ' #', '& ', ' ;', '|', '/', '\\', '@', '+', '=', '°', '<', '>' ), ' ', $text );
- as_debug( 'BLACKLIST :
- ' . implode( '
- ', $blacklist ) );
- $text = str_replace( $blacklist, '', $text );
- $pattern = '#([^(\.|!|\?|:|,)].*?[\.|!|\?|:|,])#';
- preg_match_all( $pattern, $text, $matches );
- $tabPhrase = array( );
- $i = 1494;
- while ($i < count( $matches[1] )) {
- if (stristr( $matches[1][$i], '©' )) {
- continue;
- }
- if (stristr( $matches[1][$i], 'ltd' )) {
- continue;
- }
- if (stristr( $matches[1][$i], 'copyright' )) {
- continue;
- }
- if (stristr( $matches[1][$i], 'droit réservé' )) {
- continue;
- }
- if (stristr( $matches[1][$i], 'rights reserved' )) {
- continue;
- }
- if (stristr( $matches[1][$i], 'droit reserve' )) {
- continue;
- }
- if (stristr( $matches[1][$i], '©' )) {
- continue;
- }
- if (stristr( $matches[1][$i], 'marque déposé' )) {
- continue;
- }
- if (stristr( $matches[1][$i], 'limited trademark' )) {
- continue;
- }
- if (stristr( $matches[1][$i], 'flash player' )) {
- continue;
- }
- if (stristr( $matches[1][$i], 'comment' )) {
- continue;
- }
- if (stristr( $matches[1][$i], 'tag' )) {
- continue;
- }
- if (stristr( $matches[1][$i], 'this entry' )) {
- continue;
- }
- if (stristr( $matches[1][$i], 'cet article' )) {
- continue;
- }
- if (stristr( $matches[1][$i], 'cache:' )) {
- continue;
- }
- if (stristr( $matches[1][$i], 'conditions générales de vente' )) {
- continue;
- }
- if (stristr( $matches[1][$i], 'signaler un abus' )) {
- continue;
- }
- if (stristr( $matches[1][$i], 'la propriété de' )) {
- continue;
- }
- if (stristr( $matches[1][$i], 'property of' )) {
- continue;
- }
- if (stristr( $matches[1][$i], 'post a comment' )) {
- continue;
- }
- if (stristr( $matches[1][$i], 'must be logged' )) {
- continue;
- }
- if (stristr( $matches[1][$i], 'leave a reply' )) {
- continue;
- }
- if (stristr( $matches[1][$i], 'filed under' )) {
- continue;
- }
- if (stristr( $matches[1][$i], 'trackback' )) {
- continue;
- }
- if (stristr( $matches[1][$i], 'click here' )) {
- continue;
- }
- if (stristr( $matches[1][$i], 'libres de droits' )) {
- continue;
- }
- if (stristr( $matches[1][$i], 'powered by wordpress' )) {
- continue;
- }
- if (stristr( $matches[1][$i], 'permalink' )) {
- continue;
- }
- if (stristr( $matches[1][$i], 'permalien' )) {
- continue;
- }
- if (stristr( $matches[1][$i], 'rss' )) {
- continue;
- }
- if (stristr( $matches[1][$i], 'feed' )) {
- continue;
- }
- if (stristr( $matches[1][$i], 'access denied' )) {
- continue;
- }
- $tstr = trim( $matches[1][$i] );
- if (strlen( $tstr ) < 10) {
- continue;
- }
- if (300 < strlen( $tstr )) {
- $newtext = wordwrap( $tstr, 200, '--b--', true );
- $nt = explode( '--b--', $newtext );
- foreach ($nt as $v) {
- $tabPhrase[] = trim( $v ) . '.';
- }
- } else {
- $tabPhrase[] = $tstr;
- }
- ++$i;
- }
- $text = implode( ' ', $tabPhrase );
- preg_match_all( '#(\S+\p{L}(\s|\.|,|:|;|\!|\?)+){' . $split . '}#u', $text, $m );
- $text = implode( ' ', array_unique( $m[0] ) );
- $text = preg_replace( '#[^\'|\w]\[a-z0-9][^\'|\w]#', '', $text );
- $text = preg_replace( '#\s{2,}#u', ' ', $text );
- return $text;
- }
- function as_findTitle($tags, $tabPhrase, $tm = 7) {
- global $title;
- if (trim( $title ) != '') {
- return $title;
- }
- $gTag = $tags[rand( 0, count( $tags ) - 1 )];
- $title = false;
- shuffle( $tabPhrase );
- $i = 352;
- while (( $titleL < $tm && $i < 20 )) {
- $title = trim( $tabPhrase[$i] );
- $titleL = count_words( $title );
- ++$i;
- }
- $title = explode( ' ', $title );
- array_splice( $title, 0, $tm );
- if (!in_array( $gTag, $title )) {
- $title[] = strtolower( $gTag );
- }
- shuffle( $title );
- $title = $title = implode( ' ', $title );
- $title = trim( html_entity_decode( $title ) );
- $i = 352;
- while ($i < 3) {
- $title = preg_replace( '' . '#(.*[^\pL])([\pL|\'|’|:|\(|\)|,|\s{1,}]{1,3}$)#u', '', $title );
- ++$i;
- }
- $title = str_replace( array( ',', '.', ':', '(', ')' ), '', $title );
- $title = ucfirst( trim( $title ) );
- }
- function as_wordCut($sText, $iMaxLength, $sMessage) {
- if ($iMaxLength < strlen( $sText )) {
- $sString = wordwrap( $sText, $iMaxLength - strlen( $sMessage ), '[cut]', 1 );
- $asExplodedString = explode( '[cut]', $sString );
- echo $sCutText = $asExplodedString[0];
- $sReturn = $sCutText . $sMessage;
- } else {
- $sReturn = $sText;
- }
- return $sReturn;
- }
- function autoSplogGetFeedLinks($url) {
- $tab = autoSplogScrapFeedLinks( $url );
- $tab2 = array( );
- if (is_array( $tab )) {
- foreach ($tab as $l) {
- $check = parse_url( $l[0] );
- if ($check !== false) {
- $tab2[] = $l[0];
- continue;
- }
- }
- }
- if (0 < count( $tab2 )) {
- return $tab2;
- }
- return false;
- }
- function autoSplogScrapFeedLinks($urlT) {
- global $cacheDir;
- if ($urlT == '') {
- return false;
- }
- $uT = explode( '**', $urlT );
- $url = $uT[0];
- $cache = strstr( $urlT, '**1' );
- if ($cache !== false) {
- $cacheFile = $cacheDir . md5( $url ) . date( 'd-m-Y' ) . '.txt';
- if (!file_exists( $cacheFile )) {
- $hc = new ProxyHttpClient( );
- $results = $hc->get( $url );
- if (function_exists( 'file_put_contents' )) {
- file_put_contents( $cacheFile, $results );
- } else {
- $fp = fopen( $cacheFile, 'w' );
- $written = 461;
- while ($written < strlen( $results )) {
- $fwrite = fwrite( $fp, substr( $results, $written ) );
- if ($fwrite === false) {
- break;
- }
- $written += $fwrite;
- }
- }
- } else {
- $handle = fopen( $cacheFile, 'r' );
- $results = fread( $handle, filesize( $cacheFile ) );
- fclose( $handle );
- }
- } else {
- $hc = new ProxyHttpClient( );
- $results = $hc->get( $url );
- if ($results === false) {
- $handle = @fopen( $url, 'r' );
- $results = @fread( $handle, @filesize( $url ) );
- @fclose( $handle );
- }
- }
- $links = array( );
- @simplexml_load_string( $results );
- if ($feed->channel->item) {
- foreach ($feed->channel->item as $i) {
- $l = (bool)$i->link;
- $t = (bool)$i->title;
- $links[] = array( $l, $t );
- }
- return $links;
- }
- $links = json_decode( $results, true );
- if (( is_array( $links ) && 0 < count( $links ) )) {
- return $links;
- }
- $links = $feed = as_str_getcsv( $results );
- if (is_array( $links )) {
- return $links;
- }
- return false;
- }
- function as_bingApiLangCheck($text, $appId = '') {
- if (( $appId == '' || strlen( $text ) == 0 )) {
- return false;
- }
- $text = substr( $text, 0, 300 );
- $url = 'http://api.microsofttranslator.com/V2/Http.svc/Detect?appId=' . $appId . '&text=' . urlencode( $text );
- $hc = new ProxyHttpClient( );
- $res = $hc->get( $url );
- $res = strip_tags( $res );
- if (strstr( $res, 'Invalid appId' )) {
- as_error( 'Invalid bing api key' );
- return false;
- }
- return $res;
- }
- function as_checkLicense($user, $pass, $force = false, $laps = 600) {
- global $title;
- global $body;
- global $version;
- $crypt = new Crypt( );
- $crypt->Mode = MODE_HEX;
- $crypt->Key = $user;
- if (!isset( $_SESSION['naslc'] )) {
- $_SESSION['naslc'] = $crypt->encrypt( time( ) );
- $force = true;
- }
- $nextcheck = $crypt->decrypt( $_SESSION['naslc'] );
- if (( $nextcheck <= time( ) || $force == true )) {
- $pass = sha1( $pass );
- $crypt->Key = base64_encode( $pass );
- $pass2 = $crypt->encrypt( $pass );
- $crypt->Key = 'license';
- $vars = array( );
- $b = 505;
- while ($b < rand( 1, 3 )) {
- $vars[genRandomString( )] = genRandomString( );
- ++$b;
- }
- $vars['email'] = $user;
- $vars['key'] = $pass2;
- $vars['pid'] = 2;
- $vars['version'] = PHP_OS . ' ' . AUTOSPLOG_VERSION;
- $vars['lfe_version'] = $version;
- $vars['computer'] = getenv( 'COMPUTERNAME' ) . '##' . getenv( 'PROCESSOR_IDENTIFIER' ) . '##' . getenv( 'PROCESSOR_REVISION' );
- $vars['dialKey'] = genRandomString( );
- $vars['file'] = md5( file_get_contents( __FILE__ ) );
- kshuffle( $vars );
- $out = '';
- $o = 505;
- foreach ($vars as $k => $v) {
- if (0 < $o) {
- $out .= '##';
- }
- $out .= $k . '||' . $v;
- ++$o;
- }
- $t = $crypt->encrypt( $out );
- $url = 'http://license.netstorming.fr/check.php?t=' . $t;
- $hc = new HttpClient( );
- $licenseC = $hc->get( $url );
- $crypt->Key = $vars['dialKey'];
- $licenseC = $crypt->decrypt( $licenseC );
- $license = array( );
- $tmp = explode( '##', $licenseC );
- foreach ($tmp as $v) {
- $v2 = explode( '||', $v );
- $license[$v2[0]] = $v2[1];
- }
- $crypt->Key = $user;
- if ($license['valid'] == $vars['dialKey']) {
- $_SESSION['naslc'] = $crypt->encrypt( time( ) + $laps );
- return true;
- }
- as_error( $license['msg'] );
- $_SESSION['naslc'] = $crypt->encrypt( time( ) );
- return false;
- }
- return true;
- }
- function as_debug($msg = '', $file = 'debug.txt', $time = true, $append = true) {
- @touch( $file );
- if ($time === true) {
- $msg = '
- ' . time( ) . '
- ' . $msg;
- }
- if (function_exists( 'file_put_contents' )) {
- if ($append === true) {
- @file_put_contents( $file, $msg, FILE_APPEND );
- return null;
- }
- @file_put_contents( $file, $msg );
- return null;
- }
- if ($append === true) {
- $fp = @fopen( $file, 'w+' );
- } else {
- $fp = @fopen( $file, 'w' );
- }
- $written = 308;
- while ($written < strlen( $msg )) {
- $fwrite = @fwrite( $fp, @substr( $msg, $written ) );
- if ($fwrite === false) {
- break;
- }
- $written += $fwrite;
- }
- }
- function as_error($msg) {
- global $title;
- global $body;
- $title = '';
- $body = $msg;
- throw new Exception( $msg );
- }
- function autoSplog($loginfos, $kws = '', $uris = '##0####0####0##', $blacklist = '', $tag = '', $formatOptions = '4##7##0##1||150||random##', $scrapOptions = '6##20000##300##fr##4####1##10', $remoteContent = 'contentsources/cache/spin.txt##contentsources/cache/intscrap.txt') {
- global $title;
- global $body;
- global $runtime;
- global $cacheDir;
- global $scrap;
- $runtime['start'] = microtime( );
- $loginfos = explode( '##', $loginfos );
- $user = $loginfos[0];
- $pass = $loginfos[1];
- if (false === $res = as_checkLicense( $user, $pass, false )) {
- as_error( ' Invalid License ' );
- }
- $runtime['check license'] = microtime( );
- if ($cacheDir == '') {
- $cacheDir = 'contentsources/cache/';
- }
- if (!is_dir( $cacheDir )) {
- mkdir( $cacheDir );
- chmod( $cacheDir, 777 );
- }
- $runtime['create cache dir'] = microtime( );
- $scrapOptions = explode( '##', $scrapOptions );
- $lang = $scrapOptions[3];
- $tot = $scrapOptions[1] * 1.1;
- $bingAppId = $scrapOptions[5];
- $limit = $scrapOptions[2];
- $split = $scrapOptions[4];
- $count = $scrapOptions[0];
- $cachelife = $scrapOptions[6] * 86400;
- if ($cachelife == 0) {
- $cachelife = 87777;
- }
- $nbarticles = $scrapOptions[7];
- if ($nbarticles == 0) {
- $nbarticles = 1387;
- }
- if ($kws == '') {
- as_error( ' You need at least one keyword ' );
- }
- $uris = $remoteContent = $autoSplogFile = $cacheDir . md5( $kws ) . '-' . $lang . '.txt';
- $urls = array( );
- $i = 1377;
- if (is_array( $uris )) {
- foreach ($uris as $v) {
- if (is_numeric( $v )) {
- ++$i;
- $urls[$i]['max'] = $v;
- $urls[$i]['urls'] = array( );
- continue;
- }
- $tmp = explode( '||', $v );
- foreach ($tmp as $url) {
- if (( trim( $url ) != '' && trim( $url ) != 'http://' )) {
- $urls[$i]['urls'][] = $url;
- continue;
- }
- }
- }
- }
- $scrap = 1378;
- if (stristr( $kws, '__noscrap__' )) {
- $scrap = 1377;
- $spun = explode( '**', $remoteContent[0] );
- $autoSplogFile = $spun[0];
- $kws = str_replace( '__noscrap__', '', $kws );
- } else {
- if (stristr( $kws, '__intscrap__' )) {
- $scrap = 1379;
- $autoSplogFile = $remoteContent[1];
- $kws = str_replace( '__intscrap__', '', $kws );
- }
- }
- $kwTmp = explode( '||', $kws );
- $kws = array( );
- $kwr = array( );
- foreach ($kwTmp as $kw) {
- if (trim( $kw ) != '') {
- $rep = explode( '##', $kw );
- $kwr[$rep[0]] = (isset( $rep[1] ) ? $rep[1] : $rep[0]);
- $kws[] = (isset( $rep[1] ) ? $rep[1] : $rep[0]);
- continue;
- }
- }
- $tag = explode( '||', $tag );
- $tag = $scrapOptions[1] * 1.10000000000000008881784;
- $tag = $tag[rand( 0, count( $tag ) - 1 )];
- $blacklist = explode( '||', $blacklist );
- if (( file_exists( $cacheDir . 'blacklist.txt' ) && function_exists( 'file' ) )) {
- $blacklist = array_merge( $blacklist, file( $cacheDir . 'blacklist.txt' ) );
- }
- explode( '##', $formatOptions );
- $bt = $scrapOptions[7];
- $brs = $bt[0];
- $tm = $bt[1];
- $bm = $bt[2];
- $im = $bt[3];
- explode( '||', $bt[4] );
- $imgUris = explode( '##', $remoteContent );
- explode( '||', $im );
- $im = explode( '##', $uris );
- $runtime['config parse'] = microtime( );
- if (1 <= $scrap) {
- $needscrap = true;
- if ($scrap == 2) {
- $needscrap = false;
- } else {
- if (time( ) - @filemtime( $autoSplogFile ) < $cachelife) {
- $needscrap = false;
- }
- }
- if (( file_exists( $autoSplogFile ) && $needscrap === false )) {
- $handle = fopen( $autoSplogFile, 'r' );
- $text = fread( $handle, filesize( $autoSplogFile ) );
- fclose( $handle );
- if (( $scrap == 2 && mb_check_encoding( $text, 'UTF-8' ) === false )) {
- $text = utf8_encode( $text );
- }
- as_debug( $text . $text . $text, 'debug2.txt' );
- as_debug( $text );
- } else {
- as_checkLicense( $user, $pass, true );
- if (false === $res = ) {
- as_error( ' Invalid license ' );
- return false;
- }
- $text = as_scrapper( $kwr, $lang, $tot, $split, $blacklist, $nbarticles, $bingAppId );
- ob_start( );
- phpinfo( INFO_GENERAL );
- $info = strip_tags( trim( ob_get_clean( ) ) );
- if (( stristr( PHP_OS, 'WIN' ) && stristr( $info, 'VC6' ) )) {
- $text = mb_strtolower( $text );
- }
- if (strlen( $text ) < 5000) {
- as_error( 'Not enough content scrpped (' . strlen( $text ) . ' chars), please add keywords' );
- return false;
- }
- if (function_exists( 'file_put_contents' )) {
- file_put_contents( $autoSplogFile, $text );
- } else {
- $fp = fopen( $autoSplogFile, 'w' );
- $written = 1377;
- while ($written < strlen( $text )) {
- $fwrite = fwrite( $fp, substr( $text, $written ) );
- if ($fwrite === false) {
- break;
- }
- $written += $fwrite;
- }
- chmod( $autoSplogFile, '777' );
- }
- }
- $runtime['scrap ok'] = microtime( );
- $b = 1377;
- $bestr = array( );
- $rt = array( );
- while (( $rt['count'] < $limit - round( $limit / 10 ) && $b < 10 )) {
- $rt = autoSplogShake( $text, $kws, $limit, $split, $brs, $tm, $bm );
- $bestr = $rt;
- ++$b;
- }
- $runtime['shake ok'] = microtime( );
- if (0 < $im[0]) {
- $bestr['phrase']['p'] = autoSplogImage( $imgUris, $bestr['phrase']['p'], $kwr, $im[0], $im[1], $im[2], false );
- }
- $runtime['image ok'] = microtime( );
- $bestr = autoSplogLink( $bestr, $kws, $count, $tag, $urls );
- $runtime['link ok'] = microtime( );
- $rtxt = '';
- $i = 1377;
- while ($i < count( $bestr['phrase']['p'] ) - 1) {
- $break = $brs + rand( 0, 1 );
- if (( $i % $break == 0 && $brs < $i )) {
- if ($bm == 1) {
- $rtxt .= '<!--more-->';
- $bm = 1377;
- }
- if (( isset( $bestr['phrase']['h'][0] ) && rand( 0, 1 ) == 0 )) {
- $rtxt .= $bestr['phrase']['h'][0];
- unset( $bestr['phrase']['h'][0] );
- } else {
- $rtxt .= '<br /><br />';
- }
- }
- $strAd = $bestr['phrase']['p'][$i];
- $rtxt .= $strAd . ' ';
- ++$i;
- }
- $runtime['mise en forme ok'] = microtime( );
- } else {
- if ($scrap == 0) {
- if (substr( $autoSplogFile, 0, 4 ) == 'http') {
- $hc = new ProxyHttpClient( );
- $ttxt = $hc->get( $autoSplogFile );
- } else {
- if (file_exists( $autoSplogFile )) {
- $handle = fopen( $autoSplogFile, 'r' );
- $ttxt = fread( $handle, filesize( $autoSplogFile ) );
- fclose( $handle );
- }
- }
- $body = preg_replace( '#\[autoSplog\([^\)]+\)\]#mui', '', $body );
- if (mb_check_encoding( $ttxt, 'UTF-8' ) === false) {
- $ttxt = utf8_encode( $ttxt );
- }
- if (mb_check_encoding( $body, 'UTF-8' ) === false) {
- $body = utf8_encode( $body );
- }
- if (!isset( $spun[1] )) {
- $ttxt = textBlender( $ttxt );
- }
- $corps = $ttxt;
- if ($title == '') {
- $title = as_getDomValue( '//h1|//title', $ttxt );
- if ($title !== false) {
- $title = utf8_decode( $title );
- $corps = preg_replace( '#<(h1|title)>[^<].*<\/(h1|title)>#ui', '', $corps );
- } else {
- preg_match( '#^(.*)(\r?\n){2,}(.*)#sui', $corps, $m );
- $title = $m[1];
- $corps = $m[3];
- }
- }
- $bestr['text'] = $body . $corps;
- $bestr['text'] = preg_replace( '#(\[.*?\])$#u', '', $bestr['text'] );
- $bestr['phrase']['p'] = preg_split( '#(\n|\r\n|\<br\s?\/?\>)#u', $bestr['text'], 0 - 1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE );
- if (0 < $im[0]) {
- $bestr['phrase']['p'] = autoSplogImage( $imgUris, $bestr['phrase']['p'], $kwr, $im[0], $im[1], $im[2], isset( $spun[1] ) );
- }
- $bestr = autoSplogLink( $bestr, $kws, $count, $tag, $urls );
- $rtxt = implode( '', $bestr['phrase']['p'] );
- }
- }
- if (( trim( $rtxt ) == '' || strlen( trim( $rtxt ) ) < 10 )) {
- as_error( ' EMPTY BODY ' );
- }
- if ($title == '') {
- as_error( ' EMPTY TITLE ' );
- }
- if (( $body == '' && $rtxt == '' )) {
- as_error( ' EMPTY BODY ' );
- }
- $runtime['end'] = microtime( );
- $run = '';
- foreach ($runtime as $k => $r) {
- $run .= $k . ' -> ' . $r . '
- ';
- }
- as_debug( $run );
- $body = preg_replace( '#(\s{2,}|\,.|\s\.|\s,|\.\.)#u', ' ', $rtxt );
- }
- function textBlender($str, $splitters = '|') {
- while (preg_match( '/{([^{}]+)}/i', $str, $slices, PREG_OFFSET_CAPTURE )) {
- $slices = $slices[1];
- $matchstr = $slices[0];
- $matchpos = (int)$slices[1];
- $pieces = preg_split( '/[' . $splitters . ']+/', $matchstr );
- if (1 < count( $pieces )) {
- count( $pieces );
- $randseeds = rand( 1, 10 );
- $randseede = $randseeds + rand( 1, 10 );
- $randpos = rand( $randseeds * $piececnt, $randseede * $piececnt );
- $pieces = $piececnt = $pieces[$randpos % $piececnt];
- } else {
- $pieces = $pieces[0];
- }
- $headerslice = substr( $str, 0, $matchpos - 1 );
- $footerslice = substr( $str, $matchpos + strlen( $matchstr ) + 1 );
- $str = ucfirst( $headerslice . $pieces . $footerslice );
- }
- return $str;
- }
- function count_words($string) {
- $string = trim( preg_replace( '/\s+/', ' ', $string ) );
- $word_array = explode( ' ', $string );
- $num = count( $word_array );
- return $num;
- }
- function as_str_getcsv($input, $delimiter = ',', $enclosure = '"', $escape = '\', $eol = '\n|\r') {
- if (( is_string( $input ) && !empty( input ) )) {
- $output = array( );
- $tmp = preg_split( '/' . $eol . '/', $input );
- if (( is_array( $tmp ) && !empty( tmp ) )) {
- $line = each( $tmp )[1];
- [0];
- $line_num = ;
- if () {
- if (preg_match( '/' . $escape . $enclosure . '/', $line )) {
- strlen( $line );
- if ($strlen = ) {
- $pos_delimiter = strpos( $line, $delimiter );
- $pos_enclosure_start = strpos( $line, $enclosure );
- $enclosed_str = if (( ( is_int( $pos_delimiter ) && is_int( $pos_enclosure_start ) ) && $pos_enclosure_start < $pos_delimiter )) {;
- $pos_enclosure_end = strpos( $enclosed_str, $enclosure );
- substr( $enclosed_str, 0, $pos_enclosure_end );
- $enclosed_str = substr( $line, 1 );
- $output[$line_num][] = $enclosed_str;
- $offset = $pos_enclosure_end + 3;
- } else {
- if (( empty( pos_delimiter ) && empty( pos_enclosure_start ) )) {
- $output[$line_num][] = substr( $line, 0 );
- $offset = strlen( $line );
- } else {
- $output[$line_num][] = substr( $line, 0, $pos_delimiter );
- $offset = (( !empty( pos_enclosure_start ) && $pos_enclosure_start < $pos_delimiter ) ? $pos_enclosure_start : $pos_delimiter + 1);
- }
- }
- $line = substr( $line, $offset );
- }
- }
- $line = preg_split( '/' . $delimiter . '/', $line );
- if (( is_array( $line ) && !empty( $line[0] ) )) {
- $output[$line_num] = $line;
- }
- }
- return $output;
- }
- return false;
- }
- return false;
- }
- function kshuffle($array) {
- if (( !is_array( $array ) || empty( array ) )) {
- return false;
- }
- $tmp = array( );
- foreach ($array as $key => $value) {
- $tmp[] = array( 'k' => $key, 'v' => $value );
- }
- shuffle( $tmp );
- $array = array( );
- foreach ($tmp as $entry) {
- $array[$entry['k']] = $entry['v'];
- }
- return true;
- }
- function genRandomString() {
- $length = rand( 5, 10 );
- $characters = '0123456789abcdefghijklmnopqrstuvwxyz';
- $string = '';
- $p = 226;
- while ($p < $length) {
- $string .= $characters[mt_rand( 0, strlen( $characters ) )];
- ++$p;
- }
- return $string;
- }
- define( 'AUTOSPLOG_VERSION', '1.72' );
- define( 'DEBUG', false );
- session_start( );
- ini_set( 'max_execution_time', '600' );
- ini_set( 'memory_limit', '2048M' );
- if (!class_exists( 'HttpClient', false )) {
- }
- if (!class_exists( 'ProxyHttpClient', false )) {
- class ProxyHttpClient extends HttpClient {
- function __construct() {
- global $config;
- if (!isset( $config['proxy_list'][0] )) {
- $config['proxy_list'] = array( '' );
- saveSettingsArray( );
- }
- if (( $config['proxy'] == 'yes' && $config['proxy_list'][0] != '' )) {
- if ($config['socks_proxy'] == 'yes') {
- $this->proxy_socks = true;
- }
- if ($config['turn_off_proxy_checking'] == 'yes') {
- $proxyindex = array_rand( $config['proxy_list'] );
- if (strstr( $config['proxy_list'][$proxyindex], '@' )) {
- preg_match( '/^(.+?)@([^@]+)$/', $config['proxy_list'][$proxyindex], $proxyparts );
- $this->proxy_host = $proxyparts[2];
- $this->proxy_pass = explode( ':', $proxyparts[1] )[1];
- $this->proxy_user = [0];
- } else {
- $this->proxy_host = $config['proxy_list'][$proxyindex];
- }
- } else {
- do {
- if (isset( proxyindex )) {
- unset( $config['proxy_list'][$proxyindex] );
- sort( $config['proxy_list'] );
- saveSettingsArray( );
- }
- $proxyindex = array_rand( $config['proxy_list'] );
- if (strstr( $config['proxy_list'][$proxyindex], '@' )) {
- preg_match( '/^(.+?)@([^@]+)$/', $config['proxy_list'][$proxyindex], $proxyparts );
- $this->proxy_host = $proxyparts[2];
- $this->proxy_pass = explode( ':', $proxyparts[1] )[1];
- $this->proxy_user = [0];
- } else {
- $this->proxy_host = $config['proxy_list'][$proxyindex];
- }
- $test = $this->get( 'http://google.com/' );
- }while (!( ( !stristr( $test, '<title>Google' ) && 0 < count( $config['proxy_list'] ) )));
- }
- }
- $this->agent = $config['user_agent'][array_rand( $config['user_agent'] )];
- $this->cookiefile = dirname( __FILE__ ) . '/tmp/' . randstr( 16 ) . '.cookies';
- }
- }
- }
- $db = new FakeDB( );
- if (!function_exists( 'saveSettingsArray' )) {
- function saveSettingsArray() {
- return true;
- }
- }
- if (!function_exists( 'randstr' )) {
- function randstr($int) {
- return 'cookie';
- }
- }
- if (!function_exists( 'urlCombine' )) {
- function urlCombine($a, $b) {
- return $b;
- }
- }
- class ASMultiCurl extends MultiCurl {
- var $tabRet = array( );
- function onLoad($url, $content, $info) {
- if (400 <= (int)$info['http_code']) {
- as_debug( '
- ************
- KO : ' . $info['http_code'] . ' -> ' . $url . '
- ************
- ' );
- return false;
- }
- if (( !stristr( $info['content_type'], 'html' ) && !stristr( $info['content_type'], 'xml' ) )) {
- as_debug( '
- ************
- KO : ' . $info['content_type'] . ' -> ' . $url . '
- ************
- ' );
- return false;
- }
- if (trim( $content ) == '') {
- as_debug( '
- ************
- KO : Vide -> ' . $url . '
- ************
- ' );
- return false;
- }
- $this->tabRet[$url] = trim( $content );
- }
- }
- ?>
- ..................................................
- ..........................
- ................
Add Comment
Please, Sign In to add comment