Get xml from a http://www. not current directory?

What i’m wondering is if there’s any way to get xml file data from a -> xmlhttp.open(“GET”,“http://www.website.com/file.xml”,false);
than xmlhttp.open(“GET”,“file.xml”,false); ?

I got it to work by making everything in php.
I called the xml data through php not html and javascript and it all works.
Only thing i need to find out no is how to display top 10 results of xml.

Thanks for help.

AJAX has same domain restrictions for security reasons.

Maybe you can do something server-side? Maybe using CURL?

The current code is

xmlhttp.open("GET","http://www.mysite.com/xml/file.xml",false);
xmlhttp.send();

and it works, but when i enter

xmlhttp.open("GET","http://www.someothersite.com/directoryxxx/file.xml",false);
xmlhttp.send();

it doesnt show any content.
Can anyone please help, on this or is it possible to show content from xml content from different location other than local?

Yes, i’m using php and the allow_url_fopen is enabled.

What are you using server side, PHP?

If so, and if the allow_url_fopen settng is enabled you should have a few options.

*note: - to find out you can run

<?php
phpinfo();
?>

thanks for answering. Restrictions might explain but, i have no idea on how to use CURL for that. I googled but it’s still confusing.