Web Masters Site All For Web Masters

9Oct/110

Top High Quality Web Directories

Here is list of top directories where you must submit your site :

Dmoz - Free web directory one of the most quality directory in world, owned by Google.
Yahoo Dir - Costs 299$ year helps to improve trust from Yahoo and google too.
GoGudes - 39.99$ for one time.
Gimpsy - Support free submission, if you want your site to be approved in 30 days 29$ and if in 4 days 49$.
JoeANT - 39.99$ one time fee.
Skaffe - accept free submission and 49.99$ for paid.
www.web-beacon.com - Accept only paid submission 39.99$.
www.wowdirectory.com - Life time listing 43$.
uncoverthenet.com - starting from 159$ for lifetime listing or 59$ yearly.

Filed under: SEO No Comments
4Oct/110

Delete Duplicate Rows In Mysql With PHP

$dupq = mysql_query("SELECT * FROM `db`");
$dups = mysql_fetch_array($dupq);
foreach($dups as $dup){
mysql_query("DELETE FROM db WHERE duplicate_COLUMN='".$dup['duplicate_column']."' AND id!='".$dup['id']."'");
}

duplicate_COLUMN - Name of column and $dup['column_name'] delete duplicates which include same column data.

Filed under: MySQL, PHP, Programming No Comments
26Mar/110

Page Speed extension for Chrome

News from google page speed is available for download to Google Chrom Browser, you can download it from here http://code.google.com/speed/page-speed/download.html .

Filed under: Publishers, SEO No Comments
16Jan/110

Google Index Twitter/Facebook Links

Starting from December 2010 google started to index links from facebook , twitter, FriendFeed. You can easy check it from Google Webmasters tool and also official comment from google - Matt Cutts.

Filed under: SEO No Comments
12Jan/110

Remove Apache Headers

For me it's really wrong to show everyone which version of apache you have installed and other informations, many crackers can use this info to make attacks to your web server, so it's will not be bad to hide them, this is really easy all you must to do is open httpd.conf file with vi command "vi httpd.conf" and find "ServerSignature On" replace On with OFF at next line add "ServerTokens Prod", thats all restart apache server and enjoy your server version will not be available not in headers nor in error pages.

Filed under: Linux SA No Comments
12Jan/110

Geotargeting with PHP

Its really important some time to use geo targeting for your web site users for example if you have e-commerci  site or for any other sites, I'll show example which give you opertunety to use geo ip with php scrip lets start.

7Jan/110

How to Emulate a Remote Linux Desktop From Windows

It's really easy to control linux OS from windows by using remote desktop.  all what you need is several free software and done. first of all you must download SSH client I recommend Putty its free and really nice soft you can download it from here "http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html" second step is to login with SSH as root and install VNC server with cent os you can do this with this command "yum install vnc-server" also you must recheck that you have installed Gnome Desktop this is important if you don't have you must install it too " yum groupinstall "GNOME Desktop Environment" " you also can use KDE&XFCE, now edit xstartup file "vi ~/.vnc/xstartup" it must be like this one and plus -Find the section where it says twm & and replace it with your choice. I know there are more, but these seem to be the most popular ones. Don't include what I have in the parenthesis

-startkde & (used for the KDE window manager)
-exec gnome-session & (used for the Gnome window manager)
-startxfce4 & (used for the XFCE4 window manager, my favorite choice)

Filed under: Linux SA Continue reading
16May/100

How to Automatically Create Bit.ly Links for Blog Posts

URL Shortner services used to trim down your long urls to a short and easy to share links. This code will automatically generate Bit.ly short links for your blog posts for easy to share on Twitter and IMs.
Open functions.php file of your theme and add the following code:

function bitlyLink($url) {
 
$username = "Bit.ly Username"; // Your Bit.ly Username
$api = "Bit.ly API Key"; // Your Bit.ly API Key
 
$data = file_get_contents("http://api.bit.ly/shorten?version=2.0.1&format=xml&longUrl=".$url."&login=".$username."&apiKey=".$api);
 
$xml = new SimpleXMLElement($data);
$shortlink = $xml->results->nodeKeyVal->shortUrl;
 
return $shortlink;
}

Don’t forget to add your Bit.ly Username and API key (get API key)

Now add the following code within loop in single.php file of your theme.

<?php
$bitlyLink = bitlyLink(get_permalink($post->ID));
echo 'Short Link for this post: <a href="'.$bitlyLink.'">'.$bitlyLink.'</a>'
?>

P.S. All the links will generate within your account so you can track them all by logging in to your Bit.ly account.

Open functions.php file of your theme and add the following code:

01 function bitlyLink($url) {
02
03 $username = "Bit.ly Username"; // Your Bit.ly Username
04 $api = "Bit.ly API Key"; // Your Bit.ly API Key
05
06 $data = file_get_contents("http://api.bit.ly/shorten?version=2.0.1&format=xml&longUrl=".$url."&login=".$username."&apiKey=".$api);
07
08 $xml = new SimpleXMLElement($data);
09 $shortlink = $xml->results->nodeKeyVal->shortUrl;
10
11 return $shortlink;
12 }

Don’t forget to add your Bit.ly Username and API key (get API key)

Now add the following code within loop in single.php file of your theme.

1 <?php
2 $bitlyLink = bitlyLink(get_permalink($post->ID));
3 echo 'Short Link for this post: <a href="'.$bitlyLink.'">'.$bitlyLink.'</a>'
4 ?>

P.S. All the links will generate within your account so you can track them all by logging in to your Bit.ly account.

Filed under: Wordpress No Comments
13Mar/100

MySQL: How to add column to existing table

Definition: Add column is used to add an additional column to any given table. You must specify the column name, and type. It is written as alter table add column [new column name]
Examples:

ALTER TABLE `tablename_here` ADD `new_column_name` VARCHAR( 255 ) NOT NULL ;

or

ALTER TABLE `tablename_here` ADD `new_column_name` INT NOT NULL AFTER `existing_column`;

Filed under: MySQL No Comments
9Jan/100

Batch Image Resize on Linux

You can easily resize any images in your directory or entry server with help of ImageMagick Libraries if you don't have it you can easily install it by this commands

Ubuntu - sudo apt-get install imagemagick

CentOs - yum install ImageMagick

ok if you installed it, you can use "mogrify" command to resize your images for example if you want to resize all images with jpg extension in directory use this command

mogrify -resize 800×600! *.jpg

this means that all images with extension .jpg will be resized at 800x600, you can change jpg to any image extension you want to resize such as png, gif.......

Filed under: Linux SA No Comments