Re: [請益] plurk-php-api 回覆編碼問題

看板PHP作者 (蝶魂)時間15年前 (2010/03/13 15:35), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串3/3 (看更多)
小弟的程式碼 <?php $checkrepo=0; $zodiac = array( '123', ); $api_key = 'xxx'; $username = 'xxxx'; $password = 'xxxx'; require('plurk_api.php'); $plurk = new plurk_api(); $plurk->login($api_key, $username, $password); $Plurks = $plurk->get_plurks(NULL, 30, NULL, NULL, NULL); $filter_qualifier = 'asks'; $response_qualifier = 'says'; foreach($Plurks->plurks as $key => $msg){ $check_str = trim($Plurks->plurks[$key]->content_raw); if(mb_strlen($check_str, 'UTF-8') != 3) continue; $Re = $plurk->get_responses($Plurks->plurks[$key]->plurk_id); foreach($Re->friends as $rekey => $remsg){ if($rekey=='3670803'){ $checkrepo = '1'; } } if($checkrepo!='1'){ if(in_array($check_str, $zodiac)){ $target_pid = $Plurks->plurks[$key]->plurk_id; $target_time = strtotime($Plurks->plurks[$key]->posted); $response = '早安'; $result = $plurk->add_response($target_pid, $response,'says'); } } } ?> 目前試過urlencode和mb_convert_encoding但都沒效果orz -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 112.104.69.140
文章代碼(AID): #1Bcq0fRj (PHP)
文章代碼(AID): #1Bcq0fRj (PHP)