[reset] reset this project to use the new API using PHP and start building admin tools for easier moderation

This commit is contained in:
Benjamin Sonntag 2026-10-17 13:53:44 +02:00
parent b82dded9c6
commit ce5162b67f
5 changed files with 1875 additions and 151 deletions

2
.gitignore vendored
View file

@ -1,2 +1,4 @@
config.php
pic/
old/
vendor/

View file

@ -1,5 +1,6 @@
{
"require": {
"colorfield/mastodon-api": "^0.1.0"
"aws/aws-sdk-php": "^3.302",
"vazaha-nl/mastodon-api-client": "^2.1"
}
}

1994
composer.lock generated

File diff suppressed because it is too large Load diff

View file

@ -13,3 +13,25 @@ function get_api_client() {
return $mastodonAPI;
}
function get($url) {
global $http,$conf;
$ch=curl_init();
curl_setopt_array(
$ch,
[
/*
CURLOPT_COOKIEFILE => $conf["cookies"],
CURLOPT_COOKIEJAR => $conf["cookies"],
*/
CURLOPT_USERAGENT => "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_TIMEOUT => 10,
]);
$result=curl_exec($ch);
$http=curl_getinfo($ch);
return $result;
}

5
public/index.php Normal file
View file

@ -0,0 +1,5 @@
<?php
echo "here";