A web-based tool designed to interact with game APIs hosted on tbot.xyz. This interface allows users to submit scores and retrieve high score lists for various games on the platform by providing the game URL and score. The tool automatically parses the necessary game name and session data from the provided URL.
- Score Submission: Allows users to submit scores to supported
tbot.xyzgames. - High Score Retrieval: Fetches and displays high score lists (though this functionality is primarily in the PHP service class and not exposed via a separate button in the current UI).
- Automatic Data Extraction: Intelligently parses the game name and required
curData(session/user information) from the full game URL. - Modern User Interface: Features a responsive, dark-themed UI with dynamic elements like a mouse trail effect.
- Configurable Logging: Option to display the full server response for debugging or detailed information.
- Flexible Service Class: The underlying
TbotGameService.phpis designed to be adaptable for different games on thetbot.xyzplatform that share a similar API pattern.
- PHP 8.0 or higher (due to the use of union types and modern features).
- cURL extension for PHP enabled.
- Composer (for managing PHP dependencies, primarily PHPUnit for testing).
- A web server (like Apache or Nginx) configured to serve PHP files. The document root should point to the
public/directory of this project.
-
Clone the repository:
git clone [https://github.com/imnotjavad/GameBotHacks.git](https://github.com/imnotjavad/GameBotHacks.git) cd GameBotHacks(Replace
https://github.com/imnotjavad/GameBotHacks.gitwith your actual repository URL if different) -
Install PHP dependencies:
composer install
This will install PHPUnit, which is listed in your
composer.jsonunderrequire-dev. -
Web Server Configuration:
- Configure your web server (e.g., Apache, Nginx) so that its document root points to the
public/directory of this project. - Ensure your web server is set up to process PHP files.
- Configure your web server (e.g., Apache, Nginx) so that its document root points to the
-
(Optional) Environment Variables:
- Currently, API endpoint details are hardcoded in
src/Service/TbotGameService.php. For more advanced setups or if you plan to make these configurable, you could implement.envfile support. If so, you would:- Copy
.env.example(you'll need to create this file) to.env. - Fill in the necessary environment variables in
.env. - Ensure
vlucas/phpdotenvis added to yourcomposer.jsonif you choose this path.
- Copy
- Currently, API endpoint details are hardcoded in
- Access the
index.phppage through your web browser (e.g.,http://localhost/index.phpor your configured domain). - Full Game URL: Enter the complete URL of the
tbot.xyzgame you want to interact with. This URL must include the hash fragment (#) containing the game and session data.- Example:
https://tbot.xyz/math/#eyJ1Ijo1ODAzNTEwMDE4LCJuIjoiT.....
- Example:
- Score: Enter the numerical score you wish to submit.
- Show Full Server Response Log (Optional): Check this box if you want to see the complete, raw response from the server after submission.
- Click the "Submit Score" button.
- The result of the submission (success or error message, and optionally the server response) will be displayed on the page.
- Click the "Clear Form" button to reset the input fields and any displayed messages.
This project uses PHPUnit for unit testing. The primary tests are for the TbotGameService class.
- Ensure you have run
composer installto install PHPUnit. - From the project root directory, run:
Alternatively, you can run PHPUnit directly:
composer testNote: The current./vendor/bin/phpunit
TbotGameServiceTest.phpprovides a basic test for the constructor. More comprehensive tests, especially for methods making cURL requests (which would require mocking), should be added for better coverage.
- This tool interacts with API endpoints of
tbot.xyzthat have been identified through client-side analysis of the games. These are likely unofficial endpoints. - The functionality of this tool is dependent on the current state of the
tbot.xyzAPI. If the API changes, this tool may cease to function correctly or at all. - Use this tool responsibly and at your own risk. Always respect the terms of service of
tbot.xyzand any games hosted on it. - This project is provided for educational and experimental purposes. The developers/contributors are not responsible for any misuse or any consequences arising from the use of this tool.
- The cURL options
CURLOPT_SSL_VERIFYPEERandCURLOPT_SSL_VERIFYHOSTare currently set tofalseinTbotGameService.php. This is a security risk and should ONLY be used for local development and debugging if you are experiencing SSL certificate issues. For any production or public-facing deployment, these options MUST be set totrueor removed (astrueis the default forCURLOPT_SSL_VERIFYPEER).
This project is licensed under the MIT License. Please see the LICENSE file for more details.
(You should create a LICENSE file in your repository and paste the text of the MIT License into it.)
If you'd like to contribute to this project, please feel free to fork the repository, make your changes, and submit a pull request. For major changes, please open an issue first to discuss what you would like to change.