ntent;
}
else
{
return new videoclient_result( array(
"status" => 0 - 1,
"errMessage" => "涓嶈兘鍚戞湇鍔″櫒URL鍙戦佹暟鎹?,
"errCode" => 0 - 5
) );
}
}
else
{
return new videoclient_result( array(
"status" => 0 - 1,
"errMessage" => "涓嶈兘杩炴帴鏈嶅姟鍣?,
"errCode" => 0 - 6
) );
}
}
function _docall( $mod, $params )
{
$tmpArgs = array( );
$url = "";
if ( $this->appId )
{
$params['appId'] = $this->appId;
}
$params['method'] = $mod;
$params['version'] = $this->version;
foreach ( $params as $paramName => $paramValue )
{
$tmpArgs[] = urlencode( $paramName )."=".urlencode( $paramValue );
}
$args = join( "&", $tmpArgs );
$args .= "&sign=".$this->_sign( $args );
$tmpArgs = $args;
$url = $this->apiServerUrl."?siteId=".( $params['siteId'] ? $params['siteId'] : "0" );
$resultString = "";
$result = array( );
$args = urlencode( $this->_encrypt( urlencode( $args ), $this->key ) );
if ( VIDEO_DEBUG )
{
echo "------------------------------------------------<br>";
echo "鍙戦佺殑鏁版嵁<br> url : {$url} <br>";
echo "data : ".$tmpArgs;
echo "<br>--------------------------------------------------<br>";
}
if ( function_exists( "curl_init" ) )
{
$resultString = $this->_postcurl( $url, $args );
}
else
{
$resultString = $this->_postsock( $url, $args );
}
if ( is_object( $resultString ) )
{
return $resultString;
}
if ( empty( $resultString ) )
{
return new videoclient_result( array(
"status" => 0 - 1,
"errMessage" => "鏈嶅姟鍣ㄦ暟鎹繑鍥炰负绌?,
"errCode" => 0 - 7
) );
}
$tmp = $resultString;
$decodeString = $this->_decrypt( $resultString, $this->key );
if ( $decodeString )
{
$resultString = $decodeString;
}
$resultString = urldecode( $resultString );
if ( VIDEO_DEBUG )
{
echo "------------------------------------------------<br>";
echo "鎺ユ敹鍒扮殑鏁版嵁<br>";
echo "encodeData : {$tmp} <br><br><br>";
echo "data : ".$resultString;
echo "<br>--------------------------------------------------<br><br>";
}
parse_str( $resultString, $result );
if ( !is_array( $result ) )
{
return new videoclient_result( array(
"status" => 0 - 1,
"errMessage" => "瀹㈡埛绔暟鎹В瀵嗗け璐?,
"errCode" => 0 - 8
) );
}
return new videoclient_result( $result );
}
function iserror( $result )
{
return $result['status'] != 0 || $result['status'] === NULL;
}
function getcode( $result )
{
return $result['errCode'];
}
function getmessage( $result )
{
return $result['errMessage'];
}
}
class videoclient_accountservice extends videoclient
{
var $appId;
var $version = "0.1";
var $key = "ComsenzVideoServic