Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/255.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用凭据在php中调用Api_Php_Wordpress_Curl_Get_Php Curl - Fatal编程技术网

使用凭据在php中调用Api

使用凭据在php中调用Api,php,wordpress,curl,get,php-curl,Php,Wordpress,Curl,Get,Php Curl,我正在使用上的cURL设置在php中进行API调用 函数调用如下:callAPI($method,$url,$data)。我已经使用('GET','URL',false)API调用使其工作,因此代码确实工作 现在我想调用一个不同的api。我需要提供的数据输入如下: Array ( [Credentials] => Credentials Object ( [Account] => my_account_name

我正在使用上的cURL设置在php中进行API调用

函数调用如下:
callAPI($method,$url,$data)
。我已经使用
('GET','URL',false)
API调用使其工作,因此代码确实工作

现在我想调用一个不同的api。我需要提供的数据输入如下:

Array
(
    [Credentials] => Credentials Object
        (
            [Account] => my_account_name
            [Password] => my_password
        )

)
所以我相信这需要是我的
$data
对象

我是php新手,所以我不知道应该如何设置代码以使这些数据输入能够正常工作

有人能帮我在API调用中如何进行这些输入吗


提前谢谢

使用$data=json\u编码($your\u数组);在将其传递给函数之前,先在该数组上调用另一个api。dest api是什么?称为TabT api,可以在此处找到文档:“”&。它应该连接到vttl数据库,如第二个链接所示,我认为应该连接到“vttl WSDL:”。