public static function request($url, $method, $data) {
$req = \Fuel\Core\Request::forge("http://www.domain.com/path/to/api/".$url, 'curl');
$req->set_mime_type('json');
$req->set_method($method);
if(!is_array($data)) {
//Exception code
}
$req->set_params($data);
return $req;
}
public static function isLoggedIn() {
$r = static::request("sess", "get", array())->execute()->response()->body();
if($r["result"] == 1)
return true;
return false;
}
It looks like you're new here. If you want to get involved, click one of these buttons!