reading xml content from a url

i have a url

and  it has xml content

i want to read this xml content usign php

can any one please help me out

Thank you

LVL 13
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You can just use:

$xml = file_get_contents('');

srikanthmadishettiAuthor Commented:
$xml = file_get_contents('');

iam tryign to read like this it throws errors

thatz the url from where i need to read the xml content and i want the seperated content
What kind of errors. The url seems to work for me.

Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

If you look in the PHP manual it notes -

Tip: You can use a URL as a filename with this function if the fopen wrappers have been enabled.

The feature to enable/disable this is this one -

allow_url_fopen boolean
  This option enables the URL-aware fopen wrappers that enable accessing URL
   object like files. Default wrappers are provided for the access of remote files
  using the ftp or http protocol, some extensions like zlib may register additional

However, fopen wrappers can be a security risk and can be disabled by security conscious admins, especially on shared hostng.  Check it is not enabled.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
srikanthmadishettiAuthor Commented:
Warning: file_get_contents(): php_network_getaddresses: gethostbyname failed in D:\guenstig\guenstig1\gunxml.php on line 4

Warning: file_get_contents( failed to open stream: No such file or directory in D:\guenstig\guenstig1\gunxml.php on line 4

this is the error it gives to me
srikanthmadishettiAuthor Commented:
i kept the allow_url_fopen- on in php.ini file but still i get the same error.

srikanthmadishettiAuthor Commented:
but i want to know after reading the file using file_get_contents how can i get the seperated content like we have starting tag ending tags <itmes></itmes> so i want all the contents of this xml contents
Hello ,

Use CURL instaed of fopen to read the URL.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.