\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 (17)
公司和家里的网络一样的垃圾,下载成了一种折磨,阿门……
Posted by eidiot | June 11, 2007 1:20 PM
Posted on June 11, 2007 13:20
果然是一流公司賣標準,Adobe不斷出手,RIA的先機目前還是被Adobe抓的多一些
Posted by Shunz | June 11, 2007 2:05 PM
Posted on June 11, 2007 14:05
Flex Builder 3 Beta—Standalone Installer
Flex Builder 3 Beta—Eclipse Plugin
这两个版本有什么区别?
谢谢
Posted by Y-boy.cn | June 11, 2007 5:01 PM
Posted on June 11, 2007 17:01
Flex Builder 3 Beta—Standalone Installer
Flex Builder 3 Beta—Eclipse Plugin
这两个版本有什么区别?
谢谢
Posted by Y-boy.cn | June 11, 2007 5:01 PM
Posted on June 11, 2007 17:01
正在使用中...
里面的帮助文档还全是Flex 2的,哈哈。
Posted by 黑羽 | June 11, 2007 5:04 PM
Posted on June 11, 2007 17:04
oH~mY gOd !
不是我不明白~这世界变化快~
不是我不明白~这世界变化快~
不是我不明白~这世界变化快~
Posted by 争气宝宝 | June 11, 2007 5:51 PM
Posted on June 11, 2007 17:51
不知Adobe是否切断了Flex跟Flash的联系,如果能更加方便的使用Flash MC打包的SWC这样开发AIR可能会更令人欣喜~
Posted by Neo | June 13, 2007 3:38 PM
Posted on June 13, 2007 15:38
大哥~我一直在看你的教程学习Flex最近碰到个问题,两天没搞定。也没头绪~心里烦烦的!!!
想起大哥这了。进来倒倒苦水!也请大哥有空出一下这方面的教程!!
我搞不懂Flex怎么连接MS-Sql或Access这类数据库。
晕菜!不能连数据库那多烦哪。好多东东就做不了啦!
所有请大哥在有空的时候能不能做下这方面的教程。。。
我学过Vb.net所以最好可以用.net的语言来做实例!如果只能是java来连接的话,那我也只有接受java的方式了。谢谢!
Posted by ztwy35@msn.com | June 13, 2007 4:02 PM
Posted on June 13, 2007 16:02
Flex一直只是了解状态,呵呵
Posted by Beach | June 14, 2007 10:52 PM
Posted on June 14, 2007 22:52
最近没事关注了下silverlight和ms快推出的下一代vs以及expression,对FLEX是很大的挑战呀
特别是silverlight1.1支持C#之类的,而且美工结合更好
还是学学勒
Posted by magicianzrh | June 17, 2007 12:54 AM
Posted on June 17, 2007 00:54
to ztwy35@msn.com:
flex连数据库在flex教程里有相应的,说到底还是靠后台语言PHP之类的
Posted by magicianzrh | June 17, 2007 12:56 AM
Posted on June 17, 2007 00:56
黑羽 现在的flash cs能支持wma的音乐格式不 有没有第三方插件可以支持的呀
Posted by hileo | June 21, 2007 4:03 PM
Posted on June 21, 2007 16:03
magicianzrh说的对。最近忙的连Silverlight都没关注了。sigh。7月补上。
Posted by 黑羽 | June 22, 2007 3:42 PM
Posted on June 22, 2007 15:42
to Neo:
现在有了Component for Tookit ,已经很方便了啊。
而且还有UIMovieClip类可以继承。还有什么不方便的呢?
Posted by 黑羽 | June 22, 2007 3:45 PM
Posted on June 22, 2007 15:45
to hileo:
让Flash支持wma是不可能的,呵呵。断了念头吧。除非自行开发第三方控件
Posted by 黑羽 | June 22, 2007 3:46 PM
Posted on June 22, 2007 15:46
黑羽大哥,最近学FLEX遇到一个问题,下面是出错的提示:
Unexpected text 'messageTypes="flex.messaging.messages.AsyncMessage">' found in 'service' from file: messaging-config.xml.
还有提示channel通道找不到!我在message-config里面修改了一些内容!
Posted by 登明 | September 27, 2007 10:49 PM
Posted on September 27, 2007 22:49
正在使用中...
里面的帮助文档还全是Flex 2的,哈哈。.
Posted by Tercüme bürosu | October 31, 2007 2:04 AM
Posted on October 31, 2007 02:04