\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 (12)
好消息,我去下载。
Posted by 龙城flash | February 25, 2008 1:41 PM
Posted on February 25, 2008 13:41
好消息,我下载去用一下试试。
Posted by 龙城flash | February 25, 2008 1:43 PM
Posted on February 25, 2008 13:43
太棒了 谢谢分享
Posted by auzn | February 25, 2008 1:49 PM
Posted on February 25, 2008 13:49
o(∩_∩)o...哈哈
看到啦
去拖了
Posted by magicianzrh | February 25, 2008 2:17 PM
Posted on February 25, 2008 14:17
请问,它有没有出中文版!?
Posted by flex | February 25, 2008 4:38 PM
Posted on February 25, 2008 16:38
已经装好了,试用不了,今天公布的就过期了,这样做不厚道吧
Posted by Flying | February 25, 2008 10:47 PM
Posted on February 25, 2008 22:47
to Flying:
你之前装过beta版吧?天地会上已经有解决的办法了,去check check ^ ^
Posted by 黑羽 | February 26, 2008 12:40 AM
Posted on February 26, 2008 00:40
hi kingda,那天去图书馆终于找到你的书了:P 写得很仔细,不过字体好大:)
http://blog.ezse.com/?p=663
这个可能对注册Flex有所帮助:)
Posted by shawn | February 27, 2008 1:36 PM
Posted on February 27, 2008 13:36
今天安装Flex Builder时遇到了一个问题,在安装过程中,出现了一个小窗口上面写着:
Installing Merge Module
然后安装程序就停止在这里不动,
这是怎么回事?
Posted by jGao | February 27, 2008 6:16 PM
Posted on February 27, 2008 18:16
为什么正式版没有了在代码中对变量,方法的蓝色高亮提示?而且我的已经破解成Pro版了。不破解的话,连Ctrl+z都不能用。
Posted by hobby | February 29, 2008 10:22 AM
Posted on February 29, 2008 10:22
谢谢分享!
Posted by replica handbags | May 4, 2008 5:11 PM
Posted on May 4, 2008 17:11
Kingda。。。为什么我的Flex Builder3 Pro没有许多工程种类。。。为什么别人的就有?
Posted by 竹子的叶子 | May 12, 2008 9:43 PM
Posted on May 12, 2008 21:43