Ideal Use Cases?
FileLoader is perfect for PHP projects of any size that benefit from cleaner, more organized code. Itβs especially useful in large projects with many file dependencies, where loaded files control and custom error handling can be very beneficial
FileLoader is perfect for PHP projects of any size that benefit from cleaner, more organized code. Itβs especially useful in large projects with many file dependencies, where loaded files control and custom error handling can be very beneficial
How to use?
In this example, spl_autoload_register registers an anonymous function that will be executed every time you try to use a class that has not yet been defined. The anonymous function will include the file that matches the class name (assuming that each class has its own file and that the file name matches the class name) :[
spl_autoload_register(function ($class_name) {
include $class_name . '.php';
});
# here you can now use your class without the need to include it manually
FileLoader::load('./path.php');In this example, spl_autoload_register registers an anonymous function that will be executed every time you try to use a class that has not yet been defined. The anonymous function will include the file that matches the class name (assuming that each class has its own file and that the file name matches the class name) :[
π€―4
Therefore, you can use FileLoader without having to include it manually.PHP will automatically call the anonymous function to include FileLoader.php when you use the FileLoader.php class
shit code (that really saves the day)
How to use? spl_autoload_register(function ($class_name) { include $class_name . '.php'; }); # here you can now use your class without the need to include it manually FileLoader::load('./path.php'); In this example, spl_autoload_register registers anβ¦
gyatt, its very helpful for checker maker, you gave me an idea
β€4
well thank you all for watching, share the channel for more shitty codes π«‘
π3
api.php
1.3 KB
PHP script that generates real addresses for different countries using the FakeXy API.
download guzzle library
(in case you are going to use it for bot)
download guzzle library
composer require guzzlehttp/guzzle
$countryCodes = ['ar', 'au', 'bd', 'be', 'br', 'ca', 'cn', 'cz', 'fr', 'de', 'gr', 'hu', 'in', 'id', 'ir', 'it', 'jp', 'my', 'mx', 'np', 'nl', 'ng', 'pe', 'ph', 'pl', 'pt', 'ro', 'ru', 'sa', 'sg', 'za', 'kr', 'es', 'se', 'th', 'tr', 'ug', 'ua', 'gb', 'us', 'vn'];
(in case you are going to use it for bot)
like if you want me to do it in python
π4
image_2024-07-12_13-14-29.png
4.5 KB
to be honest, my php files are fucked up, so I disabled the ssl certification in this line, if you get any error related to the ssl certification, leave it as default
, any other error consult my dm @AveragePacket
$client = new Client();
, any other error consult my dm @AveragePacket
π4
Forwarded from ππ$π _
google.zip
4.9 KB
GoogleQuery search and Shopify Checker webhook
Author: devblack
Author: devblack
π₯7
shit code (that really saves the day) pinned Β«https://github.com/devblack/curlx Feel free to contribute to this repository πΒ»
β€2
brandescard.zip
1.3 KB
Brandescard Balance Checker
you need a capsolver key to skip the captcha