Link to home
Start Free TrialLog in
Avatar of admin_mjschiff
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.
Avatar of Roonaan
Roonaan
Flag of Netherlands image

You can use ofcourse the curl_init() etc functions.

An alternative might however be to use:

$xml = file_get_contents('https://username@root.net/people/THEIRUSERNAME/module/dlraw?end=YYYY-MM-DD');

-r-
ASKER CERTIFIED SOLUTION
Avatar of anilande
anilande

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial