Miscellaneous

Miscellaneous Article

Auto Restart MySQL When It Crashes Ubuntu 18.04

Good Day, long enough not blogging on this site. This is my problem when I’m moving some websites into my cloud servers. Sometimes when my traffic going very high MySQL server crashes and I need to run it manually or reboot my server. This is really bad for SEO because my servers uptime will changed.

I am googling about this problem to find solution for resolve this issue and finally I found one is working for me.  Here is the steps you need to follow :

Read More »Auto Restart MySQL When It Crashes Ubuntu 18.04

PHP: How To Create Copyright Watermark On Your Images

This is happen 3 days ago when my friend asking for converting him .htaccess into lighttpd rewrite rules format. After conversion done he wanted to share this script to everyone. If you’re professional Fotographer or just blogger, you may wanted to copyright all your photos/images. Even we know, sometimes people like to share for having fun…. but some people need a copyright to protected his original works before someone copy it. If you’re doing this manually it will take a long time and of course you will bored before this done. In short time we can make a simple watermark to protected our images.

Requirements:

  1. Apache with mod_rewrite / lighttpd (just convert rewrite rules, it should work)
  2. PHP with GD library (check in your phpconfig or asking your webhosting)

Step one.

Prepare one images that you should used as watermark.Â? This images should be in .PNG format, you can created one using photoshop software to make transparant effect.

Step two.

Make new or open your .htaccess files and write down this code inside it:

RewriteEngine On
RewriteRule ^(.+)\.jpg$ wrapper.php?image=$1\.jpg [L]
RewriteRule ^(.+)\.gif$ wrapper.php?image=$1\.gif [L]
RewriteRule ^(.+)\.png$ wrapper.php?image=$1\.png [L]
RewriteRule ^(.+)\.bmp$ wrapper.php?image=$1\.bmp [L]

For Lighttpd users try to using this conversion, if you meet any problem just following your path and symbol :

url.rewrite-once = (
“^\(.*).jpg” => “/wrapper.php?image=$1.jpg”,
“^\(.*).gif” => “/wrapper.php?image=$1.gif”,
“^\(.*).png” => “/wrapper.php?image=$1.png”,
“^\(.*).bmp” => “/wrapper.php?image=$1.bmp”
)

Step three.

Create wrapper.php files and put code below inside it:

<?php
$watermark = “watermark.png”;
$image = $_GET[“image”];

if (empty($image)) die();

if (!file_exists($image)) {
header(“404 Not Found”);
echo “File Not Found.”; die();
}
Read More »PHP: How To Create Copyright Watermark On Your Images

RELATED SEARCH TERMS:

How To: Created 2 Way SMS Gateway With NowSMS and PHP

I believe this topic is good for application developers. In this short article we will learn how to created SMS gateway and applied it on worldwide-web using PHP script. What is SMS? SMS stands for short message service. It’s the text communication service component of phone or mobile communication systems, using standardized communications protocols that allow the exchange of short text messages between fixed line or mobile phone devices… more details about SMS please read in wikipedia. I already written about how to build SMS gateway on my “Bahasa Indonesia” blog, but many people give negative comment on that article… Read More »How To: Created 2 Way SMS Gateway With NowSMS and PHP

PHP:Catching keyword from search engine

Good day everyone, In this article we will learn how to catch information from “HTTP_REFERER” function such as, referer info, keyword info, etc. From some search engine using PHP snippet. This script might usefully when you want to analyze your keyword and referer statistic. Last night I was searching in WP plugin for this script but I didn’t found one really good.

So let’s created it our self, First, You need this PHP class save it as searchkeys.class.php

<?php

class search_keywords
{
var $referer;

var $search_engine;

var $keys;

var $sep;

function search_keywords()
{
$this->referer = ”;
$this->sep = ”;

if ($_SERVER[‘HTTP_REFERER’] OR $_ENV[‘HTTP_REFERER’])
{
$this->referer = urldecode(($_SERVER[‘HTTP_REFERER’] ? $_SERVER[‘HTTP_REFERER’] : $_ENV[‘HTTP_REFERER’]));
$this->sep = (eregi(‘(\?q=|\?qt=|\?p=)’, $this->referer)) ? ‘\?’ : ‘\&’;
}
}

function get_keys()
{
if (!empty($this->referer))
{
if (eregi(‘www\.google’, $this->referer))
{
// Google
preg_match(“#{$this->sep}q=(.*?)\&#si”, $this->referer, $this->keys);
$this->search_engine = ‘Google’;
}
else if (eregi(‘(yahoo\.com|search\.yahoo)’, $this->referer))
{
// Yahoo
preg_match(“#{$this->sep}p=(.*?)\&#si”, $this->referer, $this->keys);
$this->search_engine = ‘Yahoo’;
}
else if (eregi(‘search\.msn’, $this->referer))
{
Read More »PHP:Catching keyword from search engine

RELATED SEARCH TERMS:

PHP:Creating Random Ads

Hello Everyone, I’m back again ho ho ho 😛 This time I will write tutorial on “how to make random ads” using php and text as database. This idea comes from gmail interface my lovely free mail account! pfffftt yea .. yea.. we all know gmail are better than ymail *lol* 😛 Alright leave them fight alone *not our business* before we start to make random ads we have to understand why we should make random ads? if we can fill those ads space with permanent ads. Most of people are bored about ads and ads on all website. Dilemma!… Read More »PHP:Creating Random Ads

ARP Spoofing: Genius code from China Series 2, Microsoft.vbs Microsoft.bat Microsoft.pif

D**n those f***ing China! *joke* 😛 This is new variant for Microsoft.vbs virus which I write formula how to clean it around a month ago when it hit my cybercafe until totally broken he he… Now most people know this virus as ARP virus. Why? Because after learning it more deeply this virus categorized as HIGH RISK and should removed as soon as possible before it infected total your network. First.. To know this virus is active on your computer is you will get most error pages message when browsing, or error when using messenger, PLUS you will find this… Read More »ARP Spoofing: Genius code from China Series 2, Microsoft.vbs Microsoft.bat Microsoft.pif

Remove W32/ALMAN Virus

Computer virus again.. Today my Laptop and PC got infected by W32/ALMAN. All I can say this virus is smart and not easy to killed It’s cannot stopped by just view in background process, in services, and startup list. This virus will make 2 master source files on %SystemRoot%\System32 first wmdrtc32.dll (40 KB) and wmdrtc32.dl_ (26,5 KB) Once it active it will injected code to any executable files and infected it. If you got message box with message “There is no disk blabla” or you cannot run any executable files you should check on your system files about those 2… Read More »Remove W32/ALMAN Virus

Better Internet Connection for Indonesian People?!

Finally!? Indonesian people have better internet connection Better? Really? With 1021 Kb Downstream /128 Kb Upstream it’s giving better experience for Indonesian user to explore the internet. Anyway this speed only for local connection *LOL* when I tested in going connection out it’s limited to 384 Kb down/ 64 Kb upstream. This change happen in my city after I emailed telkom in their support and I was lucky my “hot” email got reading by DIVRE people ha ha .. 😀 They send people to my home for confirmation and I complained about speed I got is to low for this… Read More »Better Internet Connection for Indonesian People?!

Please stop spam my blog!

Can you guys stop spam my blog?! Please leave useful comment only do not link to other/p**n site which have totally different content as my topic! if you’re looking for backlink I’m not giving free service in here. Try spamming in other site not in here!! RELATED SEARCH TERMS:stop spamstop spamspammingstop the spamspammingstop the spamstopstopspamspamspam stopspam stop