httpful を使用して http リクエストを送信し、request.php に表示するレスポンスを取得します。
include('httpful.phar');
$response = \Httpful\Request::get('http://domain/response.php')->send();
echo '<textarea rows="20" cols="100">';
echo $response;
echo '</textarea>';
response.php では、ヘッダーを使用してリクエストを別のページにリダイレクトしていますが、期待どおりの応答が得られません。
header("HTTP/1.1 301 Moved Permanently");
header("Location:http://otherdomain/other_response.php");
echo 'internal response page'
私も試してみました
header("HTTP/1.1 302 Found");
しかし、それでも「内部応答ページ」という応答しか得られません
リクエストをother_response.phpにリダイレクト/転送する正しい方法は何ですか?