admin_mjschiff
asked on
Curl and PHP- Need a php script to execute simple get for xml data
I am trying to use PHP to excecute a curl command to get xml data from my root vault, The documentation for the curl command is here: http://vaults.root.net/api/docs
Something like this:
download everything ending on a given date:
curl -k -u YOURUSERNAME "https://root.net/people/THEIRUSERNAME/module/dlraw?end=YYYY-MM-DD"
I need the PHP script to excecute this function. Also I am looking for a way to format my XML data using the DOM module so I can format with css and html etc.
Something like this:
download everything ending on a given date:
curl -k -u YOURUSERNAME "https://root.net/people/THEIRUSERNAME/module/dlraw?end=YYYY-MM-DD"
I need the PHP script to excecute this function. Also I am looking for a way to format my XML data using the DOM module so I can format with css and html etc.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
An alternative might however be to use:
$xml = file_get_contents('https://username@root.net/people/THEIRUSERNAME/module/dlraw?end=YYYY-MM-DD');
-r-