Is it advisable to reach out to Tradedoubler for assistance in resolving the issue with the XML file when using file_get_contents in PHP?
The issue with using file_get_contents in PHP to retrieve an XML file from Tradedoubler may be due to authentication requirements or server configurations. It is advisable to first check the Tradedoubler API documentation for any specific requirements and troubleshoot the issue on your end before reaching out to Tradedoubler for assistance.
$url = 'https://api.tradedoubler.com/1.0/reports/transactions.xml';
$username = 'your_username';
$password = 'your_password';
$context = stream_context_create([
'http' => [
'header' => "Authorization: Basic " . base64_encode("$username:$password")
]
]);
$xml = file_get_contents($url, false, $context);
// Process the XML content here