PHP code example of millsoft / aceproject

1. Go to this page and download the library: Download millsoft/aceproject library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

millsoft / aceproject example snippets


    
     use Millsoft\AceProject\AceProject;
    use Millsoft\AceProject\Project;
    
    $ace_username = "myusername or email";
    $ace_subdomain = "mysubdomain";
    $ace_password = "mypassword";
    
    AceProject::login($ace_username, $ace_password, $ace_subdomain);
    
    $projects = Project::GetProjects();
    $errors = AceProject::getLastError();
    
    if (!empty($errors)) {
        //some error occured:
        print_r($errors);
        die();
    }
    
    foreach ($projects as $project) {
        echo $project->PROJECT_ID . "\t" . $project->PROJECT_NAME . "\n";
    }