<rss version="2.0">
		<channel>
			<title>Support skryptu MocneLinki.info - pingowanie</title>
			<lastBuildDate>Wed, 08 Sep 2010 14:24:26 +0200</lastBuildDate>
			<link>http://skrypt.mocnelinki.info/</link>
			<description></description>
			<generator>Lussumo Vanilla 1.1.4</generator>
			<item>
		<title>pingowanie</title>
		<link>http://skrypt.mocnelinki.info/discussion/36/?Focus=96#Comment_96</link>
		<guid isPermaLink="false">http://skrypt.mocnelinki.info/discussion/36/?Focus=96#Comment_96</guid>
		<pubDate>Mon, 24 Mar 2008 18:28:40 +0100</pubDate>
		<author>crack</author>
		<description>
			<![CDATA[Witam<br />Nie wiem czy juz byl o tym wątek ale dodanie pingowania do skryptu mocnelinki to byloby bardzo dobre rozwiązanie, pingowanie po każdym dodaniu wpisu, można by też dodać akcję do crona, dynamiczny sitemap dla gogla to też niezły pomysł.<br />Przepraszam jeżeli były o tym wątki]]>
		</description>
	</item>
	<item>
		<title>pingowanie</title>
		<link>http://skrypt.mocnelinki.info/discussion/36/?Focus=100#Comment_100</link>
		<guid isPermaLink="false">http://skrypt.mocnelinki.info/discussion/36/?Focus=100#Comment_100</guid>
		<pubDate>Fri, 18 Jul 2008 16:02:31 +0200</pubDate>
		<author>azbest</author>
		<description>
			<![CDATA[CZesc. Zrobilem pinga do ML.<br />Musisz utworzyc najpierw kanal RSS. Następnie plik ping. php oraz zmodyfikować .htaccess . Kody poniżej:<br /><br />W .htaccess wstawiamy w środek linijkę: <br />  RewriteRule ^rss.xml$ rss.php [NC,NS]<br /><br />tworzymy plik rss.php o nast zawartosci:<br /><br />&lt;?php<br />//article_id, article_title, article_seo_title, article_description FROM  `ml_articles`  "<br />include("robots_counter.php");<br /><br /><br />require_once 'includes/app_top.php';<br /><br />header ('Content-Type: text/xml; charset=iso-8859-2');<br />$date = $db->get_row('article_date', 'articles', "ORDER BY article_date DESC");<br />$xml = '&lt;?xml version="1.0" encoding="iso-8859-2"?><br />&lt;rss version="2.0"><br />&lt;channel><br />&lt;title>'.conf('site_name').'&lt;/title><br />&lt;description>'.conf('site_description').'&lt;/description><br />&lt;link>'.conf('site_address').'&lt;/link><br />&lt;copyright>azbeston&lt;/copyright><br />&lt;language>pl&lt;/language>'<br />;<br /><br />    <br />// artykuły<br /><br />$q = $db->select('*', 'articles', "WHERE article_status='2'ORDER BY article_id DESC LIMIT 0, 10");<br />while ($r = $db->fetch($q)) {<br />    $xml .= '<br />    &lt;item><br />        &lt;title>'.$r['article_title'].'&lt;/title><br />        &lt;link>'.conf('site_address').'n-'.$r['article_id'].'-'.$r['article_seo_title'].'.html&lt;/link><br />        &lt;description>'.$r['article_description'].'&lt;/description><br />        &lt;guid isPermaLink="true">'.conf('site_address').'n-'.$r['article_id'].'-'.$r['article_seo_title'].'.html&lt;/guid><br />        <br />    &lt;/item>';<br />}<br />    <br />$xml .= '<br /><br />&lt;item><br />        &lt;title>Blog o Hotelach&lt;/title><br />        &lt;link>http://presell.waw.pl&lt;/link><br />        &lt;description>Zapraszam na Precla o Hotelach&lt;/description><br />        &lt;guid isPermaLink="true">http://presell.waw.pl&lt;/guid><br />        <br />    &lt;/item><br />&lt;/channel><br />&lt;/rss>';<br />echo $xml;<br />require_once 'includes/app_bottom.php';<br />?>]]>
		</description>
	</item>
	<item>
		<title>pingowanie</title>
		<link>http://skrypt.mocnelinki.info/discussion/36/?Focus=101#Comment_101</link>
		<guid isPermaLink="false">http://skrypt.mocnelinki.info/discussion/36/?Focus=101#Comment_101</guid>
		<pubDate>Fri, 18 Jul 2008 16:03:42 +0200</pubDate>
		<author>azbest</author>
		<description>
			<![CDATA[Teraz tworzymy plik ping.php o zawartości i <strong>modyfikujemy</strong><br /><br />&lt;?php<br />   // Tu wtypełniamy w kolejności: tytuł, adres url z http,listapingów<br /><br />   $blogTitle="Tytuł";<br />   $blogUrl="http://";<br />   $pingListFile="pinglist.txt";<br />   $showDebugInfo=FALSE; // Do you want verbose output?<br /><br />   // Skończ edycję<br /><br />   <br /><br />   $replacementCount=0; <br />   $userAgent="pingrpc.php by tayefeh";<br /><br />   // Read pinglist file. Must contain one fully qualified URL<br />   // (e.g: <a href='http://rpc.technorati.com/rpc/ping'>http://rpc.technorati.com/rpc/ping</a>) PER LINE (-> <br />   // delimiter is an ASCII-linebreak)<br />   $fp=fopen($pingListFile,"r");<br />   while ( ! feof( $fp) )<br />   {<br />      $line = trim(fgets( $fp, 4096));<br />      // get the hostname<br />      $host=$line; // Make a copy of $line<br />      $host=preg_replace('/^.*http:\/\//','',$host); // Delete anything before http://<br />      $host=preg_replace('/\/.*$/','',$host); // Delete anything after behind the hostname<br /><br />      // get the path <br />      $path=$line; // Make another copy of $line<br />      //$path=preg_replace('/^.*http:\/\/[a-zA-Z0-9\-_\.]*\.[a-zA-Z]{1,3}\//','',$path,-1,$replacementCount); // Delete anything before the path<br />      if(!$replacementCount) $path=''; // if there was no replacement (i.e. no explicit path), act appropiately<br />      if($host) $myList[$host]=$path;<br />   }<br />   echo "&lt;h1>Ping process started&lt;/h1>";<br /><br />   echo "&lt;p>Reading URLs from file $pingListFile: ";<br />   echo count($myList)." urls read.&lt;/p>";<br /><br />   // Use DOM to create the XML-File<br />   $xml= new DOMDocument('1.0');<br />   $xml->formatOutput=true;<br />   $xml->preserveWhiteSpace=false;<br />   $xml->substituteEntities=false;<br /><br />   // Create the xml structure<br />   $methodCall=$xml->appendChild($xml->createElement('methodCall'));<br />   $methodName=$methodCall->appendChild($xml->createElement('methodName'));<br />   $params=$methodCall->appendChild($xml->createElement('params'));<br />   $param[1]=$params->appendChild($xml->createElement('param'));<br />   $value[1]=$param[1]->appendChild($xml->createElement('value'));<br />   $param[2]=$params->appendChild($xml->createElement('param'));<br />   $value[2]=$param[2]->appendChild($xml->createElement('value'));<br /><br />   // Set the node values<br />   $methodName->nodeValue="weblogUpdates.ping";<br />   $value[1]->nodeValue=$blogTitle;<br />   $value[2]->nodeValue=$blogUrl;<br /><br />   $xmlrpcReq = $xml->saveXML(); // Write the document into a string<br />   $xmlrpcLength = strlen( $xmlrpcReq ); // Get the string length.<br /><br />   echo "Here&apos;s the xml-message I generated (size: $xmlrpcLength bytes):";<br /><br />   echo "\n&lt;pre>\n";<br />   echo htmlentities($xmlrpcReq);<br />   echo "&lt;/pre>";<br /><br />   echo "&lt;dl>";<br /><br />   // Proceed every link read from file<br />   foreach ( $myList as $host => $path)<br />   {<br />      if($showDebugInfo) echo "&lt;hr/>";<br /><br />      echo "&lt;dt>&lt;strong>Pinging host: $host  &lt;/strong>";<br />      $httpReq  = "POST /" . $path . " HTTP/1.0\r\n";<br />      $httpReq .= "User-Agent: " . $userAgent. "\r\n";<br />      $httpReq .= "Host: " . $host . "\r\n";<br />      $httpReq .= "Content-Type: text/xml\r\n";<br />      $httpReq .= "Content-length: $xmlrpcLength\r\n\r\n";<br />      $httpReq .= "$xmlrpcReq\r\n";<br />      echo "&lt;/dt>";<br /><br />      if($showDebugInfo)<br />      {<br />	 echo "&lt;dd>&lt;strong>Request:&lt;/strong>&lt;pre>&lt;span style=\"color: #cc9900\">".htmlentities($httpReq)."&lt;/span>&lt;/pre>";<br />	 echo "&lt;strong>Answer&lt;/strong>:&lt;span style=\"color: #99cc00\">&lt;pre>";<br />      }<br /><br />      // Actually, send ping<br />      if ( $pinghandle = @fsockopen( $host, 80 ) )<br />      {<br />	 @fputs( $pinghandle, $httpReq );<br />	 while ( ! feof( $pinghandle ) )<br />	 { <br />	    $pingresponse = @fgets( $pinghandle, 128 );<br />	    if($showDebugInfo) echo htmlentities($pingresponse);<br />	 }<br />	 @fclose( $pinghandle );<br />      }<br />      if($showDebugInfo) echo "&lt;/span>&lt;/pre>&lt;/dd>";<br />   }<br />   echo "&lt;/dl>";<br />   echo "&lt;p>FINISHED&lt;/p>";<br /><br />?> <br /><br />Tworzymy ostatni plik <strong> pinglist.txt</strong>   to lista pingów, czyli serwerów które bedziemy pingować. Dużo jest ich w sieci oto jedna z nich:<br /><br />http://blogsearch.google.com/ping/RPC2<br />http://rpc.technorati.com/rpc/ping<br />http://www.newsisfree.com/xmlrpctest.php<br />http://ping.bitacoras.com<br />http://ping.blo.gs/<br />http://ping.bloggers.jp/rpc/<br />http://api.moreover.com/ping<br />http://api.my.yahoo.com/RPC2<br />http://api.my.yahoo.com/rss/ping<br />http://www.bitacoles.net/ping.php<br />http://bitacoras.net/ping<br />http://blogdb.jp/xmlrpc<br />http://www.blogdigger.com/RPC2<br />http://www.blogoole.com/ping/<br />http://www.blogoon.net/ping/]]>
		</description>
	</item>
	
		</channel>
	</rss>