Category Archives: Web Tips

Split domain name into sld and tld – php script

A series of alphanumeric strings that are separated by periods, such as www.shariarbd.com, that is an address of a computer network connection and that identifies the owner of the address.

Also, Domain names are used to identify one or more IP addresses. For example, the domain name facebook.com represents about a dozen IP addresses. Domain names are used in URLs to identify particular Web pages. For example, in the URL http://www.hotmobiapp.com/index.html, the domain name is hotmobiapp.com.

What is SLD

SLD (Second-Level Domain): A second-level domain (SLD) is the portion of a URL (Uniform Resource Locator)  that identifies the specific and unique administrative owner associated with an IP address (Internet Protocol address). The second-level domain name includes the top-level domain (top-level domain) name. For example, in: hotmobiapp.com

"hotmobiapp" is a second-level domain. "hotmobiapp.com" is a second-level domain name (and includes the top-level domain name of "com"). Second-level domains can be divided into further domain levels. These subdomains sometimes represent different computer servers within different departments.

What is TLD

TLD (Top Level Domain): A top-level domain (TLD) is one of the domains at the highest level in the hierarchical Domain Name System of the Internet.  The top-level domain names are installed in the root zone of the name space. For all domains in lower levels, it is the last part of the domain name, that is, the last label of a fully qualified domain name. For example, in the domain name www.hotmobiapp.com, the top-level domain is .com

Well, then what was index.html? or some time /someting/blog.php ? Well, after a domain name, others are either file name or directory name.

Well, Now we know about Domain Name, SLD and TLD. And now, we will see how to split a domain name into SLD and TLD Continue reading Split domain name into sld and tld – php script

How to recover WP password installed on localhost

I was looking for how to recover WordPress password installed on localhost. I got a way to recover, You may like it. Well, let us know how to do that. First go to phpMyadmin and create another database. Copy a fresh copy of WordPress installation file on your htdocs and install another WordPress on your localhost. Remember the password used to the new WordPress installation as we will use it.

WP Admin Wrong Password
WP Admin Wrong Password

Again go to the phpMyadmin to access the your database.  Open the database that you created to install WordPress last time. Now open the wp_users table export it as sql file. We will replace this table to the database used for the old WordPress. Well, now open the old database used on the old WordPress and also open the wp_users table. Now drop(delete) the wp_users table from the old database. Now Import the wp_users table what you imported earlier form the new WordPress installation database. Now go to the wp-admin area for the old WordPress on your browser and use the same username and password what you used to install the new WordPress installation. Hope you got the idea. There is another way and I will let you know about that later...

Translate English to Bangla with Google Translate

Now you can Translate Bangla (Bengali) with Google Translate. Oh, I was wandering about that and now it is appear! See the image below-

Google Bangla to English or English to Bagnla Translator
Google Bangla to English or English to Bagnla Translator

Now Google offer the Alpha edition and hope they will offer the Beta edition. I wrote on Google Translator as "Hi! How are you? " and following has come "হাই! কেমন আছ তুমি?". There are some problem on the English to Bengali translation or  Bengali to English translation as its still under development. I mean the Bangali to English or English  to Bangla is not yet completed. But as Dictionary You may use Google Translator Because it is almost totally ready to translate single word.  So what are you waiting for? Go for Translate English to Bangla with Google Translate  and check it out at Google Translate.

How to add Google Search with WordPress Search

Hi every body! Today, I will inform how to mix Google (Adsense or normal) Search with WordPress search! Well, to do this, you need to have a little coding knowledge. And I believe that you will do it. So, let's start:...

Add Google Search with WordPress

First I will show you how to make a Google Search box. You will find a lot of widgets to attach Google search engine  on your site. But the following will help you to make a search form for both your site and Google search. I mean the search result will be your site contain or other and it will selected by your site user. Well , let's see

Google Search Form:
Both Site Search and Google Search

<form action="http://www.google.com/search" method="get">
<input maxlength="100" name="q" size="31" type="text" />
<input type="submit" value=" Google Search " />
<input name="sitesearch" type="radio" /> Web Search
<input checked="checked" name="sitesearch" type="radio" value="shariarbd.com" /> Shariarbd.com
</form>

The above code will make a simple Google  Search Form. It will display the result on  Google and I looks like the search box on the right site bar of this site. You can copy the search for on your sidebar of WordPress with the text widget. One thing, Replace the Shariarbd.com from the form code otherwise it will show my sites results!

Now, I  will show how to attach Google Adsense Search box with all options what contain the above search form. Follow the code below:

Google Search Form with Google Adsense

<form id="cse-search-box" action="http://www.google.com/cse"> 
<div> 
<input style="color: #ff9900;" name="cx" type="hidden" value="partner-<span style=" />pub-xxxxxxxxxxxxxx:icn8ro1sh2e" /> <input name="ie" type="hidden" value="ISO-8859-1" />
 <input name="q" size="28" type="text" /> 
<input name="sa" type="submit" value="Search" /> 
<span style="color: #99cc00;"> 
<input name="sitesearch" type="radio" /> 
Web Search <input checked="checked" name="sitesearch" type="radio" value="shariarbd.com" /> 
Shariarbd.com</span>
</div>
</form> 
<script src="http://www.google.com/cse/brand?form=cse-search-box&lang=en" type="text/javascript">
<!--mce:0-->
</script>

The above code will not word until you change the colored area with your Google Adsense Publisher ID. Open your Google Adsense account and create AdSense for Search and add the green colored code into the code generated by Google Adsense. Do not forget to replace my site URL otherwise it will view my site results (ha ha ...)

And now, I will show you how to attach the AdSense for Search withe WordPress Search. Click to Editor form the Appearance tab of your WordPress Dashboard (See on the middle of the left side bar of your WordPress dashboard). Now choose Search Form from the right side bar. There you may file the following codes:

<form id="searchform" action="<?php bloginfo('url'); ?>/" method="get">
<div id="searchformwrap">
<div>
<div>
<input id="searchbox" name="s" type="text" value="Search here ...." />
</div>
</div>
<div><button></button></div>
</div>
</form>

It may varies cause of WordPress theme as Search Form is a page inside the WordPress theme folder. If you like to do this manually with your site cpanel, go to your WordPress theme directory and find the searchform.php page and you will got all that thing of the above form. Well, first make a backup of the code shown in the above (It should be your pages code) and then replace the codes with following, I mean your adsense code or the first form if you don't have Google Adsens.

<strong>Google Search Form with Google Adsense</strong>
<form id="cse-search-box" action="http://www.google.com/cse">
<div>
<input style="color: #ff9900;" name="cx" type="hidden" value="partner-<span style=" />pub-xxxxxxxxxxxxxx:icn8ro1sh2e" />
<input name="ie" type="hidden" value="ISO-8859-1" />
<input name="q" size="28" type="text" />
<input name="sa" type="submit" value="Search" />
<span style="color: #99cc00;">
<input name="sitesearch" type="radio" />
 Web Search
<input checked="checked" name="sitesearch" type="radio" value="shariarbd.com" /> Shariarbd.com</span></div>
</form>

<script src="http://www.google.com/cse/brand?form=cse-search-box&lang=en" type="text/javascript"><!--mce:0--></script>

The search result will shown with Google.com and don't worry, it will show your site search result also!

Continue reading How to add Google Search with WordPress Search

How to back to wordpress 3.0 – Old version

I was using WordPress 3.1.3. I also used WordPress 3.1.0, 3.1.1 and 3.1.2, but all with them,  I got the image uploading problem. But in wordpress 3.0.4 (now I am using this version) is out of that problem. And now I will tell you that how to back into wordpress 3.0 version or later.  But one thing, remember, it is not easy if you have not enough idea about that as it will destroy your hole site if you miss.

Well, I did this trough my cPanel (Hosting control panel). If you have hosting control panel, open it  and go to the file manager and open the root of your wordpress directory. First, we will take a backup for the necessary files to skip any risk. Well, make a folder named "Backup" or anything you like.  Now copy the file named "wp-config.php" (Select and see the top menu of the window to get the Copy option. You may als0 get this option by right click upon that file. Choose the directory for copy on the upcoming dialog box) into the backup folder. wp-config.php contains the database name, site host, username and password  and more information of your hosting to connect with the database and run your site.  Now back to the root folder and select the wp-content to make a zip copy of that folder(See the upper menu and choose Compress). wp-content contains all the themes, plugins and media files uploaded through WordPress.  Now  make a backup of the wp-content.zip (or what folder extension you chooses for to compress the wp-content folder) Continue reading How to back to wordpress 3.0 – Old version