Here’s how to find out what is taking up your disk space on a linux server:

du -s /* | sort -rn

This could take awhile to run, and don’t worry about error messages you might see … keep working your way down into directories until you find what file(s) are taking up the most space.

While not really related to this, I thought it was interesting to read about where Newsgator is heading.

Filed under Web by admin.
Permalink • Print •  • Comment

June 25, 2006

Dictionary Translator

http://dictionary.reference.com/translate/text.html

Filed under Web by admin.
Permalink • Print •  • Comment

Short and sweet php script to get the file contents on a web page on another site.

$link_page = "http://www.example.com/";

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $link_page);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
$result = curl_exec ($ch);
curl_close ($ch);

print_r($result);
?>

Filed under Web by admin.
Permalink • Print •  • Comment

It’s about time linkie winkie happened, can’t believe it took this long to happen.

Filed under Other by admin.
Permalink • Print •  • Comment

Enter Your Keyword

From there description:

EnterYourKeyword.com offers advanced keyword searching created specifically for webmasters seeking a powerful way to extract thousands of keywords related to their website.

Filed under Web by admin.
Permalink • Print •  • Comment

This assumes you have the wordpress blogs in the root on your domains - this doesn’t cover subdirectories/subdomains. If in doubt, contact your tech support and have them do this.

(1) Login to your server (shell access), change directory to your /home directory (this assumes you have a directory in the format /home/usernam1/public_html/).

(2) Create a file called “delete.com”, edit the file and put this on the first line.

#!/bin/sh

(3) Save and exit the file.

(4) Run the following on the command line:

ls | perl -ne ’s/\///;chomp;split;print “$_ “;’ >> delete.com

(5) Go back in and edit the file and put (a) accounts=” at the beginning of the second line and (b) a closing quote around the end of the last username that was added. You might need to remove some entires that are obviously not the username of accounts on your server. In my case, I need to remove “.”, “..”, “.cpan”, and “MySQL-install”.

(6) Add the following to delete.com:

for account in $accounts
do
\rm /home/$account/public_html/wp-comments-post.php
\rm /home/$account/public_html/wp-trackback.php
done

delete.com should look like this:

#!/bin/sh
accounts=”usernam1 usernam2 usernam3 usernam4″
for account in $accounts
do
\rm /home/$account/public_html/wp-comments-post.php
\rm /home/$account/public_html/wp-trackback.php
done

where usernam1 usernam2 etc are the usernames for each domain.

(7) Save and exit delete.com. Change the permissions to the delete.com file using the following command:

chmod 777 delete.com

(8) At the command line, type “delete.com”.

(9) Delete the file delete.com

If in doubt, contact your tech support.

Also, instead of deleting the two files, consider replacing them with empty files. If a visitor clicks on a link that calls either of those files that don’t exist, your path gets displayed.

#!/bin/sh
accounts=”usernam1 usernam2 usernam3 usernam4″
for account in $accounts
do
\cp wp-comments-post.php /home/$account/public_html/wp-comments-post.php
\cp wp-trackback.php /home/$account/public_html/wp-trackback.php
done

Filed under Web by admin.
Permalink • Print •  • Comment

http://www.hostinglife.com/security.php

Filed under Web by admin.
Permalink • Print •  • Comment

June 22, 2006

Get Human Database

Filed under Other by admin.
Permalink • Print •  • Comment

June 21, 2006

Compiling PHP with curl

Actually, these are the instructions for recompiling php with curl because all I did was compile the same version that was already running on my server.

All of this is from the shell (Putty works great for this).

> cd /usr/src
> wget http://us2.php.net/get/php-4.4.2.tar.gz/from/this/mirror
> zcat php-4.4.2.tar.gz | tar xvf -
> cd php-4.4.2/
> ./configure –with-apxs=/usr/local/apache/bin/apxs –prefix=/usr/local –with-xml –enable-bcmath –enable-calendar –enable-ftp –enable-magic-quotes –with-mysqli –with-mysql=/usr –enable-discard-path –with-pear –enable-sockets –enable-track-vars –with-zlib –with-curl
> make
> make install
> cd /usr/local/apache/bin
> /usr/local/apache/bin/apachectl stop
> /usr/local/apache/bin/apachectl start
> /usr/local/apache/bin/apachectl status

That’s it.

Filed under Web, PHP by admin.
Permalink • Print •  • Comment

June 19, 2006

Personal Development

This might seem like a strange thing to mention on this blog, but here is a good web site about personal development.

http://www.stevepavlina.com

Filed under Other by admin.
Permalink • Print •  • Comment

Server Information

Server information.

netstat -ntu | awk ‘{print $5}’ | cut -d: -f1 | uniq -c | sort -n

Reports I.P. information about who is on your server.

Then check against a known list of SE bots at http://iplists.com

Filed under Web by admin.
Permalink • Print •  • Comment

June 18, 2006

Image Maker

Handy little background image maker for the do-it-yourselfer.

Gradient tool.

Filed under Web by admin.
Permalink • Print •  • Comment

June 17, 2006

Indexing Script

Check how many pages you have indexed in the major search engines; Yahoo, Google and MSN.

Index Checking script

Use at your own risk, you are responsible for the results.

I have been added to the functionality of this script. Besides being able to setup a cron job to email you the results daily, I have hacked together the ability to dump the daily results into a MySQL database. With a database of results, you can then use that data to graph your results.

Filed under Web, PHP by admin.
Permalink • Print •  • 1 comment