\n";
for ($i = 0; $i < count($arr_xml['URL']); $i++) {
if( isset($arr_xml['PostID'][$i]) && $arr_xml['PostID'][$i] > 0 ) continue;
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();
?>
Comments (19)
够专业的!! 呵呵
Posted by pickgliss | August 29, 2008 8:36 AM
Posted on August 29, 2008 08:36
这个功能很适合做竞价排名啊,呵呵
Posted by sumnny | August 29, 2008 8:52 AM
Posted on August 29, 2008 08:52
还需要装插件啊?
Posted by Ethan | August 29, 2008 10:36 AM
Posted on August 29, 2008 10:36
在IE8的加速器安装首页有个“淘宝搜索”,黑羽说的应该就是那个吧。
Posted by hobby | August 29, 2008 2:32 PM
Posted on August 29, 2008 14:32
to hobby:
不是,那个是Accelerator,我这篇文章说的是Visual Search,ie8gallery这个页面有:http://www.ieaddons.com/cn/Details.aspx?Id=872
Posted by 黑羽 | August 29, 2008 5:06 PM
Posted on August 29, 2008 17:06
试用了下,还不错撒
Posted by 那年那月 | September 1, 2008 12:10 PM
Posted on September 1, 2008 12:10
试用,谢谢.
Posted by chinese tea | September 21, 2008 9:27 AM
Posted on September 21, 2008 09:27
支付功能不支持IE8,弄这些还有什么用。
Posted by yuyangvi | November 13, 2008 3:19 PM
Posted on November 13, 2008 15:19
别惯着IE%……
Posted by cuikai | February 17, 2009 11:28 PM
Posted on February 17, 2009 23:28
sometimes a appearance needs aliment or runescape gold
Posted by runescape power leveling | November 12, 2009 9:27 AM
Posted on November 12, 2009 09:27
路过顶贴 顺便做个推广 希望管理员别介意 谢谢
Posted by 温州妇产医院 | December 27, 2009 4:28 PM
Posted on December 27, 2009 16:28
ヴィ バッグ
[url=http://www.go2000.com]ヴィト バッグ[/url]
Posted by dsaasd | June 10, 2010 10:13 AM
Posted on June 10, 2010 10:13
never give up behold the chance as legend
Posted by metin2 yang | July 8, 2010 2:35 PM
Posted on July 8, 2010 14:35
nice posts i like it
Posted by metin2 yang kaufen | July 8, 2010 2:36 PM
Posted on July 8, 2010 14:36
fisker wall ksharp owen
Posted by metin2 yang | July 8, 2010 2:37 PM
Posted on July 8, 2010 14:37
I want to say very thank you for this great informations. now i understand about it. Thank you !
Posted by puma shoes | July 16, 2010 11:23 AM
Posted on July 16, 2010 11:23
.....04.....
I want to say very thank you for this great informations. now i understand about it. Thank you !
Posted by Cheap UGG Boots | July 19, 2010 3:29 PM
Posted on July 19, 2010 15:29
I pride to be citizen of the world, so I am also hoping that the Hindu’s class system of “Royal(lords) and peasant (commoner)will change”, so the education level will improve together with the knowledge, virtues and economy.
China had forgotten the past history with Japan. The former Premiere Mr. Deng Xiao Ping , when asked by the Japanese premiere about twenty five years ago.” about the return of the northern island back to China.” Mr. Dan replied:” Slow down, we wouldn’t know how the politics of the world is going to be fifty years from now.” Most recently, Mr. Hu said:” We hope Japan will involve in greater part of the affair of the world. We are happy to see the peaceful path Japan takes since the thank you for sharing:)
Posted by Soğutma Büyüsü | August 25, 2010 9:24 PM
Posted on August 25, 2010 21:24
图文搭配最好!
Posted by air max | September 2, 2010 8:41 AM
Posted on September 2, 2010 08:41