<pre>
<?php
$userGuid = "8f65f01f-c6bc-42a4-914d-879efd159abd";
$apiKey = "private";
// Issues a query request to import.io
function query($connectorGuid, $input, $userGuid, $apiKey) {
$url = "https://query.import.io/store/connector/" . $connectorGuid . "/_query?_user=" . urlencode($userGuid) . "&_apikey=" . urlencode($apiKey);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Content-Type: application/json",
"import-io-client: import.io PHP client",
"import-io-client-version: 2.0.0"
));
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(array("input" => $input)));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
$result = curl_exec($ch);
curl_close($ch);
return json_decode($result);
}
// Query for tile Curs Banca Comerciala Feroviara
$result = query("7d00ba0e-947c-403f-b33b-886a7ee2a300", array(
"webpage/url" => "http://www.bfer.ro/ro/curs-valutar/",
), $userGuid, $apiKey, false);
var_dump($result);
?>
答案 0 :(得分:8)
答案 1 :(得分:0)
不确定,但这就是我的想法。我认为connectorGuid是用于创建web api链接的随机密钥。
apiKey显然是api键
userGuid再次是一些记录的识别
所有网络apis都不一样,所以你无法获得任何网站的api详细信息