\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 (13)
博主新年好啊,看完Ted Petrik那文后,最赞同的就是那个移动设备的观点,希望Adobe能加大力度在重点移动平台上放出AIR吧。
还有关于jQuery成为标准javascript库的说法,jQuery这东西真的令javascript有了第二次生命,反正我是迷上jQuery的......
Posted by Boss'sboss | January 6, 2008 5:28 PM
Posted on January 6, 2008 17:28
黑羽新年快乐,在你的Blog学到很多东西,长了不少见识!
只是,我想知道在主页浏览日志列表时怎么向后翻页啊?
Posted by ephay | January 9, 2008 6:55 PM
Posted on January 9, 2008 18:55
发现前面第2个游戏的地址有些问题,这个是中文版的链接
http://www.game.com.cn/games/7/9/starisland.html
Posted by breath | January 13, 2008 4:09 PM
Posted on January 13, 2008 16:09
请教大家个问题,升级了115的Player后,如在www.aaa.com的一个iframe里加载了www.bbb.com中的一个Flash,其中用getURL的js代码无法执行了,有什么好的解决办法吗?要能兼容各种情况的。急!谢谢大家了!
Posted by zs_3718 | January 15, 2008 10:41 AM
Posted on January 15, 2008 10:41
新年快乐!
Posted by Beach | January 17, 2008 7:28 PM
Posted on January 17, 2008 19:28
非常感谢您对88的支持!
今年正值88十周岁生日,我们将在春季展开一系列的站庆活动。
不知道黑羽网友是否能再为88的十周年庆再设计一款flash动画!
不甚感谢!
盼复!
fishbilly@zju.edu.cn
fishbilly@飘渺水云间站务组
2008.01.19
Posted by fishbilly | January 19, 2008 11:07 AM
Posted on January 19, 2008 11:07
前几日晚在杭州一会,和您畅谈才知道flash如此当前发展如此厉害,我本研发网络应用现转flash,不知顺畅否,以后请多多指教啊.
Posted by 桂静秋 | January 22, 2008 9:46 AM
Posted on January 22, 2008 09:46
to fishbilly:
一晃眼飘渺水云间已经十周年啦,呵呵。高兴啊。
上次做五周年纪念动画时,我还在玉泉读书,比较有空。现在已经上班了,没有空啦。-_-b....
热烈祝贺88十周岁生日啊。
Posted by 黑羽 | January 24, 2008 10:25 AM
Posted on January 24, 2008 10:25
黑羽你好,刚买了你的新书。我在东京工作。我们公司有flash as2.0项目想要找中国的公司合作。如果可以的话,能不能给我介绍几家中国大型的flash制作公司呢?
Posted by 秦天 | January 24, 2008 7:12 PM
Posted on January 24, 2008 19:12
to 黑羽:
好的,谢谢您!
也欢迎您在工作之余,常回88看看:)
Posted by fishbilly | January 27, 2008 12:31 PM
Posted on January 27, 2008 12:31
恭喜发财!!
Posted by 徐博 | January 27, 2008 3:34 PM
Posted on January 27, 2008 15:34
to 桂静秋:
桂兄客气啊。经常来逛逛啊。 :)
Posted by 黑羽 | January 28, 2008 12:15 PM
Posted on January 28, 2008 12:15
恭喜发财,红包拿来
Posted by 钟灵教育 | February 13, 2008 11:03 PM
Posted on February 13, 2008 23:03