\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 (30)
祝事业有成!
Posted by Y.Boy | May 15, 2008 9:37 AM
Posted on May 15, 2008 09:37
怪不得整天开着MSN了,原来换了个新工作,恭喜~
Posted by eidiot | May 15, 2008 10:07 AM
Posted on May 15, 2008 10:07
淘宝好啊
Posted by native | May 15, 2008 10:45 AM
Posted on May 15, 2008 10:45
灰常棒。
Posted by 虎子哥 | May 15, 2008 11:02 AM
Posted on May 15, 2008 11:02
哈哈 原来QQ上的名字没错阿~~
淘宝的管理和氛围都是很多人向往的
Posted by KingFo | May 15, 2008 11:25 AM
Posted on May 15, 2008 11:25
哈哈 原来QQ上的名字没错阿~~
淘宝的管理和氛围都是很多人向往的
Posted by KingFo | May 15, 2008 11:25 AM
Posted on May 15, 2008 11:25
不错,淘宝是个好去处。
Posted by weni | May 15, 2008 11:31 AM
Posted on May 15, 2008 11:31
恭喜恭喜
Posted by auzn | May 15, 2008 11:56 AM
Posted on May 15, 2008 11:56
kingda以前在科技园呀,,
Posted by 小小菜鸟 | May 15, 2008 1:25 PM
Posted on May 15, 2008 13:25
恭喜啊~~~~~~
黑羽,能否透漏点淘宝的RIA具体动态啊,是不是要搞个虚拟商城哦~~~~
Posted by oliwen | May 15, 2008 2:13 PM
Posted on May 15, 2008 14:13
淘宝有前途。恩。
Posted by aw | May 15, 2008 3:31 PM
Posted on May 15, 2008 15:31
哈哈,红草莓。。。
那玩意确实难吃。:D
Posted by 5key | May 15, 2008 6:30 PM
Posted on May 15, 2008 18:30
我在你楼下~~呵呵 6楼的食物,确实~~~很烂!
Posted by longfeng | May 15, 2008 7:49 PM
Posted on May 15, 2008 19:49
希望牛人加入牛公司能出牛产品
Posted by Sharpbeans | May 16, 2008 11:44 AM
Posted on May 16, 2008 11:44
难怪多日不见更新了,希望在公司里也能为广大AS3 开发者们多指导一下
Posted by 医人一生 | May 16, 2008 12:33 PM
Posted on May 16, 2008 12:33
最近好像身边很多人进到淘宝去了,现在黑羽也进了,看来淘宝魅力果然大啊。今天还听朋友说起淘宝三楼MM很多,口水啊!!说着也想进那里去看看了~~呵呵
Posted by badheaven | May 16, 2008 5:07 PM
Posted on May 16, 2008 17:07
最近好像身边很多人进到淘宝去了,现在黑羽也进了,看来淘宝魅力果然大啊。今天还听朋友说起淘宝MM很多,口水啊!!说着也想进那里去看看了~~呵呵
Posted by badheaven | May 16, 2008 5:09 PM
Posted on May 16, 2008 17:09
谢谢大家啦。:)
3楼是淘宝的客服,PPMM确实很多。2楼也不错的。单身的兄弟们可以去猫猫看,哈哈。
我现在博客已经基本恢复正常更新频率了,继续努力保持
Posted by 黑羽 | May 16, 2008 9:16 PM
Posted on May 16, 2008 21:16
恭喜了,呵呵,可惜我在家里访问ActiongScript3.cn很不稳定,经常Connection was reset...
Posted by jinni | May 18, 2008 10:41 AM
Posted on May 18, 2008 10:41
淘宝好 :),以后都是阿里巴巴的了。
等我入职之后有机会内部交流,哈哈。
Posted by Dreamer | May 19, 2008 11:44 AM
Posted on May 19, 2008 11:44
无名小卒也前来道个喜!~~~~~~~
Posted by oliwen | May 19, 2008 1:49 PM
Posted on May 19, 2008 13:49
无名小卒也前来道个喜!~~~~~~~
Posted by oliwen | May 19, 2008 1:51 PM
Posted on May 19, 2008 13:51
~~~~~留个言真难~~~
Posted by oliwen | May 19, 2008 1:55 PM
Posted on May 19, 2008 13:55
呵呵,变化真快啊。欢迎加入ali。
Posted by 秦歌 | May 22, 2008 10:48 AM
Posted on May 22, 2008 10:48
黑羽,怎么才能联系到你,我给你的信箱发了邮件不知你有没有收到?
我这里有个问题想向你请教,在ActionScript 3中,不允许向元件直接加代码了,那我所有的按钮若要写处理函数,是不是每个按钮都要写一个类?
Posted by Jane | May 22, 2008 2:54 PM
Posted on May 22, 2008 14:54
谢谢大家。
to jinni:今天见到7yue了,不知道什么时候有机会咱俩碰面啊,呵呵。
to: Dreamer
你来杭州啦,你还没毕业吧? ^ ^
到杭时,mail我一下,有空聚聚。
to:Oliwen
留言是困难,偶知道。有空换个主机商。
to:Jane
我博客中一般不解答问题。下次去论坛发帖问。你的问题可以简单用自定义按钮类绑定来解决。
Posted by 黑羽 | May 25, 2008 1:20 AM
Posted on May 25, 2008 01:20
牛人一头!签定完毕!!
Posted by keind | May 26, 2008 10:34 PM
Posted on May 26, 2008 22:34
您好老兄,PR7的博客站跟你交换友情链接??
可以的话加一下然后给我留言,在您站上没看到留言版
Posted by 微风家园 | May 28, 2008 12:15 PM
Posted on May 28, 2008 12:15
恭喜恭喜!~对于工作上博主有什么心得可以贴出来大家学习一下。
Posted by Davidwu | May 30, 2008 7:30 PM
Posted on May 30, 2008 19:30
吃饭绝对是大问题,
挑食的人,是不是都爱偷吃?
呵呵
Posted by cuikai | February 17, 2009 11:27 PM
Posted on February 17, 2009 23:27