我正在尝试将炼金术 api 集成到我的 php 项目中。几天前一切正常,但现在我在我的程序中调用的其余 api 端点http://access.alchemyapi.com/给出了错误404 not found 请如果有人能告诉它为什么给出这个错误。以下是我调用其余 api 的代码片段
<?php
class AlchemyAPI {
private $_api_key;
private $_ENDPOINTS;
private $_BASE_URL = 'http://access.alchemyapi.com/calls';
*/
public function AlchemyAPI() {
//Load the API Key from api_key.txt
$key = trim(file_get_contents("api_key.txt"));
$this->_api_key = $key;
//Initialize the API Endpoints
$this->_ENDPOINTS['sentiment']['url'] = '/url/URLGetTextSentiment';
$this->_ENDPOINTS['sentiment']['text'] = ' /text/TextGetTextSentiment';
$this->_ENDPOINTS['sentiment']['html'] = '/html/HTMLGetTextSentiment';
/* 其余代码 */ ?>