Jump to content

need help with loading/reading remote xml with authentication


dylanm

Recommended Posts

Hello  all,

I am trying to read a remote xml file on a file server which requires username and password. I can access the xml file fine through HTTP authentication like

 

\\111.11.11.111\\pdrs\fileserver\FullText\12345\12345_CLEANUP.xml

 

But when i try to read it with PHP, I recieved a warning message:

"Warning: simplexml_load_file() [function.simplexml-load-file]: I/O warning : failed to load external entity"

 

allow_url_fopen is ON

This is part of my code.

 

       

$test=rawurldecode("http://username:password@\\\\111.11.11.111\\pdrs\\fileserver\\" . $number . "\\FullText\\" .  $number  . "_CLEANUP.xml");
echo $test;	
$xml_filename = simplexml_load_file(rawurldecode("($test)"));

echo $xml_filename;
print_r($xml_filename);

 

Am I missing something here? Is there any other way to read/save/load a remote xml file which requires authentications? I am new to php so any help is appreciated!

Thanks,

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.