\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 (18)
下了,很不错,
我还打出来了!呵呵
Posted by 中国医学教育网 | June 6, 2008 5:33 AM
Posted on June 6, 2008 05:33
恩,下载看了看,很不错!好好学习学习!
Posted by lanxuehai | June 6, 2008 10:15 AM
Posted on June 6, 2008 10:15
绝对的支持,哈哈,很不错
Posted by 秋天霓虹灯 | June 6, 2008 10:27 AM
Posted on June 6, 2008 10:27
太好了!
留言一个, 支持一下!
Posted by Y.Boy | June 6, 2008 11:48 AM
Posted on June 6, 2008 11:48
頂~~~~~
Posted by Badheaven | June 6, 2008 1:30 PM
Posted on June 6, 2008 13:30
把那些源码塞到pdf里吧
Posted by kron | June 6, 2008 5:14 PM
Posted on June 6, 2008 17:14
顶下~~有意义的东东
Posted by 圣叹 | June 6, 2008 9:21 PM
Posted on June 6, 2008 21:21
我想下啊!下不了!
Posted by long weicai | June 9, 2008 1:31 PM
Posted on June 9, 2008 13:31
好资料 拉下来学习之
Posted by Neo | June 11, 2008 10:33 AM
Posted on June 11, 2008 10:33
好资料 拉下来学习之
Posted by Neo | June 11, 2008 10:39 AM
Posted on June 11, 2008 10:39
GOOD!!!!
Posted by kavon | June 19, 2008 10:59 PM
Posted on June 19, 2008 22:59
多谢提供下载!
Posted by 广发聚丰 | June 21, 2008 11:13 AM
Posted on June 21, 2008 11:13
我也下载一个看看。
Posted by carbon carving | July 15, 2008 10:23 PM
Posted on July 15, 2008 22:23
一个程序员开始学AS脚本,非常感谢提供下载!
Posted by 赵峰 | July 20, 2008 7:20 PM
Posted on July 20, 2008 19:20
找个地方来提问。买了本,你的“Flash ActionScript 3 殿堂之路”真不错。想问个问题,怎么我装了flash cs3 和flex3 后,在flash cs3菜单commands里没“make flex component"这项?flex3安装文件夹李一个mxp文件都没有。谢谢!!!!!!
Posted by 小宝 | July 24, 2008 7:01 PM
Posted on July 24, 2008 19:01
上海专业生产门禁考勤系统 www.zhuanhou.cn link:www.akux.cn
Posted by 上海考勤 | August 7, 2008 10:29 PM
Posted on August 7, 2008 22:29
private function initTimter():void
{
intervalId = setInterval(doTimter,5000);
}
//定时器回调方法
private function doTimter():void
{
loader= new URLLoader();
var SessionVerifyURL:URLRequest = new URLRequest("SessionVerify.aspx");
SessionVerifyURL.method = URLRequestMethod.GET;
loader.dataFormat = URLLoaderDataFormat.VARIABLES;
loader.addEventListener(Event.COMPLETE,completeHandler);
loader.load(SessionVerifyURL);
}
private function completeHandler(e:Event):void
{
Alert.show(loader.data);
ExternalInterface.call("otherUserLogin",loader.data.otherUserLogin);
}黑羽大哥,哪儿错了啊,Alert.show(loader.data);返回的乱码
Posted by 失宠为 | August 13, 2008 4:33 PM
Posted on August 13, 2008 16:33
??????????? ????????mail???~
Posted by Angel & Dolphin | August 25, 2008 10:37 PM
Posted on August 25, 2008 22:37