Skip to content
This repository has been archived by the owner on Jun 23, 2020. It is now read-only.

Latest commit

 

History

History
57 lines (46 loc) · 2.04 KB

README.md

File metadata and controls

57 lines (46 loc) · 2.04 KB

SAHPrikbordDenyPHP

This script automatically logs in on SAH3 through the SAHAPI. After it successfully logged in it goes to your bulletin board and searches for unaswered ones. Once it finds an unanswered item it will deny that item.

Within the newest version you can get a push notification of items that are in the list you can define yourself!

Running the script

You should run the file called main.php, this will start the script. I tested this with PHP 5.6 and PHP 7.1. If it doesn't work for your version let me know with the specific error.

The following variables can or have to be modified.

Time between checks

This is the time (in seconds) it will wait before it checks the bulletin board.

$timeBetweenChecks = 300;

Credentials

Username is the email you got from studentaanhuis. Password is the password which you use to login on SAH3 not the webmail.

$username = "@studentaanhuis.nl";
$password = "";

Encoding

You can encode your password with an base64 encoding, by doing so you can show or open the file without having to worry that someone can see your password.

$passBase64Encoded = false;

Push notification

Push notifications will be done through http://pushbullet.com

Citynames is an array which contains the names for the cities you want to get a push notification of. $receivePushNotification can be true or false to determine if you want to receive push notifications or not.

$cityNames = ["Amsterdam", "Utrecht", "Groningen", "Eindhoven"];
$receivePushNotification = false;

Pushbullet

You can acquire an access token at the website of pushbullet. This will send a push notification to every device linked to your account.

$pushBulletAccessToken = "o";

Debugging

This variable can be true or false. If this is set to true it will show pretty much every step it takes. This will not be logged to a file, this is your own responsibility.

$debug = false;

Problems?

You can email me at [email protected]