This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| bmlt2csv.php | |
| This file converts a JSON BMLT GetSearchResults query to a CSV | |
| To use run `php bmlt2csv.php` or place on your webserver and | |
| specify a query param with a url encoded bmlt query url. | |
| https://domain.com/bmlt2csv.php?query=https%3A%2F%2Flatest.aws.bmlt.app%2Fmain_server%2Fclient_interface%2Fjson%2F%3Fswitcher%3DGetSearchResults%26services%3D1010%26weekdays%3D2 | |
| */ | |
| $cli_query = null; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| bmlt2kml.php | |
| This file converts a JSON BMLT GetSearchResults query to KML | |
| To use run `php bmlt2kml.php` or place on your webserver and | |
| specify a query param with a url encoded bmlt query url. | |
| https://domain.com/bmlt2kml.php?query=https%3A%2F%2Flatest.aws.bmlt.app%2Fmain_server%2Fclient_interface%2Fjson%2F%3Fswitcher%3DGetSearchResults%26services%3D1010%26weekdays%3D2 | |
| */ | |
| $cli_query = null; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $timezones_array = DateTimeZone::listIdentifiers(); | |
| foreach ($timezones_array as $tzItem) { | |
| echo $tzItem . "\n"; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $ret = null; | |
| $uri = 'https://latest.aws.bmlt.app/main_server/client_interface/json/?switcher=GetServerInfo'; | |
| $data = file_get_contents($uri); | |
| if ($data) { | |
| $ret = array(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| {"id":"133","name":"NA Italia","rootURL":"https://na-italia.info/main_server/"}, | |
| {"id":"134","name":"New England","rootURL":"https://www.nerna.org/main_server/"}, | |
| {"id":"135","name":"Show-Me Region","rootURL":"https://missourina.org/main_server/"}, | |
| {"id":"136","name":"NA Denmark","rootURL":"https://www.nadanmark.dk/main_server/"}, | |
| {"id":"139","name":"Gyro Zonal Forum","rootURL":"https://gyro.sezf.org/main_server/"} | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import hashlib | |
| def get_hash(file): | |
| ''' | |
| Return sha256 hash of file | |
| ''' | |
| sha256_hash = hashlib.sha256() | |
| with open(file,"rb") as f: | |
| for byte_block in iter(lambda: f.read(4096),b""): | |
| sha256_hash.update(byte_block) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import json, urllib3 | |
| def get(url): | |
| return json.loads(urllib3.PoolManager().request("GET", url, headers={'User-Agent': 'Mozilla/5.0 Firefox/105.0'}).data.decode()) | |
| max_length = [] | |
| for root_server in get('https://raw.githubusercontent.com/bmlt-enabled/tomato/master/rootServerList.json'): | |
| for meeting in get(root_server['rootURL'] + '/client_interface/json/?switcher=GetSearchResults'): | |
| max_length.append(max(len(x) for x in meeting.values())) | |
| max_length.sort() | |
| print(max_length[-1]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $jft_url = 'https://spadna.org'; | |
| libxml_use_internal_errors(true); | |
| $url = get($jft_url); | |
| libxml_clear_errors(); | |
| libxml_use_internal_errors(false); | |
| $d = new DOMDocument(); | |
| $d->validateOnParse = true; | |
| $d->loadHTML($url); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [{"id":"147","name":"Greater Illinois Region","rootURL":"https://girbmlt.org/main_server/"},{"id":"154","name":"Indiana Region","rootURL":"https://dev.naindiana.org/wp/main_server/"}] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $root_server = "https://bmlt.wszf.org/main_server"; | |
| $bmlt_login_id = ""; | |
| $bmlt_login_password = ""; | |
| $login_string = "$root_server/local_server/server_admin/json.php?c_comdef_admin_login=$bmlt_login_id&c_comdef_admin_password=$bmlt_login_password&admin_action=login"; | |
| $login = get($login_string); | |
| echo $login . "\n"; | |
| $get_perms = get("$root_server/local_server/server_admin/json.php?admin_action=get_permissions"); |