Category Archives: Uncategorized

Merge Two Redis Databases via PHP

Simple PHP script I used to merge two Redis databases. In short, the PHP script adds all redis-1 database (0) data to redis-2 database (0). The PHP script first retrieves all keys->values from redis-1 database (0) and then it adds via set() all keys->values to redis-2 database (0). // Connect to Redis Database 1   […]

How to Connect to Redis Database via PHP

First make sure to install PHP extension for Redis: https://github.com/phpredis/phpredis On Debian-like OS you can install it this way: apt-get install php7.0-redisapt-get install php7.0-redis Then you can connect to Redis via PHP this way: $redis = new Redis();   try { $connected = $redis->connect(‘127.0.0.1’, 6379, 1); } catch(Exception $e) { echo "Failed to connect to […]

PHP Shell_Exec() Get Complete Output as String

With PHP you can use shell_exec() to execute a command via shell and return the complete output as a string, here si a quick example to do so: $output = shell_exec(‘ls -lart’);$output = shell_exec(‘ls -lart’); However some commands like “gunzip -t” may show empty results. To fix that, just add 2>&1 to the end of […]

SMS messages from 1-410-200-500 are a scam

There is a new wave of fraudulent SMS sent from 1-410-200-500 to users located mainly in India, USA and EU. The fraudulent SMS messages contain a malicious URL that redirects users to a fraudulent website used to steal your personal information and credit card, make sure you never click on the link and do not […]

“Google FREE Apple iPhone X Visitor Browser Opinion Survey” Scam

If you got an email with a subject like “Google FREE Apple iPhone X Visitor Browser Opinion” beware that it is a scam! Do not participate in the survey, it is a fraudulent website that push you to purchase other products so the online scammers are paid for each purchase you make. This is the […]

Email addresses associated with suspicious online shops

Here is a list of email addresses associated with suspicious and potentially fraudulent online shopping websites that sell counterfeit products or that just get your money without sending you anything. Most of these shopping sites are operated by people located in China. wholesalenewhat@gmail.com support1@webmicroshop.com anweiler@discontseason.com surpport@cctmalls.com livechat.kc@gmail.com service@ezvmall.com system@ezvmall.com bag@list-customs-service.com service.negozio.italian@gmail.com service@mx2.commerce-line.info alex@promt-reply.com nina@promotion-town.com alex@promt-reply.com […]

Suspicious online shops from helpandserving@gmail.com

Looks like the email helpandserving@gmail.com is associated to thousands of online shopping websites created with Shopify that sell mostly anything, from hair wigs, to drones and other tech goods. But are these websites safe? From my own personal point of view, I would say they are suspicious and I would not buy anything from them. […]

Cannot modify header information – headers already sent

Here you will find various solutions to fix this PHP error message: Cannot modify header information – headers already sentCannot modify header information – headers already sent Solution 1 – UTF-8 without BOM Make sure the file encoding format of all PHP files is UTF-8 without BOM. You can use Notepad++ to convert the encoding […]

Send Transactional Email with SendGrid in PHP

SendGrid is the most popular transactional email service with a FREE plan: Email Delivery Service | SendGrid You can download the official SendGrid PHP library here: https://github.com/sendgrid/sendgrid-php Here is a simple function used to send an email: function sendgrid_send($from_name, $from_email, $to_email, $subject, $content_html) { require "path/to/sendgrid-php/sendgrid-php.php"; $from = new SendGrid\Email($from_name, $from_email); $to = new SendGrid\Email("", […]

Send Email with PHPMailer using SMTP

PHPMailer is the most popular PHP email sending library: https://github.com/PHPMailer/PHPMailer Here is a simple function used to send an email using SMTP: function phpmailer_send($subject, $from_name, $from_email, $message, $to) { require_once ‘path/to/php-mailer/PHPMailerAutoload.php’; $mail = new PHPMailer(); $mail->IsSMTP(); $mail->SMTPAuth = true; $mail->SMTPDebug = 0; $mail->SMTPSecure = "ssl";   // Example ssl0.ovh.net $mail->Host = "YOUR_SMTP_HOST_ADDRESS";   $mail->Port = […]