\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 (27)
强啊
Posted by qqhugo | September 29, 2007 11:11 AM
Posted on September 29, 2007 11:11
昨天在当当买书,今天晚上应该能到手了!呵呵,这效果太牛了!神作
Posted by 火炬 | September 29, 2007 11:37 AM
Posted on September 29, 2007 11:37
MD...不是人
Posted by 路人甲 | September 29, 2007 1:09 PM
Posted on September 29, 2007 13:09
非常喜欢,
转了....
不知道博主是否愿意做个链接呢?
Posted by momo | September 29, 2007 1:27 PM
Posted on September 29, 2007 13:27
我现在很兴奋.......
...
Posted by Y-boy | September 29, 2007 2:26 PM
Posted on September 29, 2007 14:26
太耗CPU了
Posted by wt | September 29, 2007 4:21 PM
Posted on September 29, 2007 16:21
-,- 如果我说他不支持双核,是不是很欠扁。
Posted by ZhuZhe | September 29, 2007 4:29 PM
Posted on September 29, 2007 16:29
果然厉害..佩服,佩服.
Posted by Study | September 29, 2007 5:30 PM
Posted on September 29, 2007 17:30
太牛了!
Posted by troy | September 29, 2007 8:03 PM
Posted on September 29, 2007 20:03
3000多啦
卡死啦
Posted by magicianzrh | September 29, 2007 9:02 PM
Posted on September 29, 2007 21:02
cool
7000+还很流畅,让人看到希望了呵呵
Posted by Ryan | September 30, 2007 11:09 AM
Posted on September 30, 2007 11:09
太漂亮了!~
Posted by s1s2 | September 30, 2007 11:27 AM
Posted on September 30, 2007 11:27
但是大家看到没?当拉近的时候。渲染的很模糊。所以总的来说处理就比较流畅了。如果他把所有渲染高质量输出的话。估计还是会卡的。
Posted by 单眼皮狼 | September 30, 2007 2:17 PM
Posted on September 30, 2007 14:17
太强了
Posted by jh7086 | October 1, 2007 12:37 PM
Posted on October 1, 2007 12:37
牛逼了
Posted by orcsor | October 3, 2007 7:38 PM
Posted on October 3, 2007 19:38
这个没贴图的吧? 3D粒子?
Posted by civet | October 8, 2007 10:08 AM
Posted on October 8, 2007 10:08
点到手痛,终于过万了,还是比较流畅
Posted by 小瓜 | October 11, 2007 8:01 AM
Posted on October 11, 2007 08:01
到10000多的时候有些卡了。。。
cpu占用50%。。
Posted by jerryk | October 11, 2007 1:09 PM
Posted on October 11, 2007 13:09
勘误:殿堂书的第27页
中间一段代码
for(var i:int = 0; i floatB += 0.1;
c++;
}
上面的c++; 是多余的~~^_^
Posted by 王潇 | October 11, 2007 4:19 PM
Posted on October 11, 2007 16:19
勘误来http://www.actionscript3.cn/bbs/吧,这里有个专门勘误殿堂之路的版http://www.actionscript3.cn/bbs/forum-19-1.html
^_^
Posted by 清水 | October 11, 2007 10:16 PM
Posted on October 11, 2007 22:16
左键右键一起点看下 会出现bug! 然后就自动不停点咯 嘿
Posted by 风无言 | October 17, 2007 11:28 PM
Posted on October 17, 2007 23:28
左键右键一起点看下 会出现bug! 然后就自动不停点咯 嘿
Posted by 风无言 | October 17, 2007 11:28 PM
Posted on October 17, 2007 23:28
那些费劲做复杂js的朋友,我觉得不值呀。花同样的力气,看看as3 吧。哈
Posted by as--coll | October 19, 2007 3:42 PM
Posted on October 19, 2007 15:42
这个效果不错,以后采纳一下哦..
Posted by 秀机机 | October 28, 2007 2:54 PM
Posted on October 28, 2007 14:54
点到手痛,终于过万了,还是比较流畅.
Posted by Tercüme bürosu | October 31, 2007 2:08 AM
Posted on October 31, 2007 02:08
真是林子大,什么鸟都有``
Posted by 伟 | October 31, 2007 9:38 AM
Posted on October 31, 2007 09:38
这的不错!
一定是编程特好的!
Posted by Beach | November 5, 2007 10:04 PM
Posted on November 5, 2007 22:04