Ruby script for sending mail

Ever wanted to send mails using ruby script? Use the one below :

Note: You need ruby installed on the server.

Read More

PHP script to send mails

You may use the below script to test whether mail function via PHP script is working well in the server.

Read More

Monitoring the availability of your site using PHP script

You might have subscribed for costly monitoring services, however, the following script will help you to keep a track of your site’s availability. Create file /usr/sbin/monitor.php with the following contents.

Add this line in your Linux /etc/crontab or via cpanel to monitor eg: every 3 minutes

Temporary connection issues or high load in […]

Read More

Frame forwarding using HTML script

Frame forwarding means that the visitors of your website are automatically redirected to another site, but the address in their browser’s address bar remains the same (i.e. it does not change to the address of the site that the visitors have been redirected to). Frame forwarding adds an invisible border to your website so only […]

Read More

DDOS-Blocking attacking IPs

Use the below script to block IP addresses making too many connections.

Sometimes, the Massive Ddos attacks cannot be stopped using CSF firewall due to heavy connections in small time period. In such cases, you need to “grep” the Attacking pattern from Domlogs and then block it via IPtables using the following script.

[…]

Read More

Bandwidth usage of a domain

You can find the Bandwidth usage in cPanel servers using the script given below.

Eg:-

The output will be like given below.

This means the bandwidth usage is around 6 GB.

Read More