Send and request data using Sitemagic CMS

Sending and requesting data using HTTP calls or web services is a common task in many web applications. Sending and requesting data through POST and GET requests is possible using the SMRequest class.
// Example of requesting data from another website
$data = SMRequest::Get("http://domain.com/feed/TvChannels.xml");

// Example of sending data to another website (create a new user account)
$data = new SMKeyValueCollection();
$data["mail"] = "casper@domain.com";
$data["username"] = "Casper";
$response = SMRequest::Post("http://domain.com/signup.php", $data);