- Timestamp:
- 2006/11/14 10:50:34 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
temp/trunk/data/downloads/module/mdl_epsilon/mdl_epsilon.inc
r8322 r8323 86 86 function sfPostPaymentData($order_url, $arrData, $err_page = true){ 87 87 $arrVal = array(); 88 88 $response = ""; 89 89 90 // POST¥Ç¡¼¥¿¤òÁ÷¿®¤·¡¢±þÅú¾ðÊó¤ò¼èÆÀ¤¹¤ë 90 91 $response = sfSendPostData($order_url, $arrData, array(200)); … … 101 102 } 102 103 103 //$response = mb_convert_encoding($response, "UTF-8"); 104 /* 105 $response = ' <Epsilon_result> 106 <result result="1" /> 107 <result redirect="https%3A%2F%2Fbeta.epsilon.jp%2Fcgi-bin%2Forder%2Fcard3.cgi%3Ftrans_code%3D62550" /> 108 </Epsilon_result>'; 109 */ 110 /* 111 // get xml 112 $xmlStr = $response; 113 // parse xml 114 $encode = "UTF-8"; 115 $xmlStr = mb_convert_encoding( $xmlStr, $encode, 'auto' ); 116 $xmlObjs = @simplexml_load_string( $xmlStr, " SimpleXMLIterator" ); 117 print_r( $xmlObjs ); 118 */ 119 sfprintr('utf-8'); 120 sfprintr($response); 121 $response = mb_convert_encoding($response, "SJIS", "auto"); //°ìÅÙsjis¤Ë¤¹¤ë 122 $response = mb_convert_encoding($response, "UTF-8", "SJIS"); //¤Þ¤¿utf8¤ËÌ᤹ 104 // Shift-JIS¤òUNICODE¤ËÊÑ´¹¤¹¤ë 105 $response = str_replace("x-sjis-cp932", "UTF-8", $response); 106 // XMLÆâ¤Î¥¨¥ó¥³¡¼¥É¤âUNICODE¤ËÊÑ´¹ 123 107 $response = mb_convert_encoding($response, "UTF-8", "UTF-8"); 124 sfprintr($response);125 126 $xml = simplexml_load_string($response);127 sfprintr($xml);128 129 //$xml = simplexml_load_string($response);130 131 132 sfprintr(mb_detect_encoding($response));133 108 134 109 // XML¥Ñ¡¼¥µ¤òÀ¸À®¤¹¤ë¡£ … … 139 114 xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,1); 140 115 141 142 sfprintr(xml_error_string(xml_get_error_code($parser)));143 144 116 // ÇÛÎó¤ËXML¤Î¥Ç¡¼¥¿¤ò³ÊǼ¤¹¤ë 145 117 $err = xml_parse_into_struct($parser,$response,$arrVal,$idx); 146 118 147 sfprintr(xml_error_string(xml_get_error_code($parser)));148 exit();149 150 119 // ³«Êü¤¹¤ë 151 120 xml_parser_free($parser);
Note: See TracChangeset
for help on using the changeset viewer.
