rest コマンドを使用して特定の情報を取得できます。(ブラウザーに) 表示されるデータは既に XML です。情報を取得した後、サーバー上の XML ファイルに保存するにはどうすればよいですか。
$dom-save コマンドで既に試しましたが、何か間違っているようです。どんな助けでも大歓迎です。コードについては以下を参照してください ($response を XML に保存したいです。)
<?php
require_once 'includes/rest_connector.php';
require_once 'includes/session.php';
// check to see if we start a new session or maintain the current one
checksession();
$rest = new RESTConnector();
$url = "/api/tax_codes/0/";
$rest->createRequest($url,"GET", null, $_SESSION['cookies'][0]);
$rest->sendRequest();
$response = $rest->getResponse();
$error = $rest->getException();
// save our session cookies
if ($_SESSION['cookies']==null)
$_SESSION['cookies'] = $rest->getCookies();
// display any error message
if ($error!=null)
echo $error;
// display the response
if ($response!=null)
echo $response;
else
echo "There was no response.";
?>