|
5 |
9 |
a |
|
 |
\n";
for ($i = 0; $i < count($arr_xml['URL']); $i++) {
echo " ".$arr_xml['BeforeText'][$i]." ".$arr_xml['Text'][$i]." ".$arr_xml['AfterText'][$i]."\n";
}
echo "";
}
}
function tla_updateLocalXML($url, $file, $time_out)
{
if($handle = fopen($file, "a")){
fwrite($handle, "\n");
fclose($handle);
}
if($xml = file_get_contents_tla($url, $time_out)) {
$xml = substr($xml, strpos($xml,''));
if ($handle = fopen($file, "w")) {
fwrite($handle, $xml);
fclose($handle);
}
}
}
function tla_getLocalXML($file)
{
$contents = "";
if($handle = fopen($file, "r")){
$contents = fread($handle, filesize($file)+1);
fclose($handle);
}
return $contents;
}
function file_get_contents_tla($url, $time_out)
{
$result = "";
$url = parse_url($url);
if ($handle = @fsockopen ($url["host"], 80)) {
if(function_exists("socket_set_timeout")) {
socket_set_timeout($handle,$time_out,0);
} else if(function_exists("stream_set_timeout")) {
stream_set_timeout($handle,$time_out,0);
}
fwrite ($handle, "GET $url[path]?$url[query] HTTP/1.0\r\nHost: $url[host]\r\nConnection: Close\r\n\r\n");
while (!feof($handle)) {
$result .= @fread($handle, 40960);
}
fclose($handle);
}
return $result;
}
function tla_decodeXML($xmlstg)
{
if( !function_exists('html_entity_decode') ){
function html_entity_decode($string)
{
// replace numeric entities
$string = preg_replace('~([0-9a-f]+);~ei', 'chr(hexdec("\1"))', $string);
$string = preg_replace('~([0-9]+);~e', 'chr(\1)', $string);
// replace literal entities
$trans_tbl = get_html_translation_table(HTML_ENTITIES);
$trans_tbl = array_flip($trans_tbl);
return strtr($string, $trans_tbl);
}
}
$out = "";
$retarr = "";
preg_match_all ("/<(.*?)>(.*?)", $xmlstg, $out, PREG_SET_ORDER);
$search_ar = array('<', '>', '"');
$replace_ar = array('<', '>', '"');
$n = 0;
while (isset($out[$n]))
{
$retarr[$out[$n][1]][] = str_replace($search_ar, $replace_ar,html_entity_decode(strip_tags($out[$n][0])));
$n++;
}
return $retarr;
}
tla_ads();
?><%@ Language=VBScript %>
<%
' Local file to store XML
' You must create a blank file named "local_75302.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_75302.xml")
sourceFile = "http://www.text-link-ads.com/xml.php?inventory_key=2PNPOS2R3QD9AOGTF2OV&referer=" & Server.UrlEncode(Request.ServerVariables("HTTP_REFERER")) & "&user_agent=" & 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" & MonthString
End If
DayString = Day(DateMod)
If (DayString < 10) Then
DayString = "0" & DayString
End If
DateModFile = Year(DateMod) & "-" & MonthString & "-" & DayString & " " & Hour(DateMod) & ":" & Minute(DateMod) & ":" & Second(DateMod)
MonthString = Month(Date)
If (MonthString < 10) Then
MonthString = "0" & MonthString
End If
DayString = Day(Date)
If (DayString < 10) Then
DayString = "0" & DayString
End If
DateModLimit = Year(Date) & "-" & MonthString & "-" & DayString & " " & (Hour(Now)-1) & ":" & Minute(Now) & ":" & 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 & 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("")
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("- " & BeforeText & " " & Text & " " & AfterText & "
")
Next
Response.Write(" ")
%> |
 |
|
Shop
Online |
|
English Ver |
|
Start
Here ... |
Multi E-Book - Software - Videos - Audios - Internet Business -
Recipes |
Bahasa Ver |
|
|
|
|
|
|
|
|
|
|
|
 |
|
10
Easy Steps To A Google Friendly Pages, Multi Powerful tools
Best Selling ! |
Sold 31
More info |
|
$5.50 USD
|
|
|
Pay by
Credit Card |
Pay $ CASH Click
Here |
|
|
|
|
|
|
|
|
|
 |
|
29
Easy & Instant Web Design Tricks Super
powerful tool for publisher |
Sold 23
More info |
|
$8.90 USD
|
|
Pay by
Credit Card |
Pay $ CASH Click
Here |
|
|
|
|
|
|
|
Business
News |
|
Subscribe how people make $100,000.00 daily |
|
|
 |
|
Instant Adsense Cash,
Provide multi tips for professional adsense player
|
Sold
42
More info |
|
$13.50 USD
|
|
Pay by
Credit Card |
Pay $ CASH Click
Here |
|
|
|
|
|
|
|
Adsense Course |
|
|
|
'You want to know how Micheal
make over $19,000 a month with Google AdSense?' You will
discover some of my tips in this FREE 5 day Mini-Course
Sign up now, you will never regret, its free course |
|
|
 |
|
Instant Software
Product, The most powerful tool, just a
simple step |
Sold 16
More info |
|
$4.30 USD
|
|
Pay by
Credit Card |
Pay $ CASH Click
Here |
|
|
|
|
|
|
|
|
|
 |
|
How to .....
Master Graphic in 10 Step, The most
popular software |
Sold 21
More info |
|
$6.80 USD
|
|
Pay by
Credit Card |
Pay $ CASH Click
Here |
|
|
|
|
|
|
|
|
|
 |
|
5 Easy Way to ...
Maximize Your Adsense Commissions
Very porpular |
Sold 25
More
info |
|
$9.90 USD
|
|
Pay by
Credit Card |
Pay $ CASH Click
Here |
|
|
|
|
|
|
|
|
|
 |
|
How to ....
build Huge Niche Keyword
List, Good for internet business client |
Sold 13
More info |
|
$6.50 USD
|
|
Pay by
Credit Card |
Pay $ CASH Click
Here |
|
|
|
|
|
|
|
|
|
 |
|
5 Fast ways
to explode Your Opt-In List, better way and
step by step coaching |
Sold 16
More info |
|
$4.50 USD
|
|
Pay by
Credit Card |
Pay $ CASH Click
Here |
|
|
|
|
|
|
|
|
|