I wrote a bot recently that does some actions after it authenticates with an account using puppeteer and it was incredibly easy.
In case you don’t know what puppeteer does, well, it is simply a Node library to control Chromium or Chrome programmatically, now such a library can have many uses but I’ll focus on what you need to know when writing a scrapper/bot.
The first thing to know is what kind of website you are dealing with, it is a traditional website or is more like a SPA type of website? And you need to know that because using the
waitForNavigation is practically useless on SPA websites. View full article
Recently and currently(Laravel 5.6) Laravel is using Bootstrap-4 and they’ve updated all their views accordingly, and when you want to use Laravel’s pagination feature you may have a bit of a problem in the mobile world as there are too many page links to be shown in an esthetic way on a mobile screen.
So you can do a lot of things to resolve this problem but the simplest way available is to change the view which defines the links listening.
First, we need to publish that view, this will force Laravel to use the published view, not the one residing in the app-source/vendor directory.
We do that with the following command:
php artisan vendor:publish --tag=laravel-pagination
You should immediately see after executing the command the following:
View full article
Copied Directory [\vendor\laravel\framework\src\Illuminate\Pagination\resources\views] To [\resources\views\vendor\pagination]
When you want to create a language system and add multiple languages to your Ionic APP you have various designs available, but in a simple APP, there are 2 major ones.
This design is suited when you want to have consistency and implies a bit less work.
The second option is to clone each of your components for every language and make an appropriate file structure.
This design works well when you want to have different functionality and UI depending on the language. View full article
PHPMailer is a popular library for sending emails as the project of the title suggests. In GitHub, the readme file has a nice example of a basic setup, but today I’ll give you a similar simple example using jQuery, Swal( Sweet alert ).
So first this is the PHP script that should respond to an ajax request (for example a file named smail.php):
View full article
// Import PHPMailer classes into the global namespace
// These must be at the top of your script, not inside a function
//Load composer's autoloader
return filter_var($email, FILTER_VALIDATE_EMAIL) !== false;
$name = htmlspecialchars($_POST["name"]);
$email = htmlspecialchars($_POST["email"]);
$msg = htmlspecialchars($_POST["message"]);
$recap = htmlspecialchars($_POST["g-recaptcha-response"]);
$gcapSecret = 'YOUR RECAPTCHA2 SECRET';