$url, ); $result = self::httpPost( $targetURL, $param ); if( $result['status'] == 0 ){ return $result; } else { return false; } } } // -------------------------------------------------------------------- } // 测试 $strLongUrl = "http://my.oschina.net/wangyongtao"; $arrTinyUrlResult = FunctionHelper::createTinyUrl( $strLongUrl ); print_r($arrTinyUrlResult); // $ php dwz_test.php // Array // ( // [tinyurl] => http://dwz.cn/30R23W // [status] => 0 // [longurl] => http://my.oschina.net/wangyongtao // [err_msg] => // )
$url, ); $result = self::httpPost( $targetURL, $param ); if( $result['status'] == 0 ){ return $result; } else { return false; } } } // -------------------------------------------------------------------- } // 测试 $strLongUrl = "http://my.oschina.net/wangyongtao"; $arrTinyUrlResult = FunctionHelper::createTinyUrl( $strLongUrl ); print_r($arrTinyUrlResult); // $ php dwz_test.php // Array // ( // [tinyurl] => http://dwz.cn/30R23W // [status] => 0 // [longurl] => http://my.oschina.net/wangyongtao // [err_msg] => // )