<?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" >
<channel>
<title>งานออนไลน์ </title>
<link>http://tteen.nireblog.com</link>
<description>hot web for free </description>
<pubDate>Mon, 12 May 2008 02:34:58 +0100</pubDate>
<image>
<title>งานออนไลน์ </title>
<url>http://nireblog.com/imagenes/logo.png</url>
<link>http://tteen.nireblog.com</link>
</image>
<generator>http://nireblog.com</generator>
	<item>
	<title>code 1</title>
	<link>http://tteen.nireblog.com/post/2008/04/25/code-1</link>
	<guid>http://tteen.nireblog.com/post/2008/04/25/code-1</guid>
		<description><![CDATA[<p>function tla_ads() {</p>
<p>	// Number of seconds before connection to XML times out<br />
	// (This can be left the way it is)<br />
	$CONNECTION_TIMEOUT = 10;</p>
<p>	// Local file to store XML<br />
	// This file MUST be writable by web server<br />
	// You should create a blank file and CHMOD it to 666<br />
	$LOCAL_XML_FILENAME = "local_222440.xml";</p>
<p>	if( !file_exists($LOCAL_XML_FILENAME) ) die("Script error: $LOCAL_XML_FILENAME does not exist. Please create a blank file named $LOCAL_XML_FILENAME.");<br />
	if( !is_writable($LOCAL_XML_FILENAME) ) die("Script error: $LOCAL_XML_FILENAME is not writable. Please set write permissions on $LOCAL_XML_FILENAME.");</p>
<p>	if( filemtime($LOCAL_XML_FILENAME) < (time() - 3600) || filesize($LOCAL_XML_FILENAME) < 20) {<br />
		$request_uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : "";<br />
		$user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : "";<br />
		tla_updateLocalXML("http://www.text-link-ads.com/xml.php?inventory_key=DOCTPCM94J4OHJ8XBHZG&referer=" . urlencode($request_uri) .  "&user_agent=" . urlencode($user_agent), $LOCAL_XML_FILENAME, $CONNECTION_TIMEOUT);<br />
	}</p>
<p>	$xml = tla_getLocalXML($LOCAL_XML_FILENAME);</p>
<p>	$arr_xml = tla_decodeXML($xml);</p>
<p>	if ( is_array($arr_xml) ) {<br />
		echo "\n</p>
<ul style=\"list-style: none; padding: 0; width: 100%; margin: 0;\">\n";<br />
		for ($i = 0; $i < count($arr_xml['URL']); $i++) {<br />
			if( isset($arr_xml['PostID'][$i]) && $arr_xml['PostID'][$i] > 0 ) continue;<br />
			echo "</p>
<li style=\"padding: 0; display: block; width: 13%; margin: 0; float: left; clear: none;\">".$arr_xml['BeforeText'][$i]." <a href=\"".$arr_xml['URL'][$i]."\">".$arr_xml['Text'][$i]."</a> ".$arr_xml['AfterText'][$i]."</li>
<p>\n";<br />
		}<br />
		echo "</ul>
<p>";<br />
	}</p>
<p>}</p>
<p>function tla_updateLocalXML($url, $file, $time_out)<br />
{<br />
	if($handle = fopen($file, "a")){<br />
			fwrite($handle, "\n");<br />
			fclose($handle);<br />
	}<br />
	if($xml = file_get_contents_tla($url, $time_out)) {<br />
		$xml = substr($xml, strpos($xml,'<?'));</p>
<p>		if ($handle = fopen($file, "w")) {<br />
			fwrite($handle, $xml);<br />
			fclose($handle);<br />
		}<br />
	}<br />
}</p>
<p>function tla_getLocalXML($file)<br />
{<br />
	$contents = "";<br />
	if($handle = fopen($file, "r")){<br />
		$contents = fread($handle, filesize($file)+1);<br />
		fclose($handle);<br />
	}<br />
	return $contents;<br />
}</p>
<p>function file_get_contents_tla($url, $time_out)<br />
{<br />
	$result = "";<br />
	$url = parse_url($url);</p>
<p>	if ($handle = @fsockopen ($url["host"], 80)) {<br />
		if(function_exists("socket_set_timeout")) {<br />
			socket_set_timeout($handle,$time_out,0);<br />
		} else if(function_exists("stream_set_timeout")) {<br />
			stream_set_timeout($handle,$time_out,0);<br />
		}</p>
<p>		fwrite ($handle, "GET $url[path]?$url[query] HTTP/1.0\r\nHost: $url[host]\r\nConnection: Close\r\n\r\n");<br />
		while (!feof($handle)) {<br />
			$result .= @fread($handle, 40960);<br />
		}<br />
		fclose($handle);<br />
	}</p>
<p>	return $result;<br />
}</p>
<p>function tla_decodeXML($xmlstg)<br />
{</p>
<p>	if( !function_exists('html_entity_decode') ){<br />
		function html_entity_decode($string)<br />
		{<br />
		   // replace numeric entities<br />
		   $string = preg_replace('~
</p>
<p><a href="http://tteen.nireblog.com/post/2008/04/25/code-1#comments">Comments</a></p>]]></description>
	<pubDate>Fri, 25 Apr 2008 02:55:52 +0100</pubDate>	</item>
	<item>
	<title>code</title>
	<link>http://tteen.nireblog.com/post/2008/04/25/code</link>
	<guid>http://tteen.nireblog.com/post/2008/04/25/code</guid>
		<description><![CDATA[<p><%@ Language=VBScript %><br />
<%<br />
' Local file to store XML<br />
' You must create a blank file named "local_222440.xml" in the same<br />
' directory as this script. It MUST be writable by the web<br />
' server. On unix you would CHMOD 666 the file. On Windows<br />
' you will need to access your custom control panel to set<br />
' the permissions or contact your hosting company.</p>
<p>Const ForReading = 1, ForWriting = 2</p>
<p>Dim LOCAL_XML_FILENAME, sourceFile, FSO</p>
<p>LOCAL_XML_FILENAME = server.MapPath("local_222440.xml")<br />
sourceFile = "http://www.text-link-ads.com/xml.php?inventory_key=DOCTPCM94J4OHJ8XBHZG&referer=" & Server.UrlEncode(Request.ServerVariables("HTTP_REFERER")) & "&user_agent=" & Server.UrlEncode(Request.ServerVariables("HTTP_USER_AGENT"))<br />
Set FSO = server.createObject("Scripting.FileSystemObject")</p>
<p>' update local XML<br />
Dim DateMod, MonthString, DayString, DateModFile, DateModLimit</p>
<p>DateMod = FSO.getFile(LOCAL_XML_FILENAME).DateLastModified</p>
<p>MonthString = Month(DateMod)<br />
If (MonthString < 10) Then<br />
	MonthString = "0" & MonthString<br />
End If</p>
<p>DayString = Day(DateMod)<br />
If (DayString < 10) Then<br />
	DayString = "0" & DayString<br />
End If</p>
<p>DateModFile = Year(DateMod) & "-" & MonthString & "-" & DayString & " " & Hour(DateMod) & ":" & Minute(DateMod) & ":" & Second(DateMod)</p>
<p>MonthString = Month(Date)<br />
If (MonthString < 10) Then<br />
	MonthString = "0" & MonthString<br />
End If</p>
<p>DayString = Day(Date)<br />
If (DayString < 10) Then<br />
	DayString = "0" & DayString<br />
End If</p>
<p>DateModLimit = Year(Date) & "-" & MonthString & "-" & DayString & " " & (Hour(Now)-1) & ":" & Minute(Now) & ":" & Second(Now)</p>
<p>Dim Contents, Result, xmlhttp, TextStream</p>
<p>' read local XML<br />
Contents = ""<br />
Set TextStream = FSO.OpenTextFile(LOCAL_XML_FILENAME, ForReading, False, -2)<br />
Do While Not TextStream.AtEndOfStream<br />
	Contents = Contents & TextStream.ReadLine<br />
Loop<br />
TextStream.Close<br />
Set TextStream = nothing</p>
<p>If (DateModFile < DateModLimit Or FSO.getFile(LOCAL_XML_FILENAME).size < 20) Then<br />
	' fetch remote XML<br />
	Set xmlhttp = CreateObject("Microsoft.XMLHTTP")<br />
	xmlhttp.open "GET", sourceFile, False<br />
	xmlhttp.send ""<br />
	Result = xmlhttp.responseText<br />
	If (Result <> "") Then<br />
		Contents = Result<br />
	End If</p>
<p>	' write new XML to local file<br />
	Set TextStream = FSO.OpenTextFile(LOCAL_XML_FILENAME, ForWriting, True)<br />
	TextStream.Write Contents<br />
	TextStream.Close<br />
	Set TextStream = nothing<br />
End If</p>
<p>' parse local XML<br />
Dim source<br />
Set source = Server.CreateObject("Microsoft.XMLDOM")<br />
source.async = false<br />
source.loadXML(Contents)</p>
<p>' Output links<br />
Dim objLst, i, numLinks, objLink, objLinkChildren, linkNode, URL, Text, BeforeText, AfterText</p>
<p>Set objLst = source.getElementsByTagName("Link")<br />
numLinks = objLst.length - 1</p>
<p>Response.Write("<br />
<ul style=""margin: 0; list-style: none; width: 100%; padding: 0;"">")<br />
For i = 0 To numLinks<br />
	Set objLink = objLst.item(i)<br />
	Set objLinkChildren = objLink.childNodes<br />
	URL = ""<br />
	Text = ""<br />
	BeforeText = ""<br />
	AfterText = ""</p>
<p>	For Each linkNode In objLinkChildren<br />
		If linkNode.nodeName = "URL" Then<br />
			URL = linkNode.text<br />
		End If<br />
		If linkNode.nodeName = "Text" Then<br />
			Text = linkNode.text<br />
		End If<br />
		If linkNode.nodeName = "BeforeText" Then<br />
			BeforeText = linkNode.text<br />
		End If<br />
		If linkNode.nodeName = "AfterText" Then<br />
			AfterText = linkNode.text<br />
		End If<br />
	Next</p>
<p>	Response.Write("<br />
<li style=""width: 13%; margin: 0; display: block; float: left; clear: none; padding: 0;"">" & BeforeText & " <a href=""" & URL & """>" & Text & "</a> " & AfterText & "</li>
<p>")<br />
Next<br />
Response.Write("</ul>
<p>")</p>
<p>%><br />
http://www.text-link-ads.com/xml_blogger.php?inventory_key=DOCTPCM94J4OHJ8XBHZG&feed=1<br />
http://www.text-link-ads.com/xml_blogger.php?inventory_key=DOCTPCM94J4OHJ8XBHZG&feed=2<br />
<?php</p>
<p>function tla_ads() {</p>
<p>	// Number of seconds before connection to XML times out<br />
	// (This can be left the way it is)<br />
	$CONNECTION_TIMEOUT = 10;</p>
<p>	// Local file to store XML<br />
	// This file MUST be writable by web server<br />
	// You should create a blank file and CHMOD it to 666<br />
	$LOCAL_XML_FILENAME = "local_222440.xml";</p>
<p>	if( !file_exists($LOCAL_XML_FILENAME) ) die("Script error: $LOCAL_XML_FILENAME does not exist. Please create a blank file named $LOCAL_XML_FILENAME.");<br />
	if( !is_writable($LOCAL_XML_FILENAME) ) die("Script error: $LOCAL_XML_FILENAME is not writable. Please set write permissions on $LOCAL_XML_FILENAME.");</p>
<p>	if( filemtime($LOCAL_XML_FILENAME) < (time() - 3600) || filesize($LOCAL_XML_FILENAME) < 20) {<br />
		$request_uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : "";<br />
		$user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : "";<br />
		tla_updateLocalXML("http://www.text-link-ads.com/xml.php?inventory_key=DOCTPCM94J4OHJ8XBHZG&referer=" . urlencode($request_uri) .  "&user_agent=" . urlencode($user_agent), $LOCAL_XML_FILENAME, $CONNECTION_TIMEOUT);<br />
	}</p>
<p>	$xml = tla_getLocalXML($LOCAL_XML_FILENAME);</p>
<p>	$arr_xml = tla_decodeXML($xml);</p>
<p>	if ( is_array($arr_xml) ) {<br />
		echo "\n<br />
<ul style=\"padding: 0; list-style: none; margin: 0; width: 100%;\">\n";<br />
		for ($i = 0; $i < count($arr_xml['URL']); $i++) {<br />
			if( isset($arr_xml['PostID'][$i]) && $arr_xml['PostID'][$i] > 0 ) continue;<br />
			echo "<br />
<li style=\"margin: 0; display: block; width: 13%; clear: none; float: left; padding: 0;\">".$arr_xml['BeforeText'][$i]." <a href=\"".$arr_xml['URL'][$i]."\">".$arr_xml['Text'][$i]."</a> ".$arr_xml['AfterText'][$i]."</li>
<p>\n";<br />
		}<br />
		echo "</ul>
<p>";<br />
	}</p>
<p>}</p>
<p>function tla_updateLocalXML($url, $file, $time_out)<br />
{<br />
	if($handle = fopen($file, "a")){<br />
			fwrite($handle, "\n");<br />
			fclose($handle);<br />
	}<br />
	if($xml = file_get_contents_tla($url, $time_out)) {<br />
		$xml = substr($xml, strpos($xml,'<?'));</p>
<p>		if ($handle = fopen($file, "w")) {<br />
			fwrite($handle, $xml);<br />
			fclose($handle);<br />
		}<br />
	}<br />
}</p>
<p>function tla_getLocalXML($file)<br />
{<br />
	$contents = "";<br />
	if($handle = fopen($file, "r")){<br />
		$contents = fread($handle, filesize($file)+1);<br />
		fclose($handle);<br />
	}<br />
	return $contents;<br />
}</p>
<p>function file_get_contents_tla($url, $time_out)<br />
{<br />
	$result = "";<br />
	$url = parse_url($url);</p>
<p>	if ($handle = @fsockopen ($url["host"], 80)) {<br />
		if(function_exists("socket_set_timeout")) {<br />
			socket_set_timeout($handle,$time_out,0);<br />
		} else if(function_exists("stream_set_timeout")) {<br />
			stream_set_timeout($handle,$time_out,0);<br />
		}</p>
<p>		fwrite ($handle, "GET $url[path]?$url[query] HTTP/1.0\r\nHost: $url[host]\r\nConnection: Close\r\n\r\n");<br />
		while (!feof($handle)) {<br />
			$result .= @fread($handle, 40960);<br />
		}<br />
		fclose($handle);<br />
	}</p>
<p>	return $result;<br />
}</p>
<p>function tla_decodeXML($xmlstg)<br />
{</p>
<p>	if( !function_exists('html_entity_decode') ){<br />
		function html_entity_decode($string)<br />
		{<br />
		   // replace numeric entities<br />
		   $string = preg_replace('~&#x([0-9a-f]+);~ei', 'chr(hexdec("\1"))', $string);<br />
		   $string = preg_replace('~&#([0-9]+);~e', 'chr(\1)', $string);<br />
		   // replace literal entities<br />
		   $trans_tbl = get_html_translation_table(HTML_ENTITIES);<br />
		   $trans_tbl = array_flip($trans_tbl);<br />
		   return strtr($string, $trans_tbl);<br />
		}<br />
	}</p>
<p>	$out = "";<br />
	$retarr = "";</p>
<p>	preg_match_all ("/<(.*?)>(.*?)</", $xmlstg, $out, PREG_SET_ORDER);<br />
	$search_ar = array('&#60;', '&#62;', '&#34;');<br />
	$replace_ar = array('<', '>', '"');<br />
	$n = 0;<br />
	while (isset($out[$n]))<br />
	{<br />
		$retarr[$out[$n][1]][] = str_replace($search_ar, $replace_ar,html_entity_decode(strip_tags($out[$n][0])));<br />
		$n++;<br />
	}<br />
	return $retarr;<br />
}</p>
<p>tla_ads();</p>
<p>?><%@ page import="java.net.*"%><br />
<%@ page import="java.io.*"%><br />
<%@ page import="javax.xml.parsers.DocumentBuilderFactory"%><br />
<%@ page import="javax.xml.parsers.ParserConfigurationException"%><br />
<%@ page import="org.xml.sax.SAXException"%><br />
<%@ page import="org.w3c.dom.*"%><br />
<%@ page import="java.util.*"%><br />
<%!<br />
	// The following code was graciously provided by Armond Avanes (http://www.armondavanes.com)</p>
<p>	private String tla_ads( HttpServletRequest request, HttpServletResponse response ) throws IOException, ParserConfigurationException, SAXException<br />
	{<br />
		// Number of seconds before connection to XML times out<br />
		// (This can be left the way it is)<br />
		int CONNECTION_TIMEOUT = 10;</p>
<p>		// Local file to store XML<br />
		// This file MUST be writable by web server<br />
		// You should create a blank file and CHMOD it to 666<br />
		String LOCAL_XML_FILENAME = "local_222440.xml";<br />
		String INVENTORY_KEY = "DOCTPCM94J4OHJ8XBHZG";</p>
<p>		File localXmlFile = new File( getServletConfig().getServletContext().getRealPath(LOCAL_XML_FILENAME ) );</p>
<p>		if( !localXmlFile.exists() ) {<br />
			return( "Script error: " + localXmlFile.getName() + " does not exist. Please create a blank file named " + localXmlFile.getName() + "." );<br />
		}<br />
		if( !localXmlFile.canWrite() ) {<br />
			return( "Script error: " + localXmlFile.getName() + " is not writable. Please set write permissions on " + localXmlFile.getName() + "." );<br />
		}</p>
<p>		if( localXmlFile.lastModified()<(new Date().getTime() - 3600*1000) || localXmlFile.length()<20 ) {<br />
			String request_uri = (request.getRequestURI()!=null) ? request.getRequestURI() : "";<br />
			String user_agent = (request.getHeader("User-Agent")!=null) ? request.getHeader("User-Agent") : "";<br />
			URL url = new URL("http://www.text-link-ads.com/xml.php?inventory_key=" + INVENTORY_KEY + "&referer=" + response.encodeURL( request_uri ) + "&user_agent=" + response.encodeURL( user_agent ));</p>
<p>			tla_updateLocalXML(url, localXmlFile, CONNECTION_TIMEOUT);<br />
		}</p>
<p>		Map[] arr_xml = tla_decodeXML(localXmlFile );<br />
		StringBuffer sb = new StringBuffer();</p>
<p>		if( arr_xml!=null && arr_xml.length>0 ) {<br />
			sb.append( "\n<br />
<ul style=\"width: 100%; margin: 0; list-style: none; padding: 0;\">\n" );<br />
			for( int i=0; i<arr_xml.length; i++ ) {<br />
				Map map = arr_xml[i];</p>
<p>				sb.append( "<br />
<li style=\"display: block; margin: 0; width: 13%; padding: 0; clear: none; float: left;\">" );<br />
				sb.append( map.get("BeforeText") );<br />
				sb.append( " <a href=\"" + map.get("URL") + "\">" + map.get("Text") + "</a> " );<br />
				sb.append( map.get("AfterText") + "</li>
<p>\n" );<br />
			}<br />
			sb.append("</ul>
<p>");<br />
		}</p>
<p>	return sb.toString();<br />
	}</p>
<p>	private void tla_updateLocalXML(URL url, File file, int time_out) throws IOException<br />
	{<br />
		file.setLastModified( new Date().getTime() );</p>
<p>		String xml = file_get_contents_tla(url, time_out);</p>
<p>		if( xml!=null && !xml.trim().equals("") ) {<br />
			FileWriter fw = new FileWriter(file);</p>
<p>			fw.write( xml );<br />
			fw.close();<br />
		}<br />
	}</p>
<p>	private String file_get_contents_tla(URL url, int time_out) throws IOException<br />
	{<br />
		URLConnection urlConnection = url.openConnection();</p>
<p>		//urlConnection.setConnectTimeout( time_out * 1000 );<br />
		//urlConnection.setReadTimeout( time_out * 1000 );</p>
<p>		InputStream is = urlConnection.getInputStream();<br />
		StringBuffer content = new StringBuffer();<br />
		int ch;</p>
<p>		while( (ch=is.read())!=-1 )<br />
			content.append( (char)ch );</p>
<p>		is.close();<br />
		return content.toString();<br />
	}</p>
<p>	private Map[] tla_decodeXML(File file) throws ParserConfigurationException, IOException, SAXException<br />
	{<br />
		Document dom = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse( file );<br />
		Node linksRoot = dom.getFirstChild();<br />
		NodeList links = linksRoot.getChildNodes();<br />
		List result = new ArrayList();</p>
<p>		for( int i=0; i<br />
<links.getLength(); i++ )<br />
		{<br />
			Node link = links.item(i);</p>
<p>			if( link.getNodeType()==Node.TEXT_NODE )<br />
				continue;</p>
<p>			NodeList linkAttributes = link.getChildNodes();<br />
			Map map = new HashMap();</p>
<p>			for( int j=0; j<linkAttributes.getLength(); j++ )<br />
			{<br />
				Node linkAttr = linkAttributes.item(j);<br />
				Text textNode = (Text)linkAttr.getFirstChild();<br />
				String value = ( textNode!=null ) ? textNode.getNodeValue().trim() : "";</p>
<p>				map.put( linkAttr.getNodeName(), value );<br />
			}<br />
			result.add(map);<br />
		}</p>
<p>		return (Map[])result.toArray( new Map[0] );<br />
	}<br />
%><br />
<%= tla_ads(request, response) %><?php</p>
<p>function tla_ads() {</p>
<p>	// Number of seconds before connection to XML times out<br />
	// (This can be left the way it is)<br />
	$CONNECTION_TIMEOUT = 10;</p>
<p>	// Local file to store XML<br />
	// This file MUST be writable by web server<br />
	// You should create a blank file and CHMOD it to 666<br />
	$LOCAL_XML_FILENAME = "local_222440.xml";</p>
<p>	if( !file_exists($LOCAL_XML_FILENAME) ) die("Script error: $LOCAL_XML_FILENAME does not exist. Please create a blank file named $LOCAL_XML_FILENAME.");<br />
	if( !is_writable($LOCAL_XML_FILENAME) ) die("Script error: $LOCAL_XML_FILENAME is not writable. Please set write permissions on $LOCAL_XML_FILENAME.");</p>
<p>	if( filemtime($LOCAL_XML_FILENAME) < (time() - 3600) || filesize($LOCAL_XML_FILENAME) < 20) {<br />
		$request_uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : "";<br />
		$user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : "";<br />
		tla_updateLocalXML("http://www.text-link-ads.com/xml.php?inventory_key=DOCTPCM94J4OHJ8XBHZG&referer=" . urlencode($request_uri) .  "&user_agent=" . urlencode($user_agent), $LOCAL_XML_FILENAME, $CONNECTION_TIMEOUT);<br />
	}</p>
<p>	$xml = tla_getLocalXML($LOCAL_XML_FILENAME);</p>
<p>	$arr_xml = tla_decodeXML($xml);</p>
<p>	if ( is_array($arr_xml) ) {<br />
		echo "\n<br />
<ul style=\"padding: 0; margin: 0; list-style: none; width: 100%;\">\n";<br />
		for ($i = 0; $i < count($arr_xml['URL']); $i++) {<br />
			if( isset($arr_xml['PostID'][$i]) && $arr_xml['PostID'][$i] > 0 ) continue;<br />
			echo "<br />
<li style=\"width: 13%; margin: 0; float: left; clear: none; padding: 0; display: block;\">".$arr_xml['BeforeText'][$i]." <a href=\"".$arr_xml['URL'][$i]."\">".$arr_xml['Text'][$i]."</a> ".$arr_xml['AfterText'][$i]."</li>
<p>\n";<br />
		}<br />
		echo "</ul>
<p>";<br />
	}</p>
<p>}</p>
<p>function tla_updateLocalXML($url, $file, $time_out)<br />
{<br />
	if($handle = fopen($file, "a")){<br />
			fwrite($handle, "\n");<br />
			fclose($handle);<br />
	}<br />
	if($xml = file_get_contents_tla($url, $time_out)) {<br />
		$xml = substr($xml, strpos($xml,'<?'));</p>
<p>		if ($handle = fopen($file, "w")) {<br />
			fwrite($handle, $xml);<br />
			fclose($handle);<br />
		}<br />
	}<br />
}</p>
<p>function tla_getLocalXML($file)<br />
{<br />
	$contents = "";<br />
	if($handle = fopen($file, "r")){<br />
		$contents = fread($handle, filesize($file)+1);<br />
		fclose($handle);<br />
	}<br />
	return $contents;<br />
}</p>
<p>function file_get_contents_tla($url, $time_out)<br />
{<br />
	$result = "";<br />
	$url = parse_url($url);</p>
<p>	if ($handle = @fsockopen ($url["host"], 80)) {<br />
		if(function_exists("socket_set_timeout")) {<br />
			socket_set_timeout($handle,$time_out,0);<br />
		} else if(function_exists("stream_set_timeout")) {<br />
			stream_set_timeout($handle,$time_out,0);<br />
		}</p>
<p>		fwrite ($handle, "GET $url[path]?$url[query] HTTP/1.0\r\nHost: $url[host]\r\nConnection: Close\r\n\r\n");<br />
		while (!feof($handle)) {<br />
			$result .= @fread($handle, 40960);<br />
		}<br />
		fclose($handle);<br />
	}</p>
<p>	return $result;<br />
}</p>
<p>function tla_decodeXML($xmlstg)<br />
{</p>
<p>	if( !function_exists('html_entity_decode') ){<br />
		function html_entity_decode($string)<br />
		{<br />
		   // replace numeric entities<br />
		   $string = preg_replace('~&#x([0-9a-f]+);~ei', 'chr(hexdec("\1"))', $string);<br />
		   $string = preg_replace('~&#([0-9]+);~e', 'chr(\1)', $string);<br />
		   // replace literal entities<br />
		   $trans_tbl = get_html_translation_table(HTML_ENTITIES);<br />
		   $trans_tbl = array_flip($trans_tbl);<br />
		   return strtr($string, $trans_tbl);<br />
		}<br />
	}</p>
<p>	$out = "";<br />
	$retarr = "";</p>
<p>	preg_match_all ("/<(.*?)>(.*?)</", $xmlstg, $out, PREG_SET_ORDER);<br />
	$search_ar = array('&#60;', '&#62;', '&#34;');<br />
	$replace_ar = array('<', '>', '"');<br />
	$n = 0;<br />
	while (isset($out[$n]))<br />
	{<br />
		$retarr[$out[$n][1]][] = str_replace($search_ar, $replace_ar,html_entity_decode(strip_tags($out[$n][0])));<br />
		$n++;<br />
	}<br />
	return $retarr;<br />
}</p>
<p>tla_ads();</p>
<p>?>use CGI;<br />
use XML::Simple;<br />
use LWP::Simple;<br />
use Data::Dumper;<br />
use URI::Escape;</p>
<p>my $page = new CGI;<br />
print $page->header( "text/html" );</p>
<p># Local file to store XML<br />
# You must create a blank file with this name in the same<br />
# directory as this script. It MUST be writable by the web<br />
# server. On unix you would CHMOD 666 the file. On Windows<br />
# you will need to access your custom control panel to set<br />
# the permissions or contact your hosting company.<br />
my $LOCAL_XML_FILENAME = "local_222440.xml";</p>
<p># update XML file<br />
my ($file_size,$file_mod) = (stat ($LOCAL_XML_FILENAME) )[7,9];</p>
<p>if(($file_mod < time - 3600) || $file_size < 20){<br />
	$now = time;<br />
    utime $now, $now, ($LOCAL_XML_FILENAME);<br />
	my $xml = get("http://www.text-link-ads.com/xml.php?inventory_key=DOCTPCM94J4OHJ8XBHZG&referer=" . uri_escape($ENV{HTTP_REFERER}) . "&user_agent=" . uri_escape($ENV{HTTP_USER_AGENT}));<br />
	if($xml){<br />
		open (CACHE, "> $LOCAL_XML_FILENAME");<br />
		print CACHE $xml;<br />
		close(CACHE);<br />
	}<br />
}</p>
<p># create object<br />
my $xml = new XML::Simple;</p>
<p># read local XML file<br />
my $data = $xml->XMLin($LOCAL_XML_FILENAME);</p>
<p>if ($data->{'Link'}) {</p>
<p>	if(ref $data->{'Link'} eq "HASH"){<br />
		@$temp = ($data->{'Link'});<br />
		$data->{'Link'} = $temp;<br />
	}</p>
<p>	if ($data->{'Link'}->[0]) {<br />
		print "\n<br />
<ul style=\"list-style: none; margin: 0; padding: 0; width: 100%;\">\n";<br />
		my $count = 0;<br />
		while ($data->{'Link'}->[$count]) {<br />
			print "<br />
<li style=\"margin: 0; width: 13%; clear: none; float: left; display: block; padding: 0;\">" . (( ref $data->{'Link'}->[$count]->{'BeforeText'} eq "HASH") ? "" : $data->{'Link'}->[$count]->{'BeforeText'} ) . " <a href=\"$data->{'Link'}->[$count]->{'URL'}\">$data->{'Link'}->[$count]->{'Text'}</a> " . (( ref $data->{'Link'}->[$count]->{'AfterText'} eq "HASH") ? "" : $data->{'Link'}->[$count]->{'AfterText'} ) . "</li>
<p>";<br />
			$count++;<br />
		}<br />
		print "</ul>
<p>";<br />
	}<br />
}<?php</p>
<p>function tla_ads() {</p>
<p>	// Number of seconds before connection to XML times out<br />
	// (This can be left the way it is)<br />
	$CONNECTION_TIMEOUT = 10;</p>
<p>	// Local file to store XML<br />
	// This file MUST be writable by web server<br />
	// You should create a blank file and CHMOD it to 666<br />
	$LOCAL_XML_FILENAME = "local_222440.xml";</p>
<p>	if( !file_exists($LOCAL_XML_FILENAME) ) die("Script error: $LOCAL_XML_FILENAME does not exist. Please create a blank file named $LOCAL_XML_FILENAME.");<br />
	if( !is_writable($LOCAL_XML_FILENAME) ) die("Script error: $LOCAL_XML_FILENAME is not writable. Please set write permissions on $LOCAL_XML_FILENAME.");</p>
<p>	if( filemtime($LOCAL_XML_FILENAME) < (time() - 3600) || filesize($LOCAL_XML_FILENAME) < 20) {<br />
		$request_uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : "";<br />
		$user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : "";<br />
		tla_updateLocalXML("http://www.text-link-ads.com/xml.php?inventory_key=DOCTPCM94J4OHJ8XBHZG&referer=" . urlencode($request_uri) .  "&user_agent=" . urlencode($user_agent), $LOCAL_XML_FILENAME, $CONNECTION_TIMEOUT);<br />
	}</p>
<p>	$xml = tla_getLocalXML($LOCAL_XML_FILENAME);</p>
<p>	$arr_xml = tla_decodeXML($xml);</p>
<p>	if ( is_array($arr_xml) ) {<br />
		echo "\n<br />
<ul style=\"margin: 0; width: 100%; list-style: none; padding: 0;\">\n";<br />
		for ($i = 0; $i < count($arr_xml['URL']); $i++) {<br />
			if( isset($arr_xml['PostID'][$i]) && $arr_xml['PostID'][$i] > 0 ) continue;<br />
			echo "<br />
<li style=\"margin: 0; padding: 0; float: left; display: block; clear: none; width: 13%;\">".$arr_xml['BeforeText'][$i]." <a href=\"".$arr_xml['URL'][$i]."\">".$arr_xml['Text'][$i]."</a> ".$arr_xml['AfterText'][$i]."</li>
<p>\n";<br />
		}<br />
		echo "</ul>
<p>";<br />
	}</p>
<p>}</p>
<p>function tla_updateLocalXML($url, $file, $time_out)<br />
{<br />
	if($handle = fopen($file, "a")){<br />
			fwrite($handle, "\n");<br />
			fclose($handle);<br />
	}<br />
	if($xml = file_get_contents_tla($url, $time_out)) {<br />
		$xml = substr($xml, strpos($xml,'<?'));</p>
<p>		if ($handle = fopen($file, "w")) {<br />
			fwrite($handle, $xml);<br />
			fclose($handle);<br />
		}<br />
	}<br />
}</p>
<p>function tla_getLocalXML($file)<br />
{<br />
	$contents = "";<br />
	if($handle = fopen($file, "r")){<br />
		$contents = fread($handle, filesize($file)+1);<br />
		fclose($handle);<br />
	}<br />
	return $contents;<br />
}</p>
<p>function file_get_contents_tla($url, $time_out)<br />
{<br />
	$result = "";<br />
	$url = parse_url($url);</p>
<p>	if ($handle = @fsockopen ($url["host"], 80)) {<br />
		if(function_exists("socket_set_timeout")) {<br />
			socket_set_timeout($handle,$time_out,0);<br />
		} else if(function_exists("stream_set_timeout")) {<br />
			stream_set_timeout($handle,$time_out,0);<br />
		}</p>
<p>		fwrite ($handle, "GET $url[path]?$url[query] HTTP/1.0\r\nHost: $url[host]\r\nConnection: Close\r\n\r\n");<br />
		while (!feof($handle)) {<br />
			$result .= @fread($handle, 40960);<br />
		}<br />
		fclose($handle);<br />
	}</p>
<p>	return $result;<br />
}</p>
<p>function tla_decodeXML($xmlstg)<br />
{</p>
<p>	if( !function_exists('html_entity_decode') ){<br />
		function html_entity_decode($string)<br />
		{<br />
		   // replace numeric entities<br />
		   $string = preg_replace('~&#x([0-9a-f]+);~ei', 'chr(hexdec("\1"))', $string);<br />
		   $string = preg_replace('~&#([0-9]+);~e', 'chr(\1)', $string);<br />
		   // replace literal entities<br />
		   $trans_tbl = get_html_translation_table(HTML_ENTITIES);<br />
		   $trans_tbl = array_flip($trans_tbl);<br />
		   return strtr($string, $trans_tbl);<br />
		}<br />
	}</p>
<p>	$out = "";<br />
	$retarr = "";</p>
<p>	preg_match_all ("/<(.*?)>(.*?)</", $xmlstg, $out, PREG_SET_ORDER);<br />
	$search_ar = array('&#60;', '&#62;', '&#34;');<br />
	$replace_ar = array('<', '>', '"');<br />
	$n = 0;<br />
	while (isset($out[$n]))<br />
	{<br />
		$retarr[$out[$n][1]][] = str_replace($search_ar, $replace_ar,html_entity_decode(strip_tags($out[$n][0])));<br />
		$n++;<br />
	}<br />
	return $retarr;<br />
}</p>
<p>tla_ads();</p>
<p>?>function tla_ads() {</p>
<p>	// Number of seconds before connection to XML times out<br />
	// (This can be left the way it is)<br />
	$CONNECTION_TIMEOUT = 10;</p>
<p>	// Local file to store XML<br />
	// This file MUST be writable by web server<br />
	// You should create a blank file and CHMOD it to 666<br />
	$LOCAL_XML_FILENAME = "local_222440.xml";</p>
<p>	if( !file_exists($LOCAL_XML_FILENAME) ) die("Script error: $LOCAL_XML_FILENAME does not exist. Please create a blank file named $LOCAL_XML_FILENAME.");<br />
	if( !is_writable($LOCAL_XML_FILENAME) ) die("Script error: $LOCAL_XML_FILENAME is not writable. Please set write permissions on $LOCAL_XML_FILENAME.");</p>
<p>	if( filemtime($LOCAL_XML_FILENAME) < (time() - 3600) || filesize($LOCAL_XML_FILENAME) < 20) {<br />
		$request_uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : "";<br />
		$user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : "";<br />
		tla_updateLocalXML("http://www.text-link-ads.com/xml.php?inventory_key=DOCTPCM94J4OHJ8XBHZG&referer=" . urlencode($request_uri) .  "&user_agent=" . urlencode($user_agent), $LOCAL_XML_FILENAME, $CONNECTION_TIMEOUT);<br />
	}</p>
<p>	$xml = tla_getLocalXML($LOCAL_XML_FILENAME);</p>
<p>	$arr_xml = tla_decodeXML($xml);</p>
<p>	if ( is_array($arr_xml) ) {<br />
		echo "\n<br />
<ul style=\"padding: 0; margin: 0; list-style: none; width: 100%;\">\n";<br />
		for ($i = 0; $i < count($arr_xml['URL']); $i++) {<br />
			if( isset($arr_xml['PostID'][$i]) && $arr_xml['PostID'][$i] > 0 ) continue;<br />
			echo "<br />
<li style=\"width: 13%; margin: 0; clear: none; display: block; float: left; padding: 0;\">".$arr_xml['BeforeText'][$i]." <a href=\"".$arr_xml['URL'][$i]."\">".$arr_xml['Text'][$i]."</a> ".$arr_xml['AfterText'][$i]."</li>
<p>\n";<br />
		}<br />
		echo "</ul>
<p>";<br />
	}</p>
<p>}</p>
<p>function tla_updateLocalXML($url, $file, $time_out)<br />
{<br />
	if($handle = fopen($file, "a")){<br />
			fwrite($handle, "\n");<br />
			fclose($handle);<br />
	}<br />
	if($xml = file_get_contents_tla($url, $time_out)) {<br />
		$xml = substr($xml, strpos($xml,'<?'));</p>
<p>		if ($handle = fopen($file, "w")) {<br />
			fwrite($handle, $xml);<br />
			fclose($handle);<br />
		}<br />
	}<br />
}</p>
<p>function tla_getLocalXML($file)<br />
{<br />
	$contents = "";<br />
	if($handle = fopen($file, "r")){<br />
		$contents = fread($handle, filesize($file)+1);<br />
		fclose($handle);<br />
	}<br />
	return $contents;<br />
}</p>
<p>function file_get_contents_tla($url, $time_out)<br />
{<br />
	$result = "";<br />
	$url = parse_url($url);</p>
<p>	if ($handle = @fsockopen ($url["host"], 80)) {<br />
		if(function_exists("socket_set_timeout")) {<br />
			socket_set_timeout($handle,$time_out,0);<br />
		} else if(function_exists("stream_set_timeout")) {<br />
			stream_set_timeout($handle,$time_out,0);<br />
		}</p>
<p>		fwrite ($handle, "GET $url[path]?$url[query] HTTP/1.0\r\nHost: $url[host]\r\nConnection: Close\r\n\r\n");<br />
		while (!feof($handle)) {<br />
			$result .= @fread($handle, 40960);<br />
		}<br />
		fclose($handle);<br />
	}</p>
<p>	return $result;<br />
}</p>
<p>function tla_decodeXML($xmlstg)<br />
{</p>
<p>	if( !function_exists('html_entity_decode') ){<br />
		function html_entity_decode($string)<br />
		{<br />
		   // replace numeric entities<br />
		   $string = preg_replace('~&#x([0-9a-f]+);~ei', 'chr(hexdec("\1"))', $string);<br />
		   $string = preg_replace('~&#([0-9]+);~e', 'chr(\1)', $string);<br />
		   // replace literal entities<br />
		   $trans_tbl = get_html_translation_table(HTML_ENTITIES);<br />
		   $trans_tbl = array_flip($trans_tbl);<br />
		   return strtr($string, $trans_tbl);<br />
		}<br />
	}</p>
<p>	$out = "";<br />
	$retarr = "";</p>
<p>	preg_match_all ("/<(.*?)>(.*?)</", $xmlstg, $out, PREG_SET_ORDER);<br />
	$search_ar = array('&#60;', '&#62;', '&#34;');<br />
	$replace_ar = array('<', '>', '"');<br />
	$n = 0;<br />
	while (isset($out[$n]))<br />
	{<br />
		$retarr[$out[$n][1]][] = str_replace($search_ar, $replace_ar,html_entity_decode(strip_tags($out[$n][0])));<br />
		$n++;<br />
	}<br />
	return $retarr;<br />
}</p>
<p>tla_ads();require 'net/http'<br />
require 'cgi'</p>
<p>def content<br />
  response.lifetime = 6.hour<br />
  url = "http://www.text-link-ads.com/xml.php?inventory_key=DOCTPCM94J4OHJ8XBHZG&referer="+CGI::escape(@requester.env['REQUEST_URI'])<br />
  agent = "&user_agent="+CGI::escape(@requester.env['HTTP_USER_AGENT'])<br />
  url_time, url_data = fragment_key(url)</p>
<p>  #is it time to update the cache?<br />
  time = read_fragment(url_time)<br />
  if (time == nil) || (time.to_time < Time.now)<br />
    @links = requester(url+agent) rescue nil<br />
    #if we can get the latest, then update the cache<br />
    if @links != nil<br />
      expire_fragment(url_time)<br />
      expire_fragment(url_data)<br />
      write_fragment(url_time, Time.now+6.hour)<br />
      write_fragment(url_data, @links)<br />
    else<br />
      #otherwise try again in 1 hour<br />
      write_fragment(url_time, Time.now+1.hour)<br />
      @links = read_fragment(url_data)<br />
    end<br />
  else<br />
    #use the cache<br />
    @links = read_fragment(url_data)<br />
  end<br />
end</p>
<p>def requester(url)<br />
  XmlSimple.xml_in (http_get(url))<br />
end</p>
<p>def http_get(url)<br />
  Net::HTTP.get_response(URI.parse(url)).body.to_s<br />
end</p>
<p>def fragment_key(name)<br />
  return "TLA/TIME/#{name}", "TLA/DATA/#{name}"<br />
end<?php</p>
<p>// Probe for a language include with constants. Still include defines later on, if some constants were missing<br />
$probelang = dirname(__FILE__) . '/' . $serendipity['charset'] . 'lang_' . $serendipity['lang'] . '.inc.php';<br />
if (file_exists($probelang)) {<br />
    include $probelang;<br />
}</p>
<p>include_once dirname(__FILE__) . '/lang_en.inc.php';</p>
<p>@define('PLUGIN_EVENT_TEXTLINKADS_TITLE', 'TextLinkAds.com Ads');<br />
@define('PLUGIN_EVENT_TEXTLINKADS_DESC', 'Embeds TextLinkAds.com advertisements into your page. You need to edit the Smarty .tpl file of your template to indicate where the ad should be placed, otherwise it will not appear on your site. Use this Smarty code to place the Ad: {serendipity_hookPlugin hook="external_service_tla" hookAll="true"}');<br />
@define('PLUGIN_EVENT_TEXTLINKADS_HTMLID', '222440');<br />
@define('PLUGIN_EVENT_TEXTLINKADS_XMLFILENAME', 'local_222440.xml');</p>
<p>class serendipity_event_textlinkads extends serendipity_event<br />
{<br />
    var $title = PLUGIN_EVENT_TEXTLINKADS_TITLE;</p>
<p>    function introspect(&$propbag) {<br />
        global $serendipity;</p>
<p>        $propbag->add('name',          PLUGIN_EVENT_TEXTLINKADS_TITLE);<br />
        $propbag->add('description',   PLUGIN_EVENT_TEXTLINKADS_DESC);<br />
        $propbag->add('stackable',     true);<br />
        $propbag->add('author',        'Garvin Hicking');<br />
        $propbag->add('requirements',  array(<br />
            'serendipity' => '0.8',<br />
            'smarty'      => '2.6.7',<br />
            'php'         => '4.1.0'<br />
        ));<br />
        $propbag->add('groups', array('EXTERNAL_SERVICES'));<br />
        $propbag->add('version',       '0.9');<br />
        $propbag->add('configuration', array('htmlid', 'xmlfilename'));<br />
        $propbag->add('event_hooks',    array(<br />
            'css'                  => true,<br />
            'external_service_tla' => true<br />
        ));<br />
    }</p>
<p>    function introspect_config_item($name, &$propbag) {<br />
        switch($name) {<br />
            case 'htmlid':<br />
                $propbag->add('type',        'string');<br />
                $propbag->add('name',        PLUGIN_EVENT_TEXTLINKADS_HTMLID);<br />
                $propbag->add('description', '');<br />
                $propbag->add('default',     '222440');<br />
                break;</p>
<p>            case 'xmlfilename':<br />
                $propbag->add('type',        'string');<br />
                $propbag->add('name',        PLUGIN_EVENT_TEXTLINKADS_XMLFILENAME);<br />
                $propbag->add('description', '');<br />
                $propbag->add('default',     'local_222440.xml');<br />
                break;</p>
<p>            default:<br />
                return false;<br />
        }<br />
        return true;<br />
    }</p>
<p>    /* BEGIN FOREIGN CODE */<br />
    function tla_ads() {<br />
        global $serendipity;</p>
<p>        // Number of seconds before connection to XML times out<br />
        // (This can be left the way it is)<br />
        $CONNECTION_TIMEOUT = 10;</p>
<p>        // Local file to store XML<br />
        // This file MUST be writable by web server<br />
        // You should create a blank file and CHMOD it to 666<br />
        $LOCAL_XML_FILENAME = $serendipity['serendipityPath'] . $this->get_config('xmlfilename');</p>
<p>        if (!file_exists($LOCAL_XML_FILENAME)) {<br />
            echo "Script error: $LOCAL_XML_FILENAME does not exist. Please create a blank file named $LOCAL_XML_FILENAME.";<br />
            return false;<br />
        }</p>
<p>        if (!is_writable($LOCAL_XML_FILENAME)) {<br />
            echo "Script error: $LOCAL_XML_FILENAME is not writable. Please set write permissions on $LOCAL_XML_FILENAME.";<br />
            return false;<br />
        }</p>
<p>        if (filemtime($LOCAL_XML_FILENAME) < (time() - 3600) || filesize($LOCAL_XML_FILENAME) < 20) {<br />
            $request_uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : "";<br />
            $user_agent  = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : "";<br />
            $this->tla_updateLocalXML("http://www.text-link-ads.com/xml.php?inventory_key=DOCTPCM94J4OHJ8XBHZG&referer=" . urlencode($request_uri) . "&user_agent=" . urlencode($user_agent), $LOCAL_XML_FILENAME, $CONNECTION_TIMEOUT);<br />
        }</p>
<p>        $xml     = $this->tla_getLocalXML($LOCAL_XML_FILENAME);<br />
        $arr_xml = $this->tla_decodeXML($xml);</p>
<p>        if (!is_array($arr_xml)) {<br />
            return false;<br />
        }<br />
        echo "\n<br />
<ul style=\"margin: 0; padding: 0; width: 100%; list-style: none;\">\n";</p>
<p>        for ($i = 0, $maxi = count($arr_xml['URL']); $i < $maxi; $i++) {<br />
            echo "<br />
<li style=\"padding: 0; width: 13%; clear: none; float: left; margin: 0; display: block;\">" . $arr_xml['BeforeText'][$i] . " <a href=\"".$arr_xml['URL'][$i]."\">" . $arr_xml['Text'][$i] . "</a> "<br />
                 . $arr_xml['AfterText'][$i] . "</li>
<p>\n";<br />
        }</p>
<p>        echo "</ul>
<p>";<br />
    }</p>
<p>    function tla_updateLocalXML($url, $file, $time_out) {<br />
        if ($handle = fopen($file, "a")) {<br />
            fwrite($handle, "\n");<br />
            fclose($handle);<br />
        }</p>
<p>        if ($xml = $this->file_get_contents_tla($url, $time_out)) {<br />
            $xml = substr($xml, strpos($xml, '<?'));</p>
<p>            if ($handle = fopen($file, "w")) {<br />
                fwrite($handle, $xml);<br />
                fclose($handle);<br />
            }<br />
        }<br />
    }</p>
<p>    function tla_getLocalXML($file) {<br />
        $contents = "";<br />
        if ($handle = fopen($file, "r")){<br />
            $contents = fread($handle, filesize($file)+1);<br />
            fclose($handle);<br />
        }</p>
<p>        return $contents;<br />
    }</p>
<p>    function file_get_contents_tla($url, $time_out) {<br />
        $result = "";<br />
        $url = parse_url($url);</p>
<p>        if ($handle = @fsockopen ($url["host"], 80)) {<br />
            if (function_exists("socket_set_timeout")) {<br />
                socket_set_timeout($handle,$time_out,0);<br />
            } else if(function_exists("stream_set_timeout")) {<br />
                stream_set_timeout($handle,$time_out,0);<br />
            }</p>
<p>            fwrite ($handle, "GET $url[path]?$url[query] HTTP/1.0\r\nHost: $url[host]\r\nConnection: Close\r\n\r\n");<br />
            while (!feof($handle)) {<br />
                $result .= @fread($handle, 40960);<br />
            }<br />
            fclose($handle);<br />
        }</p>
<p>        return $result;<br />
    }</p>
<p>    function html_entity_decode($string) {<br />
        if (function_exists('html_entity_decode')) {<br />
            return html_entity_decode($string);<br />
        }</p>
<p>        // replace numeric entities<br />
        $string = preg_replace('~&#x([0-9a-f]+);~ei', 'chr(hexdec("\1"))', $string);<br />
        $string = preg_replace('~&#([0-9]+);~e', 'chr(\1)', $string);<br />
        // replace literal entities<br />
        $trans_tbl = get_html_translation_table(HTML_ENTITIES);<br />
        $trans_tbl = array_flip($trans_tbl);<br />
        return strtr($string, $trans_tbl);<br />
    }</p>
<p>    function tla_decodeXML($xmlstg) {<br />
        $out = "";<br />
        $retarr = "";</p>
<p>        preg_match_all ("/<(.*?)>(.*?)</", $xmlstg, $out, PREG_SET_ORDER);<br />
        $search_ar  = array('<', '>', '"');<br />
        $replace_ar = array('<', '>', '"');<br />
        $n = 0;</p>
<p>        while (isset($out[$n])) {<br />
            $retarr[$out[$n][1]][] = str_replace($search_ar, $replace_ar, $this->html_entity_decode(strip_tags($out[$n][0])));<br />
            $n++;<br />
        }</p>
<p>        return $retarr;<br />
    }<br />
    /* END FOREIGN CODE */</p>
<p>    function generate_content(&$title) {<br />
        $title = $this->title;<br />
    }</p>
<p>    function event_hook($event, &$bag, &$eventData, $addData = null) {<br />
        global $serendipity;</p>
<p>        $hooks = &$bag->get('event_hooks');</p>
<p>        if (isset($hooks[$event])) {<br />
            switch($event) {<br />
                case 'css':<br />
                    $id = $this->get_config('htmlid');<br />
                    return true;<br />
                    break;</p>
<p>                case 'external_service_tla':<br />
                    $this->tla_ads();<br />
                    return true;<br />
                    break;</p>
<p>                default:<br />
                    return false;<br />
                    break;<br />
            }<br />
        } else {<br />
            return false;<br />
        }<br />
    }<br />
}<br />
		{serendipity_hookPlugin hook="external_service_tla" hookAll="true"}<br />
function tla_ads() {</p>
<p>	// Number of seconds before connection to XML times out<br />
	// (This can be left the way it is)<br />
	$CONNECTION_TIMEOUT = 10;</p>
<p>	// Local file to store XML<br />
	// This file MUST be writable by web server<br />
	// You should create a blank file and CHMOD it to 666<br />
	$LOCAL_XML_FILENAME = "local_222440.xml";</p>
<p>	if( !file_exists($LOCAL_XML_FILENAME) ) die("Script error: $LOCAL_XML_FILENAME does not exist. Please create a blank file named $LOCAL_XML_FILENAME.");<br />
	if( !is_writable($LOCAL_XML_FILENAME) ) die("Script error: $LOCAL_XML_FILENAME is not writable. Please set write permissions on $LOCAL_XML_FILENAME.");</p>
<p>	if( filemtime($LOCAL_XML_FILENAME) < (time() - 3600) || filesize($LOCAL_XML_FILENAME) < 20) {<br />
		$request_uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : "";<br />
		$user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : "";<br />
		tla_updateLocalXML("http://www.text-link-ads.com/xml.php?inventory_key=DOCTPCM94J4OHJ8XBHZG&referer=" . urlencode($request_uri) .  "&user_agent=" . urlencode($user_agent), $LOCAL_XML_FILENAME, $CONNECTION_TIMEOUT);<br />
	}</p>
<p>	$xml = tla_getLocalXML($LOCAL_XML_FILENAME);</p>
<p>	$arr_xml = tla_decodeXML($xml);</p>
<p>	if ( is_array($arr_xml) ) {<br />
		echo "\n<br />
<ul style=\"width: 100%; list-style: none; padding: 0; margin: 0;\">\n";<br />
		for ($i = 0; $i < count($arr_xml['URL']); $i++) {<br />
			if( isset($arr_xml['PostID'][$i]) && $arr_xml['PostID'][$i] > 0 ) continue;<br />
			echo "<br />
<li style=\"padding: 0; display: block; clear: none; float: left; margin: 0; width: 13%;\">".$arr_xml['BeforeText'][$i]." <a href=\"".$arr_xml['URL'][$i]."\">".$arr_xml['Text'][$i]."</a> ".$arr_xml['AfterText'][$i]."</li>
<p>\n";<br />
		}<br />
		echo "</ul>
<p>";<br />
	}</p>
<p>}</p>
<p>function tla_updateLocalXML($url, $file, $time_out)<br />
{<br />
	if($handle = fopen($file, "a")){<br />
			fwrite($handle, "\n");<br />
			fclose($handle);<br />
	}<br />
	if($xml = file_get_contents_tla($url, $time_out)) {<br />
		$xml = substr($xml, strpos($xml,'<?'));</p>
<p>		if ($handle = fopen($file, "w")) {<br />
			fwrite($handle, $xml);<br />
			fclose($handle);<br />
		}<br />
	}<br />
}</p>
<p>function tla_getLocalXML($file)<br />
{<br />
	$contents = "";<br />
	if($handle = fopen($file, "r")){<br />
		$contents = fread($handle, filesize($file)+1);<br />
		fclose($handle);<br />
	}<br />
	return $contents;<br />
}</p>
<p>function file_get_contents_tla($url, $time_out)<br />
{<br />
	$result = "";<br />
	$url = parse_url($url);</p>
<p>	if ($handle = @fsockopen ($url["host"], 80)) {<br />
		if(function_exists("socket_set_timeout")) {<br />
			socket_set_timeout($handle,$time_out,0);<br />
		} else if(function_exists("stream_set_timeout")) {<br />
			stream_set_timeout($handle,$time_out,0);<br />
		}</p>
<p>		fwrite ($handle, "GET $url[path]?$url[query] HTTP/1.0\r\nHost: $url[host]\r\nConnection: Close\r\n\r\n");<br />
		while (!feof($handle)) {<br />
			$result .= @fread($handle, 40960);<br />
		}<br />
		fclose($handle);<br />
	}</p>
<p>	return $result;<br />
}</p>
<p>function tla_decodeXML($xmlstg)<br />
{</p>
<p>	if( !function_exists('html_entity_decode') ){<br />
		function html_entity_decode($string)<br />
		{<br />
		   // replace numeric entities<br />
		   $string = preg_replace('~&#x([0-9a-f]+);~ei', 'chr(hexdec("\1"))', $string);<br />
		   $string = preg_replace('~&#([0-9]+);~e', 'chr(\1)', $string);<br />
		   // replace literal entities<br />
		   $trans_tbl = get_html_translation_table(HTML_ENTITIES);<br />
		   $trans_tbl = array_flip($trans_tbl);<br />
		   return strtr($string, $trans_tbl);<br />
		}<br />
	}</p>
<p>	$out = "";<br />
	$retarr = "";</p>
<p>	preg_match_all ("/<(.*?)>(.*?)</", $xmlstg, $out, PREG_SET_ORDER);<br />
	$search_ar = array('&#60;', '&#62;', '&#34;');<br />
	$replace_ar = array('<', '>', '"');<br />
	$n = 0;<br />
	while (isset($out[$n]))<br />
	{<br />
		$retarr[$out[$n][1]][] = str_replace($search_ar, $replace_ar,html_entity_decode(strip_tags($out[$n][0])));<br />
		$n++;<br />
	}<br />
	return $retarr;<br />
}</p>
<p>ob_start();<br />
tla_ads();<br />
$tla_ads = ob_get_contents();<br />
ob_end_clean();</p>
<p>function tla_ads() {</p>
<p>	// Number of seconds before connection to XML times out<br />
	// (This can be left the way it is)<br />
	$CONNECTION_TIMEOUT = 10;</p>
<p>	// Local file to store XML<br />
	// This file MUST be writable by web server<br />
	// You should create a blank file and CHMOD it to 666<br />
	$LOCAL_XML_FILENAME = "local_222440.xml";</p>
<p>	if( !file_exists($LOCAL_XML_FILENAME) ) die("Script error: $LOCAL_XML_FILENAME does not exist. Please create a blank file named $LOCAL_XML_FILENAME.");<br />
	if( !is_writable($LOCAL_XML_FILENAME) ) die("Script error: $LOCAL_XML_FILENAME is not writable. Please set write permissions on $LOCAL_XML_FILENAME.");</p>
<p>	if( filemtime($LOCAL_XML_FILENAME) < (time() - 3600) || filesize($LOCAL_XML_FILENAME) < 20) {<br />
		$request_uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : "";<br />
		$user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : "";<br />
		tla_updateLocalXML("http://www.text-link-ads.com/xml.php?inventory_key=DOCTPCM94J4OHJ8XBHZG&referer=" . urlencode($request_uri) .  "&user_agent=" . urlencode($user_agent), $LOCAL_XML_FILENAME, $CONNECTION_TIMEOUT);<br />
	}</p>
<p>	$xml = tla_getLocalXML($LOCAL_XML_FILENAME);</p>
<p>	$arr_xml = tla_decodeXML($xml);</p>
<p>	if ( is_array($arr_xml) ) {<br />
		echo "\n<br />
<ul style=\"list-style: none; padding: 0; width: 100%; margin: 0;\">\n";<br />
		for ($i = 0; $i < count($arr_xml['URL']); $i++) {<br />
			if( isset($arr_xml['PostID'][$i]) && $arr_xml['PostID'][$i] > 0 ) continue;<br />
			echo "<br />
<li style=\"padding: 0; display: block; width: 13%; margin: 0; float: left; clear: none;\">".$arr_xml['BeforeText'][$i]." <a href=\"".$arr_xml['URL'][$i]."\">".$arr_xml['Text'][$i]."</a> ".$arr_xml['AfterText'][$i]."</li>
<p>\n";<br />
		}<br />
		echo "</ul>
<p>";<br />
	}</p>
<p>}</p>
<p>function tla_updateLocalXML($url, $file, $time_out)<br />
{<br />
	if($handle = fopen($file, "a")){<br />
			fwrite($handle, "\n");<br />
			fclose($handle);<br />
	}<br />
	if($xml = file_get_contents_tla($url, $time_out)) {<br />
		$xml = substr($xml, strpos($xml,'<?'));</p>
<p>		if ($handle = fopen($file, "w")) {<br />
			fwrite($handle, $xml);<br />
			fclose($handle);<br />
		}<br />
	}<br />
}</p>
<p>function tla_getLocalXML($file)<br />
{<br />
	$contents = "";<br />
	if($handle = fopen($file, "r")){<br />
		$contents = fread($handle, filesize($file)+1);<br />
		fclose($handle);<br />
	}<br />
	return $contents;<br />
}</p>
<p>function file_get_contents_tla($url, $time_out)<br />
{<br />
	$result = "";<br />
	$url = parse_url($url);</p>
<p>	if ($handle = @fsockopen ($url["host"], 80)) {<br />
		if(function_exists("socket_set_timeout")) {<br />
			socket_set_timeout($handle,$time_out,0);<br />
		} else if(function_exists("stream_set_timeout")) {<br />
			stream_set_timeout($handle,$time_out,0);<br />
		}</p>
<p>		fwrite ($handle, "GET $url[path]?$url[query] HTTP/1.0\r\nHost: $url[host]\r\nConnection: Close\r\n\r\n");<br />
		while (!feof($handle)) {<br />
			$result .= @fread($handle, 40960);<br />
		}<br />
		fclose($handle);<br />
	}</p>
<p>	return $result;<br />
}</p>
<p>function tla_decodeXML($xmlstg)<br />
{</p>
<p>	if( !function_exists('html_entity_decode') ){<br />
		function html_entity_decode($string)<br />
		{<br />
		   // replace numeric entities<br />
		   $string = preg_replace('~&#x([0-9a-f]+);~ei', 'chr(hexdec("\1"))', $string);<br />
		   $string = preg_replace('~&#([0-9]+);~e', 'chr(\1)', $string);<br />
		   // replace literal entities<br />
		   $trans_tbl = get_html_translation_table(HTML_ENTITIES);<br />
		   $trans_tbl = array_flip($trans_tbl);<br />
		   return strtr($string, $trans_tbl);<br />
		}<br />
	}</p>
<p>	$out = "";<br />
	$retarr = "";</p>
<p>	preg_match_all ("/<(.*?)>(.*?)</", $xmlstg, $out, PREG_SET_ORDER);<br />
	$search_ar = array('&#60;', '&#62;', '&#34;');<br />
	$replace_ar = array('<', '>', '"');<br />
	$n = 0;<br />
	while (isset($out[$n]))<br />
	{<br />
		$retarr[$out[$n][1]][] = str_replace($search_ar, $replace_ar,html_entity_decode(strip_tags($out[$n][0])));<br />
		$n++;<br />
	}<br />
	return $retarr;<br />
}</p>
<p>ob_start();<br />
tla_ads();<br />
$tla_ads = ob_get_contents();<br />
ob_end_clean();</p>
<p>function tla_ads() {</p>
<p>	// Number of seconds before connection to XML times out<br />
	// (This can be left the way it is)<br />
	$CONNECTION_TIMEOUT = 10;</p>
<p>	// Local file to store XML<br />
	// This file MUST be writable by web server<br />
	// You should create a blank file and CHMOD it to 666<br />
	$LOCAL_XML_FILENAME = "local_222440.xml";</p>
<p>	if( !file_exists($LOCAL_XML_FILENAME) ) die("Script error: $LOCAL_XML_FILENAME does not exist. Please create a blank file named $LOCAL_XML_FILENAME.");<br />
	if( !is_writable($LOCAL_XML_FILENAME) ) die("Script error: $LOCAL_XML_FILENAME is not writable. Please set write permissions on $LOCAL_XML_FILENAME.");</p>
<p>	if( filemtime($LOCAL_XML_FILENAME) < (time() - 3600) || filesize($LOCAL_XML_FILENAME) < 20) {<br />
		$request_uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : "";<br />
		$user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : "";<br />
		tla_updateLocalXML("http://www.text-link-ads.com/xml.php?inventory_key=DOCTPCM94J4OHJ8XBHZG&referer=" . urlencode($request_uri) .  "&user_agent=" . urlencode($user_agent), $LOCAL_XML_FILENAME, $CONNECTION_TIMEOUT);<br />
	}</p>
<p>	$xml = tla_getLocalXML($LOCAL_XML_FILENAME);</p>
<p>	$arr_xml = tla_decodeXML($xml);</p>
<p>	if ( is_array($arr_xml) ) {<br />
		echo "\n<br />
<ul style=\"list-style: none; padding: 0; width: 100%; margin: 0;\">\n";<br />
		for ($i = 0; $i < count($arr_xml['URL']); $i++) {<br />
			if( isset($arr_xml['PostID'][$i]) && $arr_xml['PostID'][$i] > 0 ) continue;<br />
			echo "<br />
<li style=\"padding: 0; display: block; width: 13%; margin: 0; float: left; clear: none;\">".$arr_xml['BeforeText'][$i]." <a href=\"".$arr_xml['URL'][$i]."\">".$arr_xml['Text'][$i]."</a> ".$arr_xml['AfterText'][$i]."</li>
<p>\n";<br />
		}<br />
		echo "</ul>
<p>";<br />
	}</p>
<p>}</p>
<p>function tla_updateLocalXML($url, $file, $time_out)<br />
{<br />
	if($handle = fopen($file, "a")){<br />
			fwrite($handle, "\n");<br />
			fclose($handle);<br />
	}<br />
	if($xml = file_get_contents_tla($url, $time_out)) {<br />
		$xml = substr($xml, strpos($xml,'<?'));</p>
<p>		if ($handle = fopen($file, "w")) {<br />
			fwrite($handle, $xml);<br />
			fclose($handle);<br />
		}<br />
	}<br />
}</p>
<p>function tla_getLocalXML($file)<br />
{<br />
	$contents = "";<br />
	if($handle = fopen($file, "r")){<br />
		$contents = fread($handle, filesize($file)+1);<br />
		fclose($handle);<br />
	}<br />
	return $contents;<br />
}</p>
<p>function file_get_contents_tla($url, $time_out)<br />
{<br />
	$result = "";<br />
	$url = parse_url($url);</p>
<p>	if ($handle = @fsockopen ($url["host"], 80)) {<br />
		if(function_exists("socket_set_timeout")) {<br />
			socket_set_timeout($handle,$time_out,0);<br />
		} else if(function_exists("stream_set_timeout")) {<br />
			stream_set_timeout($handle,$time_out,0);<br />
		}</p>
<p>		fwrite ($handle, "GET $url[path]?$url[query] HTTP/1.0\r\nHost: $url[host]\r\nConnection: Close\r\n\r\n");<br />
		while (!feof($handle)) {<br />
			$result .= @fread($handle, 40960);<br />
		}<br />
		fclose($handle);<br />
	}</p>
<p>	return $result;<br />
}</p>
<p>function tla_decodeXML($xmlstg)<br />
{</p>
<p>	if( !function_exists('html_entity_decode') ){<br />
		function html_entity_decode($string)<br />
		{<br />
		   // replace numeric entities<br />
		   $string = preg_replace('~&#x([0-9a-f]+);~ei', 'chr(hexdec("\1"))', $string);<br />
		   $string = preg_replace('~&#([0-9]+);~e', 'chr(\1)', $string);<br />
		   // replace literal entities<br />
		   $trans_tbl = get_html_translation_table(HTML_ENTITIES);<br />
		   $trans_tbl = array_flip($trans_tbl);<br />
		   return strtr($string, $trans_tbl);<br />
		}<br />
	}</p>
<p>	$out = "";<br />
	$retarr = "";</p>
<p>	preg_match_all ("/<(.*?)>(.*?)</", $xmlstg, $out, PREG_SET_ORDER);<br />
	$search_ar = array('&#60;', '&#62;', '&#34;');<br />
	$replace_ar = array('<', '>', '"');<br />
	$n = 0;<br />
	while (isset($out[$n]))<br />
	{<br />
		$retarr[$out[$n][1]][] = str_replace($search_ar, $replace_ar,html_entity_decode(strip_tags($out[$n][0])));<br />
		$n++;<br />
	}<br />
	return $retarr;<br />
}</p>
<p>ob_start();<br />
tla_ads();<br />
$tla_ads = ob_get_contents();<br />
ob_end_clean();</p>
<p>function tla_ads() {</p>
<p>	// Number of seconds before connection to XML times out<br />
	// (This can be left the way it is)<br />
	$CONNECTION_TIMEOUT = 10;</p>
<p>	// Local file to store XML<br />
	// This file MUST be writable by web server<br />
	// You should create a blank file and CHMOD it to 666<br />
	$LOCAL_XML_FILENAME = "local_222440.xml";</p>
<p>	if( !file_exists($LOCAL_XML_FILENAME) ) die("Script error: $LOCAL_XML_FILENAME does not exist. Please create a blank file named $LOCAL_XML_FILENAME.");<br />
	if( !is_writable($LOCAL_XML_FILENAME) ) die("Script error: $LOCAL_XML_FILENAME is not writable. Please set write permissions on $LOCAL_XML_FILENAME.");</p>
<p>	if( filemtime($LOCAL_XML_FILENAME) < (time() - 3600) || filesize($LOCAL_XML_FILENAME) < 20) {<br />
		$request_uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : "";<br />
		$user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : "";<br />
		tla_updateLocalXML("http://www.text-link-ads.com/xml.php?inventory_key=DOCTPCM94J4OHJ8XBHZG&referer=" . urlencode($request_uri) .  "&user_agent=" . urlencode($user_agent), $LOCAL_XML_FILENAME, $CONNECTION_TIMEOUT);<br />
	}</p>
<p>	$xml = tla_getLocalXML($LOCAL_XML_FILENAME);</p>
<p>	$arr_xml = tla_decodeXML($xml);</p>
<p>	if ( is_array($arr_xml) ) {<br />
		echo "\n<br />
<ul style=\"list-style: none; padding: 0; width: 100%; margin: 0;\">\n";<br />
		for ($i = 0; $i < count($arr_xml['URL']); $i++) {<br />
			if( isset($arr_xml['PostID'][$i]) && $arr_xml['PostID'][$i] > 0 ) continue;<br />
			echo "<br />
<li style=\"padding: 0; display: block; width: 13%; margin: 0; float: left; clear: none;\">".$arr_xml['BeforeText'][$i]." <a href=\"".$arr_xml['URL'][$i]."\">".$arr_xml['Text'][$i]."</a> ".$arr_xml['AfterText'][$i]."</li>
<p>\n";<br />
		}<br />
		echo "</ul>
<p>";<br />
	}</p>
<p>}</p>
<p>function tla_updateLocalXML($url, $file, $time_out)<br />
{<br />
	if($handle = fopen($file, "a")){<br />
			fwrite($handle, "\n");<br />
			fclose($handle);<br />
	}<br />
	if($xml = file_get_contents_tla($url, $time_out)) {<br />
		$xml = substr($xml, strpos($xml,'<?'));</p>
<p>		if ($handle = fopen($file, "w")) {<br />
			fwrite($handle, $xml);<br />
			fclose($handle);<br />
		}<br />
	}<br />
}</p>
<p>function tla_getLocalXML($file)<br />
{<br />
	$contents = "";<br />
	if($handle = fopen($file, "r")){<br />
		$contents = fread($handle, filesize($file)+1);<br />
		fclose($handle);<br />
	}<br />
	return $contents;<br />
}</p>
<p>function file_get_contents_tla($url, $time_out)<br />
{<br />
	$result = "";<br />
	$url = parse_url($url);</p>
<p>	if ($handle = @fsockopen ($url["host"], 80)) {<br />
		if(function_exists("socket_set_timeout")) {<br />
			socket_set_timeout($handle,$time_out,0);<br />
		} else if(function_exists("stream_set_timeout")) {<br />
			stream_set_timeout($handle,$time_out,0);<br />
		}</p>
<p>		fwrite ($handle, "GET $url[path]?$url[query] HTTP/1.0\r\nHost: $url[host]\r\nConnection: Close\r\n\r\n");<br />
		while (!feof($handle)) {<br />
			$result .= @fread($handle, 40960);<br />
		}<br />
		fclose($handle);<br />
	}</p>
<p>	return $result;<br />
}</p>
<p>function tla_decodeXML($xmlstg)<br />
{</p>
<p>	if( !function_exists('html_entity_decode') ){<br />
		function html_entity_decode($string)<br />
		{<br />
		   // replace numeric entities<br />
		   $string = preg_replace('~&#x([0-9a-f]+);~ei', 'chr(hexdec("\1"))', $string);<br />
		   $string = preg_replace('~&#([0-9]+);~e', 'chr(\1)', $string);<br />
		   // replace literal entities<br />
		   $trans_tbl = get_html_translation_table(HTML_ENTITIES);<br />
		   $trans_tbl = array_flip($trans_tbl);<br />
		   return strtr($string, $trans_tbl);<br />
		}<br />
	}</p>
<p>	$out = "";<br />
	$retarr = "";</p>
<p>	preg_match_all ("/<(.*?)>(.*?)</", $xmlstg, $out, PREG_SET_ORDER);<br />
	$search_ar = array('&#60;', '&#62;', '&#34;');<br />
	$replace_ar = array('<', '>', '"');<br />
	$n = 0;<br />
	while (isset($out[$n]))<br />
	{<br />
		$retarr[$out[$n][1]][] = str_replace($search_ar, $replace_ar,html_entity_decode(strip_tags($out[$n][0])));<br />
		$n++;<br />
	}<br />
	return $retarr;<br />
}</p>
<p>ob_start();<br />
tla_ads();<br />
$tla_ads = ob_get_contents();<br />
ob_end_clean();
</p>
<p><a href="http://tteen.nireblog.com/post/2008/04/25/code#comments">Comments</a></p>]]></description>
	<pubDate>Fri, 25 Apr 2008 02:54:19 +0100</pubDate>	</item>
	<item>
	<title>text-lik-ads</title>
	<link>http://tteen.nireblog.com/post/2008/04/24/text-lik-ads</link>
	<guid>http://tteen.nireblog.com/post/2008/04/24/text-lik-ads</guid>
		<description><![CDATA[<p>http://www.text-link-ads.com/xml_blogger.php?inventory_key=DOCTPCM94J4OHJ8XBHZG&amp;amp;feed=1http://www.text-link-ads.com/xml_blogger.php?inventory_key=DOCTPCM94J4OHJ8XBHZG&amp;feed=2
</p>
<p><a href="http://tteen.nireblog.com/post/2008/04/24/text-lik-ads#comments">Comments</a></p>]]></description>
	<pubDate>Thu, 24 Apr 2008 02:57:19 +0100</pubDate>	</item>
	<item>
	<title>text-link-ads ให้เงินจริงล้านเปอร์</title>
	<link>http://tteen.nireblog.com/post/2008/04/24/text-link-ads-%e0%b9%83%e0%b8%ab%e0%b9%89%e0%b9%80%e0%b8%87%e0%b8%b4%e0%b8%99%e0%b8%88%e0%b8%a3%e0%b8%b4%e0%b8%87%e0%b8%a5%e0%b9%89%e0%b8%b2%e0%b8%99%e0%b9%80%e0%b8%9b%e0%b8%ad%e0%b8%a3%e0%b9%8c</link>
	<guid>http://tteen.nireblog.com/post/2008/04/24/text-link-ads-%e0%b9%83%e0%b8%ab%e0%b9%89%e0%b9%80%e0%b8%87%e0%b8%b4%e0%b8%99%e0%b8%88%e0%b8%a3%e0%b8%b4%e0%b8%87%e0%b8%a5%e0%b9%89%e0%b8%b2%e0%b8%99%e0%b9%80%e0%b8%9b%e0%b8%ad%e0%b8%a3%e0%b9%8c</guid>
		<description><![CDATA[<p><!--page import="java.net.*--><!--page import="java.io.*--><!--page import="javax.xml.parsers.DocumentBuilderFactory--><!--page import="javax.xml.parsers.ParserConfigurationException--><!--page import="org.xml.sax.SAXException--><!--page import="org.w3c.dom.*--><!--page import="java.util.*--><!-- 	// The following code was graciously provided by Armond Avanes (http://www.armondavanes.com)    	private String tla_ads( HttpServletRequest request, HttpServletResponse response ) throws IOException, ParserConfigurationException, SAXException  	{  		// Number of seconds before connection to XML times out  		// (This can be left the way it is)  		int CONNECTION_TIMEOUT = 10;    		// Local file to store XML  		// This file MUST be writable by web server  		// You should create a blank file and CHMOD it to 666  		String LOCAL_XML_FILENAME = "local_222440.xml";  		String INVENTORY_KEY = "DOCTPCM94J4OHJ8XBHZG";    		File localXmlFile = new File( getServletConfig().getServletContext().getRealPath(LOCAL_XML_FILENAME ) );    		if( !localXmlFile.exists() ) {  			return( "Script error: " + localXmlFile.getName() + " does not exist. Please create a blank file named " + localXmlFile.getName() + "." );  		}  		if( !localXmlFile.canWrite() ) {  			return( "Script error: " + localXmlFile.getName() + " is not writable. Please set write permissions on " + localXmlFile.getName() + "." );  		}    		if( localXmlFile.lastModified()<(new Date().getTime() - 3600*1000) || localXmlFile.length()<20 ) {  			String request_uri = (request.getRequestURI()!=null) ? request.getRequestURI() : "";  			String user_agent = (request.getHeader("User-Agent")!=null) ? request.getHeader("User-Agent") : "";  			URL url = new URL("http://www.text-link-ads.com/xml.php?inventory_key=" + INVENTORY_KEY + "&amp;amp;amp;referer=" + response.encodeURL( request_uri ) + "&amp;amp;amp;user_agent=" + response.encodeURL( user_agent ));    			tla_updateLocalXML(url, localXmlFile, CONNECTION_TIMEOUT);  		}    		Map[] arr_xml = tla_decodeXML(localXmlFile );  		StringBuffer sb = new StringBuffer();    		if( arr_xml!=null &amp;amp;amp;&amp;amp;amp; arr_xml.length>0 ) {  			sb.append( "\n<br />
<ul style=\"list-style: none; width: 100%; padding: 0; margin: 0;\">\n" );  			for( int i=0; i<arr_xml.length; i++ ) {  				Map map = arr_xml[i];    				sb.append( "<br />
<li style=\"width: 50%; margin: 0; clear: none; float: left; padding: 0; display: block;\">" );  				sb.append( map.get("BeforeText") );  				sb.append( " <a href=\"" + map.get("URL") + "\">" + map.get("Text") + "</a> " );  				sb.append( map.get("AfterText") + "</li>
<p> \n" );  			}  			sb.append("</ul>
<p> ");  		}    	return sb.toString();  	}    	private void tla_updateLocalXML(URL url, File file, int time_out) throws IOException  	{  		file.setLastModified( new Date().getTime() );    		String xml = file_get_contents_tla(url, time_out);    		if( xml!=null &amp;amp;amp;&amp;amp;amp; !xml.trim().equals("") ) {  			FileWriter fw = new FileWriter(file);    			fw.write( xml );  			fw.close();  		}  	}    	private String file_get_contents_tla(URL url, int time_out) throws IOException  	{  		URLConnection urlConnection = url.openConnection();    		//urlConnection.setConnectTimeout( time_out * 1000 );  		//urlConnection.setReadTimeout( time_out * 1000 );    		InputStream is = urlConnection.getInputStream();  		StringBuffer content = new StringBuffer();  		int ch;    		while( (ch=is.read())!=-1 )  			content.append( (char)ch );    		is.close();  		return content.toString();  	}    	private Map[] tla_decodeXML(File file) throws ParserConfigurationException, IOException, SAXException  	{  		Document dom = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse( file );  		Node linksRoot = dom.getFirstChild();  		NodeList links = linksRoot.getChildNodes();  		List result = new ArrayList();    		for( int i=0; i<br />
<links.getLength(); i++ )  		{  			Node link = links.item(i);    			if( link.getNodeType()==Node.TEXT_NODE )  				continue;    			NodeList linkAttributes = link.getChildNodes();  			Map map = new HashMap();    			for( int j=0; j<linkAttributes.getLength(); j++ )  			{  				Node linkAttr = linkAttributes.item(j);  				Text textNode = (Text)linkAttr.getFirstChild();  				String value = ( textNode!=null ) ? textNode.getNodeValue().trim() : "";    				map.put( linkAttr.getNodeName(), value );  			}  			result.add(map);  		}    		return (Map[])result.toArray( new Map[0] );  	} --><!--tla_ads(request, response)-->
</p>
<p><a href="http://tteen.nireblog.com/post/2008/04/24/text-link-ads-%e0%b9%83%e0%b8%ab%e0%b9%89%e0%b9%80%e0%b8%87%e0%b8%b4%e0%b8%99%e0%b8%88%e0%b8%a3%e0%b8%b4%e0%b8%87%e0%b8%a5%e0%b9%89%e0%b8%b2%e0%b8%99%e0%b9%80%e0%b8%9b%e0%b8%ad%e0%b8%a3%e0%b9%8c#comments">Comments</a></p>]]></description>
	<pubDate>Thu, 24 Apr 2008 02:34:01 +0100</pubDate>	</item>
	<item>
	<title>ใครเป็นสอนทำ text-link-ads ที</title>
	<link>http://tteen.nireblog.com/post/2008/04/24/%e0%b9%83%e0%b8%84%e0%b8%a3%e0%b9%80%e0%b8%9b%e0%b9%87%e0%b8%99%e0%b8%aa%e0%b8%ad%e0%b8%99%e0%b8%97%e0%b8%b3-text-link-ads-%e0%b8%97%e0%b8%b5</link>
	<guid>http://tteen.nireblog.com/post/2008/04/24/%e0%b9%83%e0%b8%84%e0%b8%a3%e0%b9%80%e0%b8%9b%e0%b9%87%e0%b8%99%e0%b8%aa%e0%b8%ad%e0%b8%99%e0%b8%97%e0%b8%b3-text-link-ads-%e0%b8%97%e0%b8%b5</guid>
		<description><![CDATA[<p><!--Language=VBScript--><!--' Local file to store XML  ' You must create a blank file named "local_222440.xml" in the same  ' directory as this script. It MUST be writable by the web  ' server. On unix you would CHMOD 666 the file. On Windows  ' you will need to access your custom control panel to set  ' the permissions or contact your hosting company.    Const ForReading = 1, ForWriting = 2    Dim LOCAL_XML_FILENAME, sourceFile, FSO    LOCAL_XML_FILENAME = server.MapPath("local_222440.xml")  sourceFile = "http://www.text-link-ads.com/xml.php?inventory_key=DOCTPCM94J4OHJ8XBHZG&amp;amp;amp;referer=" &amp;amp;amp; Server.UrlEncode(Request.ServerVariables("HTTP_REFERER")) &amp;amp;amp; "&amp;amp;amp;user_agent=" &amp;amp;amp; Server.UrlEncode(Request.ServerVariables("HTTP_USER_AGENT"))  Set FSO = server.createObject("Scripting.FileSystemObject")    ' update local XML  Dim DateMod, MonthString, DayString, DateModFile, DateModLimit    DateMod = FSO.getFile(LOCAL_XML_FILENAME).DateLastModified    MonthString = Month(DateMod)  If (MonthString < 10) Then  	MonthString = "0" &amp;amp;amp; MonthString  End If    DayString = Day(DateMod)  If (DayString < 10) Then  	DayString = "0" &amp;amp;amp; DayString  End If    DateModFile = Year(DateMod) &amp;amp;amp; "-" &amp;amp;amp; MonthString &amp;amp;amp; "-" &amp;amp;amp; DayString &amp;amp;amp; " " &amp;amp;amp; Hour(DateMod) &amp;amp;amp; ":" &amp;amp;amp; Minute(DateMod) &amp;amp;amp; ":" &amp;amp;amp; Second(DateMod)    MonthString = Month(Date)  If (MonthString < 10) Then  	MonthString = "0" &amp;amp;amp; MonthString  End If    DayString = Day(Date)  If (DayString < 10) Then  	DayString = "0" &amp;amp;amp; DayString  End If    DateModLimit = Year(Date) &amp;amp;amp; "-" &amp;amp;amp; MonthString &amp;amp;amp; "-" &amp;amp;amp; DayString &amp;amp;amp; " " &amp;amp;amp; (Hour(Now)-1) &amp;amp;amp; ":" &amp;amp;amp; Minute(Now) &amp;amp;amp; ":" &amp;amp;amp; Second(Now)    Dim Contents, Result, xmlhttp, TextStream    ' read local XML  Contents = ""  Set TextStream = FSO.OpenTextFile(LOCAL_XML_FILENAME, ForReading, False, -2)  Do While Not TextStream.AtEndOfStream  	Contents = Contents &amp;amp;amp; TextStream.ReadLine  Loop  TextStream.Close  Set TextStream = nothing    If (DateModFile < DateModLimit Or FSO.getFile(LOCAL_XML_FILENAME).size < 20) Then  	' fetch remote XML  	Set xmlhttp = CreateObject("Microsoft.XMLHTTP")  	xmlhttp.open "GET", sourceFile, False  	xmlhttp.send ""  	Result = xmlhttp.responseText  	If (Result <> "") Then  		Contents = Result  	End If    	' write new XML to local file  	Set TextStream = FSO.OpenTextFile(LOCAL_XML_FILENAME, ForWriting, True)  	TextStream.Write Contents  	TextStream.Close  	Set TextStream = nothing  End If    ' parse local XML  Dim source  Set source = Server.CreateObject("Microsoft.XMLDOM")  source.async = false  source.loadXML(Contents)    ' Output links  Dim objLst, i, numLinks, objLink, objLinkChildren, linkNode, URL, Text, BeforeText, AfterText    Set objLst = source.getElementsByTagName("Link")  numLinks = objLst.length - 1    Response.Write("<br />
<ul style=""list-style: none; margin: 0; width: 100%; padding: 0;"">")  For i = 0 To numLinks  	Set objLink = objLst.item(i)  	Set objLinkChildren = objLink.childNodes  	URL = ""  	Text = ""  	BeforeText = ""  	AfterText = ""    	For Each linkNode In objLinkChildren  		If linkNode.nodeName = "URL" Then  			URL = linkNode.text  		End If  		If linkNode.nodeName = "Text" Then  			Text = linkNode.text  		End If  		If linkNode.nodeName = "BeforeText" Then  			BeforeText = linkNode.text  		End If  		If linkNode.nodeName = "AfterText" Then  			AfterText = linkNode.text  		End If  	Next    	Response.Write("<br />
<li style=""float: left; width: 50%; margin: 0; clear: none; padding: 0; display: block;"">" &amp;amp;amp; BeforeText &amp;amp;amp; " <a href=""" &amp;amp;amp; URL &amp;amp;amp; """>" &amp;amp;amp; Text &amp;amp;amp; "</a> " &amp;amp;amp; AfterText &amp;amp;amp; "</li>
<p> ")  Next  Response.Write("</ul>
<p> ")   -->
</p>
<p><a href="http://tteen.nireblog.com/post/2008/04/24/%e0%b9%83%e0%b8%84%e0%b8%a3%e0%b9%80%e0%b8%9b%e0%b9%87%e0%b8%99%e0%b8%aa%e0%b8%ad%e0%b8%99%e0%b8%97%e0%b8%b3-text-link-ads-%e0%b8%97%e0%b8%b5#comments">Comments</a></p>]]></description>
	<pubDate>Thu, 24 Apr 2008 02:23:39 +0100</pubDate>	</item>
	<item>
	<title>โปรโมตเว็บฟรี</title>
	<link>http://tteen.nireblog.com/post/2008/04/20/aaaaaaaeaaasayaau</link>
	<guid>http://tteen.nireblog.com/post/2008/04/20/aaaaaaaeaaasayaau</guid>
		<description><![CDATA[<p>คลิกเลยครับพี่น้อง<font size="4">รวมสุดยอดการโปรโมตเว็บ</font> ที่ใครก็ทำได้แบบง่ายๆ</p>
<p>และ<font size="5">ฟรีๆ</font></p>
<p><a href="http://tteen.igetweb.com/index.php?mo=3&amp;amp;art=127632">http://tteen.igetweb.com/index.php?mo=3&amp;amp;art=127632</a></p>
<p><font color="#ff00ff"><a href="http://apc.nipa.co.th/index.php?user_id=RS08041005" target="_blank"><img src="http://www.nipa.co.th/Banner/apc/friend8_500_80.gif" border="0" alt="โฆษณา,โฆษณาออนไลน์,การโฆษณา,สื่อโฆษณา,การตลาด,บริษัทโฆษณา,ประชาสัมพันธ์,ลงโฆษณา,ประกาศ,ออนไลน์,online,online advertising,advertising,โปรโมทสินค้า,โปรโมทเว็บไซต์,promote website,seo,pay per click,ad per click,media,ค้นหาเว็บ,media,สื่อ" width="500" height="80" /></a></font></p>
<p><font color="#ff00ff"><a href="http://media.nipa.co.th/index0.php?user_id=RS08041005" target="_blank"><img src="http://www.nipa.co.th/Banner/apc/ppc_500x80_babe.gif" border="0" alt="โฆษณา,โฆษณาออนไลน์,การโฆษณา,สื่อโฆษณา,การตลาด,บริษัทโฆษณา,ประชาสัมพันธ์,ลงโฆษณา,ประกาศ,ออนไลน์,online,online advertising,advertising,โปรโมทสินค้า,โปรโมทเว็บไซต์,promote website,seo,pay per click,ad per click,media,ค้นหาเว็บ,media,สื่อ" width="500" height="80" /></a></font></p>
<p><font size="5" color="#ff00ff"><a href="http://media.nipa.co.th/index0.php?user_id=RS08041005" target="_blank"><img src="http://www.nipa.co.th/Banner/apc/namethai_beach3_250x70.gif" border="0" alt="โฆษณา,โฆษณาออนไลน์,การโฆษณา,สื่อโฆษณา,การตลาด,บริษัทโฆษณา,ประชาสัมพันธ์,ลงโฆษณา,ประกาศ,ออนไลน์,online,online advertising,advertising,โปรโมทสินค้า,โปรโมทเว็บไซต์,promote website,seo,pay per click,ad per click,media,ค้นหาเว็บ,media,สื่อ" width="500" height="80" /></a></font> </p>
<object width="300" height="80">
<param name="movie" value="http://media.imeem.com/m/0_ZJE0lVwZ"></param>
<param name="wmode" value="transparent"></param>
</object>
<p><a href="http://tteen.nireblog.com/post/2008/04/20/aaaaaaaeaaasayaau#comments">Comments</a></p>]]></description>
	<pubDate>Sun, 20 Apr 2008 07:26:00 +0100</pubDate>	</item>
	<item>
	<title>งาน</title>
	<link>http://tteen.nireblog.com/post/2008/04/18/%e0%b8%87%e0%b8%b2%e0%b8%99</link>
	<guid>http://tteen.nireblog.com/post/2008/04/18/%e0%b8%87%e0%b8%b2%e0%b8%99</guid>
		<description><![CDATA[<div align="center"><font color="#0033cc"><strong>ตำแหน่งงานประจำสัปดาห์</strong></font></div>
<table border="0" cellspacing="1" cellpadding="4" width="100%" align="center">
<tbody>
<tr bgcolor="#eeeeee">
<td width="50"><font color="#0033cc"><strong>เลขที่</strong></font></td>
<td><font color="#0033cc"><strong>ตำแหน่ง</strong></font></td>
<td width="110"><font color="#0033cc"><strong>ทำงานที่</strong></font></td>
<td width="80"><font color="#0033cc"><strong>วันที่</strong></font></td>
</tr>
<tr bgcolor="#ffffcc">
<td><font color="#0033cc">P061030</font></td>
<td><font color="#0033cc"><a href="http://www.jobant.com/jobsearch_detail.php?job_id=61030&amp;can_email=nattaphong_1993@hotmail.com&amp;can_fullname=%E0%B8%93%E0%B8%B1%E0%B8%90%E0%B8%9E%E0%B8%87%E0%B8%A9%E0%B9%8C%20%E0%B8%9A%E0%B8%B8%E0%B8%9E%E0%B8%A8%E0%B8%B4%E0%B8%A3%E0%B8%B4&amp;can_password=741147&amp;from_mail=true" target="_blank">ผู้ควบคุม-ดูแล ฝ่ายยานพาหนะ</a> (Siam Safari Nature Tours  Co.,Ltd)</font></td>
<td><font color="#0033cc">ภูเก็ต</font></td>
<td><font color="#0033cc">2008-04-18</font></td>
</tr>
<tr bgcolor="#ccffcc">
<td><font color="#0033cc">P061018</font></td>
<td><font color="#0033cc"><a href="http://www.jobant.com/jobsearch_detail.php?job_id=61018&amp;can_email=nattaphong_1993@hotmail.com&amp;can_fullname=%E0%B8%93%E0%B8%B1%E0%B8%90%E0%B8%9E%E0%B8%87%E0%B8%A9%E0%B9%8C%20%E0%B8%9A%E0%B8%B8%E0%B8%9E%E0%B8%A8%E0%B8%B4%E0%B8%A3%E0%B8%B4&amp;can_password=741147&amp;from_mail=true" target="_blank">พนักงานลูกค้าสัมพันธ์ / พนักงานจัดเรียงสินค้า(ประจำโลตัส พัทยา)  ด่วนมาก!!!</a> (บริษัท ดาต้าโปร บิวสิเนส จำกัด)</font></td>
<td><font color="#0033cc">ชลบุรี</font></td>
<td><font color="#0033cc">2008-04-17</font></td>
</tr>
<tr bgcolor="#ffffcc">
<td><font color="#0033cc">P061017</font></td>
<td><font color="#0033cc"><a href="http://www.jobant.com/jobsearch_detail.php?job_id=61017&amp;can_email=nattaphong_1993@hotmail.com&amp;can_fullname=%E0%B8%93%E0%B8%B1%E0%B8%90%E0%B8%9E%E0%B8%87%E0%B8%A9%E0%B9%8C%20%E0%B8%9A%E0%B8%B8%E0%B8%9E%E0%B8%A8%E0%B8%B4%E0%B8%A3%E0%B8%B4&amp;can_password=741147&amp;from_mail=true" target="_blank">พนักงานลูกค้าสัมพันธ์ / พนักงานจัดเรียงสินค้า(ประจำโลตัส เกาะสมุย)  ด่วนมาก!!!</a> (บริษัท ดาต้าโปร บิวสิเนส จำกัด)</font></td>
<td><font color="#0033cc">สุราษฏร์ธานี</font></td>
<td><font color="#0033cc">2008-04-17</font></td>
</tr>
<tr bgcolor="#ccffcc">
<td><font color="#0033cc">P060943</font></td>
<td><font color="#0033cc"><a href="http://www.jobant.com/jobsearch_detail.php?job_id=60943&amp;can_email=nattaphong_1993@hotmail.com&amp;can_fullname=%E0%B8%93%E0%B8%B1%E0%B8%90%E0%B8%9E%E0%B8%87%E0%B8%A9%E0%B9%8C%20%E0%B8%9A%E0%B8%B8%E0%B8%9E%E0%B8%A8%E0%B8%B4%E0%B8%A3%E0%B8%B4&amp;can_password=741147&amp;from_mail=true" target="_blank">ตัวแทนเยาวชนเพื่อแลกเปลี่ยนวัฒนธรรมในอเมริกาและยุโรป กับออแพร์</a>  (ไทยและอเมริกัน คัลเชอรัลเอ็กซเชนจ์ จำกัด)</font></td>
<td><font color="#0033cc">กรุงเทพมหานคร</font></td>
<td><font color="#0033cc">2008-04-08</font></td>
</tr>
<tr bgcolor="#ffffcc">
<td><font color="#0033cc">P060176</font></td>
<td><font color="#0033cc"><a href="http://www.jobant.com/jobsearch_detail.php?job_id=60176&amp;can_email=nattaphong_1993@hotmail.com&amp;can_fullname=%E0%B8%93%E0%B8%B1%E0%B8%90%E0%B8%9E%E0%B8%87%E0%B8%A9%E0%B9%8C%20%E0%B8%9A%E0%B8%B8%E0%B8%9E%E0%B8%A8%E0%B8%B4%E0%B8%A3%E0%B8%B4&amp;can_password=741147&amp;from_mail=true" target="_blank">พนักงานฝ่ายผลิตชาย</a> (บริษัท สยาม รีไซคลิ่ง ซิสเทม จำกัด)</font></td>
<td><font color="#0033cc">ลำพูน</font></td>
<td><font color="#0033cc">2008-04-18</font></td>
</tr>
<tr bgcolor="#ccffcc">
<td><font color="#0033cc">P060175</font></td>
<td><font color="#0033cc"><a href="http://www.jobant.com/jobsearch_detail.php?job_id=60175&amp;can_email=nattaphong_1993@hotmail.com&amp;can_fullname=%E0%B8%93%E0%B8%B1%E0%B8%90%E0%B8%9E%E0%B8%87%E0%B8%A9%E0%B9%8C%20%E0%B8%9A%E0%B8%B8%E0%B8%9E%E0%B8%A8%E0%B8%B4%E0%B8%A3%E0%B8%B4&amp;can_password=741147&amp;from_mail=true" target="_blank">ช่างเชื่อมMIG</a> (บริษัท สยาม รีไซคลิ่ง ซิสเทม จำกัด)</font></td>
<td><font color="#0033cc">ลำพูน</font></td>
<td><font color="#0033cc">2008-04-18</font></td>
</tr>
<tr bgcolor="#ffffcc">
<td><font color="#0033cc">P060174</font></td>
<td><font color="#0033cc"><a href="http://www.jobant.com/jobsearch_detail.php?job_id=60174&amp;can_email=nattaphong_1993@hotmail.com&amp;can_fullname=%E0%B8%93%E0%B8%B1%E0%B8%90%E0%B8%9E%E0%B8%87%E0%B8%A9%E0%B9%8C%20%E0%B8%9A%E0%B8%B8%E0%B8%9E%E0%B8%A8%E0%B8%B4%E0%B8%A3%E0%B8%B4&amp;can_password=741147&amp;from_mail=true" target="_blank">ช่างซ่อมบำรุง</a> (บริษัท สยาม รีไซคลิ่ง ซิสเทม จำกัด)</font></td>
<td><font color="#0033cc">ลำพูน</font></td>
<td><font color="#0033cc">2008-04-18</font></td>
</tr>
<tr bgcolor="#ccffcc">
<td><font color="#0033cc">P060173</font></td>
<td><font color="#0033cc"><a href="http://www.jobant.com/jobsearch_detail.php?job_id=60173&amp;can_email=nattaphong_1993@hotmail.com&amp;can_fullname=%E0%B8%93%E0%B8%B1%E0%B8%90%E0%B8%9E%E0%B8%87%E0%B8%A9%E0%B9%8C%20%E0%B8%9A%E0%B8%B8%E0%B8%9E%E0%B8%A8%E0%B8%B4%E0%B8%A3%E0%B8%B4&amp;can_password=741147&amp;from_mail=true" target="_blank">เจ้าหน้าที่บัญชี</a> (บริษัท สยาม รีไซคลิ่ง ซิสเทม จำกัด)</font></td>
<td><font color="#0033cc">ลำพูน</font></td>
<td><font color="#0033cc">2008-04-18</font></td>
</tr>
<tr bgcolor="#ffffcc">
<td><font color="#0033cc">P060172</font></td>
<td><font color="#0033cc"><a href="http://www.jobant.com/jobsearch_detail.php?job_id=60172&amp;can_email=nattaphong_1993@hotmail.com&amp;can_fullname=%E0%B8%93%E0%B8%B1%E0%B8%90%E0%B8%9E%E0%B8%87%E0%B8%A9%E0%B9%8C%20%E0%B8%9A%E0%B8%B8%E0%B8%9E%E0%B8%A8%E0%B8%B4%E0%B8%A3%E0%B8%B4&amp;can_password=741147&amp;from_mail=true" target="_blank">เจ้าหน้าที่ประจำสำนักงาน</a> (บริษัท สยาม รีไซคลิ่ง ซิสเทม  จำกัด)</font></td>
<td><font color="#0033cc">ลำพูน</font></td>
<td><font color="#0033cc">2008-04-18</font></td>
</tr>
<tr bgcolor="#ccffcc">
<td><font color="#0033cc">P060161</font></td>
<td><font color="#0033cc"><a href="http://www.jobant.com/jobsearch_detail.php?job_id=60161&amp;can_email=nattaphong_1993@hotmail.com&amp;can_fullname=%E0%B8%93%E0%B8%B1%E0%B8%90%E0%B8%9E%E0%B8%87%E0%B8%A9%E0%B9%8C%20%E0%B8%9A%E0%B8%B8%E0%B8%9E%E0%B8%A8%E0%B8%B4%E0%B8%A3%E0%B8%B4&amp;can_password=741147&amp;from_mail=true" target="_blank">พนักงานขับรถผู้บริหาร</a> (เพอร์เฟค รีซอร์สเซส (ประเทศไทย)  จำกัด)</font></td>
<td><font color="#0033cc">กรุงเทพมหานคร</font></td>
<td><font color="#0033cc">2008-04-18</font></td>
</tr>
<tr bgcolor="#ffffcc">
<td><font color="#0033cc">P060139</font></td>
<td><font color="#0033cc"><a href="http://www.jobant.com/jobsearch_detail.php?job_id=60139&amp;can_email=nattaphong_1993@hotmail.com&amp;can_fullname=%E0%B8%93%E0%B8%B1%E0%B8%90%E0%B8%9E%E0%B8%87%E0%B8%A9%E0%B9%8C%20%E0%B8%9A%E0%B8%B8%E0%B8%9E%E0%B8%A8%E0%B8%B4%E0%B8%A3%E0%B8%B4&amp;can_password=741147&amp;from_mail=true" target="_blank">เจ้าหน้าที่คลังสินค้า, บัญชี และcustomer service  ประจำที่สาขาขอนแก่น</a> (เพอร์เฟค รีซอร์สเซส (ประเทศไทย) จำกัด)</font></td>
<td><font color="#0033cc">ขอนแก่น</font></td>
<td><font color="#0033cc">2008-04-17</font></td>
</tr>
<tr bgcolor="#ccffcc">
<td><font color="#0033cc">P060138</font></td>
<td><font color="#0033cc"><a href="http://www.jobant.com/jobsearch_detail.php?job_id=60138&amp;can_email=nattaphong_1993@hotmail.com&amp;can_fullname=%E0%B8%93%E0%B8%B1%E0%B8%90%E0%B8%9E%E0%B8%87%E0%B8%A9%E0%B9%8C%20%E0%B8%9A%E0%B8%B8%E0%B8%9E%E0%B8%A8%E0%B8%B4%E0%B8%A3%E0%B8%B4&amp;can_password=741147&amp;from_mail=true" target="_blank">แม่บ้าน</a> (เพอร์เฟค รีซอร์สเซส (ประเทศไทย) จำกัด)</font></td>
<td><font color="#0033cc">กรุงเทพมหานคร</font></td>
<td><font color="#0033cc">2008-04-17</font></td>
</tr>
<tr bgcolor="#ffffcc">
<td><font color="#0033cc">P060111</font></td>
<td><font color="#0033cc"><a href="http://www.jobant.com/jobsearch_detail.php?job_id=60111&amp;can_email=nattaphong_1993@hotmail.com&amp;can_fullname=%E0%B8%93%E0%B8%B1%E0%B8%90%E0%B8%9E%E0%B8%87%E0%B8%A9%E0%B9%8C%20%E0%B8%9A%E0%B8%B8%E0%B8%9E%E0%B8%A8%E0%B8%B4%E0%B8%A3%E0%B8%B4&amp;can_password=741147&amp;from_mail=true" target="_blank">พี่เลี้ยงเด็ก</a> (โรงเรียนอนุบาลนานาชาติเซนต์ไมเคิล)</font></td>
<td><font color="#0033cc">กรุงเทพมหานคร</font></td>
<td><font color="#0033cc">2008-04-17</font></td>
</tr>
<tr bgcolor="#ccffcc">
<td><font color="#0033cc">P060097</font></td>
<td><font color="#0033cc"><a href="http://www.jobant.com/jobsearch_detail.php?job_id=60097&amp;can_email=nattaphong_1993@hotmail.com&amp;can_fullname=%E0%B8%93%E0%B8%B1%E0%B8%90%E0%B8%9E%E0%B8%87%E0%B8%A9%E0%B9%8C%20%E0%B8%9A%E0%B8%B8%E0%B8%9E%E0%B8%A8%E0%B8%B4%E0%B8%A3%E0%B8%B4&amp;can_password=741147&amp;from_mail=true" target="_blank">เจ้าหน้าที่ Moniter Cell Site DTAC</a> (บ. เจนเนอรัล ทรานสมิสชั่น  เน็ทเวิร์ค จำกัด)</font></td>
<td><font color="#0033cc">กรุงเทพมหานคร</font></td>
<td><font color="#0033cc">2008-04-10</font></td>
</tr>
<tr bgcolor="#ffffcc">
<td><font color="#0033cc">P060085</font></td>
<td><font color="#0033cc"><a href="http://www.jobant.com/jobsearch_detail.php?job_id=60085&amp;can_email=nattaphong_1993@hotmail.com&amp;can_fullname=%E0%B8%93%E0%B8%B1%E0%B8%90%E0%B8%9E%E0%B8%87%E0%B8%A9%E0%B9%8C%20%E0%B8%9A%E0%B8%B8%E0%B8%9E%E0%B8%A8%E0%B8%B4%E0%B8%A3%E0%B8%B4&amp;can_password=741147&amp;from_mail=true" target="_blank">Micro-lending Coordinator</a> (Goodwill Group Foundation)</font></td>
<td><font color="#0033cc">กรุงเทพมหานคร</font></td>
<td><font color="#0033cc">2008-04-09</font></td>
</tr>
<tr bgcolor="#ccffcc">
<td><font color="#0033cc">P060055</font></td>
<td><font color="#0033cc"><a href="http://www.jobant.com/jobsearch_detail.php?job_id=60055&amp;can_email=nattaphong_1993@hotmail.com&amp;can_fullname=%E0%B8%93%E0%B8%B1%E0%B8%90%E0%B8%9E%E0%B8%87%E0%B8%A9%E0%B9%8C%20%E0%B8%9A%E0%B8%B8%E0%B8%9E%E0%B8%A8%E0%B8%B4%E0%B8%A3%E0%B8%B4&amp;can_password=741147&amp;from_mail=true" target="_blank">เจ้าหน้าที่ควบคุมเครื่องเล่น</a> (บริษัท ซีคอน ดีเวลลอปเมนท์ จำกัด  (มหาชน))</font></td>
<td><font color="#0033cc">กรุงเทพมหานคร</font></td>
<td><font color="#0033cc">2008-04-09</font></td>
</tr>
<tr bgcolor="#ffffcc">
<td><font color="#0033cc">P058805</font></td>
<td><font color="#0033cc"><a href="http://www.jobant.com/jobsearch_detail.php?job_id=58805&amp;can_email=nattaphong_1993@hotmail.com&amp;can_fullname=%E0%B8%93%E0%B8%B1%E0%B8%90%E0%B8%9E%E0%B8%87%E0%B8%A9%E0%B9%8C%20%E0%B8%9A%E0%B8%B8%E0%B8%9E%E0%B8%A8%E0%B8%B4%E0%B8%A3%E0%B8%B4&amp;can_password=741147&amp;from_mail=true" target="_blank">พนักงานเติมน้ำมัน,แก๊ส NGV</a> (บจก.วังศกาญจน์กิจ)</font></td>
<td><font color="#0033cc">กรุงเทพมหานคร</font></td>
<td><font color="#0033cc">2008-04-18</font></td>
</tr>
<tr bgcolor="#ccffcc">
<td><font color="#0033cc">P057459</font></td>
<td><font color="#0033cc"><a href="http://www.jobant.com/jobsearch_detail.php?job_id=57459&amp;can_email=nattaphong_1993@hotmail.com&amp;can_fullname=%E0%B8%93%E0%B8%B1%E0%B8%90%E0%B8%9E%E0%B8%87%E0%B8%A9%E0%B9%8C%20%E0%B8%9A%E0%B8%B8%E0%B8%9E%E0%B8%A8%E0%B8%B4%E0%B8%A3%E0%B8%B4&amp;can_password=741147&amp;from_mail=true" target="_blank">ช่างทาสี</a> (ก๊กมิ้งเฟอร์นิเจอร์)</font></td>
<td><font color="#0033cc">กรุงเทพมหานคร</font></td>
<td><font color="#0033cc">2008-04-17</font></td>
</tr>
<tr bgcolor="#ffffcc">
<td><font color="#0033cc">P055345</font></td>
<td><font color="#0033cc"><a href="http://www.jobant.com/jobsearch_detail.php?job_id=55345&amp;can_email=nattaphong_1993@hotmail.com&amp;can_fullname=%E0%B8%93%E0%B8%B1%E0%B8%90%E0%B8%9E%E0%B8%87%E0%B8%A9%E0%B9%8C%20%E0%B8%9A%E0%B8%B8%E0%B8%9E%E0%B8%A8%E0%B8%B4%E0%B8%A3%E0%B8%B4&amp;can_password=741147&amp;from_mail=true" target="_blank">เจ้าหน้าที่สถิติประยุกต์</a> (โรงพยาบาลศรีวิชัย 2)</font></td>
<td><font color="#0033cc">กรุงเทพมหานคร</font></td>
<td><font color="#0033cc">2008-04-04</font></td>
</tr>
<tr bgcolor="#ccffcc">
<td><font color="#0033cc">P054793</font></td>
<td><font color="#0033cc"><a href="http://www.jobant.com/jobsearch_detail.php?job_id=54793&amp;can_email=nattaphong_1993@hotmail.com&amp;can_fullname=%E0%B8%93%E0%B8%B1%E0%B8%90%E0%B8%9E%E0%B8%87%E0%B8%A9%E0%B9%8C%20%E0%B8%9A%E0%B8%B8%E0%B8%9E%E0%B8%A8%E0%B8%B4%E0%B8%A3%E0%B8%B4&amp;can_password=741147&amp;from_mail=true" target="_blank">Floor Supervisor</a> (The Davis Bangkok Hotel)</font></td>
<td><font color="#0033cc">กรุงเทพมหานคร</font></td>
<td><font color="#0033cc">2008-04-17</font></td>
</tr>
</tbody>
</table>
<p><a href="http://tteen.nireblog.com/post/2008/04/18/%e0%b8%87%e0%b8%b2%e0%b8%99#comments">Comments</a></p>]]></description>
	<pubDate>Fri, 18 Apr 2008 09:54:02 +0100</pubDate>	</item>
	<item>
	<title>งานออนไลน์</title>
	<link>http://tteen.nireblog.com/post/2008/04/18/%e0%b8%87%e0%b8%b2%e0%b8%99%e0%b8%ad%e0%b8%ad%e0%b8%99%e0%b9%84%e0%b8%a5%e0%b8%99%e0%b9%8c</link>
	<guid>http://tteen.nireblog.com/post/2008/04/18/%e0%b8%87%e0%b8%b2%e0%b8%99%e0%b8%ad%e0%b8%ad%e0%b8%99%e0%b9%84%e0%b8%a5%e0%b8%99%e0%b9%8c</guid>
		<description><![CDATA[<h2><font color="#0033cc">ส</font>วั<font color="#0033cc">ส</font>ดี<font color="#0033cc">ช</font>า<font color="#0033cc">ว</font>โ<font color="#0033cc">ล</font>ก(<font color="#00cc66">ออนไลน์</font>์)<font color="#0033cc">ท</font>ั้ง<font color="#0033cc">ห</font>ล<font color="#0033cc">า</font>ย</h2>
<h3>วันนี้กะเจ๋าจะมาสอน<span style="background-color: #990099">วิธีการหาเงินจากเว็บไซต์และบล็อก</span>ของพี่น้อง</h3>
<p>ทั้งหลาย  เพราะบางคนเพิ่งเข้าวงการนี้รวมทั้งกะเจ๋าอาจถูกหลอกได้</p>
<p>เพราะงานของบางเว็บโกหกทั้งเพทำเป็นปีก็ยังไม่ได้เงินซักแดง</p>
<p>วันนี้กพเจ๋าถึงหันมาหางานโฆษณาบนเว็บแทน  มันก็คือเราขายพื้นที่บนเว็บ</p>
<p>ให้นายหน้าโฆษณา แล้วก็จะมีคนมาโฆษณากับเว็บเราเองโดยทเราไม่ต้อง</p>
<p>ไปหาเองให้เมื่อย  งานพวกน้กะเจ๋าจะขอแนะนำพี่น้องอยู่ 2 เว็บ</p>
<p>คือ</p>
<p><font color="#0033cc">1.text-link-ads</font></p>
<p><font color="#0033cc">2.nipa</font></p>
<p>ซึ้งอันแรกดีกว่า แต่กะเจ๋าเฮ้ด บ่ เป็นงานนี้ต้องหาตามเว็บอื่นงานน้เค้าบอกว่าจะมีคน</p>
<p>ซื้อพื้นที่โฆษณาบนเว็บเราที่ครั้งละ 10 $+ ข้าเจ๋าอยากลองม๋ากมากแต่เอาโค๊ดลงเว็บ</p>
<p>ไม่เป็น</p>
<p><font color="#0033cc">แต่<u><strong><font size="4">ของนิภา อันที่ 2  นี่ลงง่ายโฆษณาหลายแบบ</font></strong></u></font></p>
<p><font color="#0033cc">แค่มีเว็บหรือบล็อก สมัครแล้วถ้าได้รับการอนุมัติ ก็ล็อกอินเอาโค๊ดลงเว็บได้เลย</font></p>
<p><font color="#0033cc">งานนี้แจ่ม <span class="style8">AdPerClick ของนิภา ถ้ามีคนคลิกโฆษณาเราก็จะได้ 0.40 ฿ ถือว่าแจ่ม</span></font></p>
<p><font color="#0033cc">และ        Reseller     ของนิภาคือกัน คือเราเป็นตัวแทนขายโฆษณามีแบนเนอร์ให้ลงเว็บ</font></p>
<p><font color="#0033cc">3 ชนิด อันนี้เงินดีกว่า<strong style="background-color: #00cc66"><font size="3" color="#003399">ถ้าจะสมัคร Reseller ก็เลือกอันที่ 3 นะครับ</font></strong>อ่านลายละเอียดเพิ่มเติม</font></p>
<p><font color="#0033cc">ที่เว็บ </font></p>
<p> <br />
<table border="1" cellspacing="1" cellpadding="1" width="200">
<tr>
<td><a href="http://media.nipa.co.th/index0.php?user_id=RS08041005" target="_blank"><br /> <img src="http://www.nipa.co.th/Banner/apc/namethai_write599_150x150.gif" border="0" alt="โฆษณา,โฆษณาออนไลน์,การโฆษณา,สื่อโฆษณา,การตลาด,บริษัทโฆษณา,ประชาสัมพันธ์,ลงโฆษณา,ประกาศ,ออนไลน์,online,online advertising,advertising,โปรโมทสินค้า,โปรโมทเว็บไซต์,promote website,seo,pay per click,ad per click,media,ค้นหาเว็บ,media,สื่อ" width="150" height="150" /></a></td>
<td><a href="http://media.nipa.co.th/index0.php?user_id=RS08041005" target="_blank"><br /> <img src="http://www.nipa.co.th/Banner/apc/ppc_150x150.gif" border="0" alt="โฆษณา,โฆษณาออนไลน์,การโฆษณา,สื่อโฆษณา,การตลาด,บริษัทโฆษณา,ประชาสัมพันธ์,ลงโฆษณา,ประกาศ,ออนไลน์,online,online advertising,advertising,โปรโมทสินค้า,โปรโมทเว็บไซต์,promote website,seo,pay per click,ad per click,media,ค้นหาเว็บ,media,สื่อ" width="150" height="150" /> </a></td>
<td><a href="http://apc.nipa.co.th/index.php?user_id=RS08041005" target="_blank"><br /> <img src="http://www.nipa.co.th/Banner/apc/friend2_150_150.gif" border="0" alt="โฆษณา,โฆษณาออนไลน์,การโฆษณา,สื่อโฆษณา,การตลาด,บริษัทโฆษณา,ประชาสัมพันธ์,ลงโฆษณา,ประกาศ,ออนไลน์,online,online advertising,advertising,โปรโมทสินค้า,โปรโมทเว็บไซต์,promote website,seo,pay per click,ad per click,media,ค้นหาเว็บ,media,สื่อ" width="150" height="150" /></a></td>
</tr>
</table>
<p>ตัวอย่างโฆษณา คลิกดูลายละเอียดได้</p>
<p><!-- np_ad_client    = 'AID08040302'; np_ad_width     = 550; np_ad_height    = 200; np_color_border = '808080'; np_color_bg     = 'F7FEF4'; np_color_link   = '0000FF'; np_color_url    = '008000'; np_color_text   = '000000'; np_advertise    = 3; np_ad_amount    = (np_advertise-1); np_ad_format    = '550x200_as'; np_ad_type      = 'Rotate'; np_ad_channel   = ''; //--><!-- np_ad_client    = 'AID08040302'; np_ad_width     = 550; np_ad_height    = 200; np_color_border = '808080'; np_color_bg     = 'F7FEF4'; np_color_link   = '0000FF'; np_color_url    = '008000'; np_color_text   = '000000'; np_advertise    = 3; np_ad_amount    = (np_advertise-1); np_ad_format    = '550x200_as'; np_ad_type      = 'Rotate'; np_ad_channel   = ''; //--><br /> <br />
<table border="1" cellspacing="1" cellpadding="1" width="291" height="187">
<tr>
<td>
<div style="text-align: center"><a href="http://toolbar.nipa.co.th" target="_new"><br /> </a></div>
</td>
<td><a href="http://media.nipa.co.th/index0.php?user_id=tteen.igetweb.com" target="_blank"><img src="http://media.nipa.co.th/images/Banner/thainame_useing.gif" border="0" alt="โฆษณาออนไลน์,ออนไลน์,โฆษณา,ลงโฆษณา,ประกาศ, online advertising,online,advertising,โปรโมทสินค้า, โปรโมทเว็บไซต์,promote website,seo,pay per click, ad per click,media,ค้นหาเว็บ,media,สื่อ" /> </a></td>
<td>&nbsp;</td>
</tr>
</table>
<p><a href="http://tteen.nireblog.com/post/2008/04/18/%e0%b8%87%e0%b8%b2%e0%b8%99%e0%b8%ad%e0%b8%ad%e0%b8%99%e0%b9%84%e0%b8%a5%e0%b8%99%e0%b9%8c#comments">Comments</a></p>]]></description>
	<pubDate>Fri, 18 Apr 2008 04:26:45 +0100</pubDate>	</item>
</channel>	
</rss>
 
