SEO Web Development and Design Blog

 

Archive for July, 2007

Why Page Strength sucks?

Monday, July 16th, 2007

Lately there was discussion on Digital Points forum, about Page Strength tool developed by www.seomoz.com. I think about it for a while and found few reasons why i think this is the most useless SEO tool ever created for web development community.

(more…)

Your very first AJAX web application

Saturday, July 14th, 2007

Let me explain why i selected such title. When writing AJAX scripts there is a part of code that always have to be included, it is pretty much like DOCTYPE in html, you do not have to understand it, just copy and paste, more over our code will be a function which takes no parameters and only returns one as XMLHttpRequest. If you do not know what this object is suggest you reading my introduction to AJAX web development. (more…)

Optimizing PHP scripts

Friday, July 13th, 2007

This post is mainly for new programmers and web developers, but advanced programmers also can make use of it. While browsing forums i often see programmers asking questions about their scripts why doesn’t they work mainly, don’t get me wrong i have nothing against asking questions, but i noticed something else what concerned me, most of newbies do not optimize their scripts, as long as they do not have much visits on their websites it is ok, they can get away with it.

(more…)

What will Google say?

Thursday, July 12th, 2007

I see often that people instead of developing their websites, creating content wander: what will Google say? In my opinion most of people read to much about SEO and instead of creating original and unique website they end up asking the same question.

(more…)

Security and SPAM: CMS vs. custom software

Thursday, July 12th, 2007

People in web development industry often say: use of free open source content management systems is responsible for all spammy sites which has got no value for real user, so if there would be no content management systems then we would have only quality sites on the web, because in order to create a site you will need to invest money first and investing money is a sign that you are serious about that.

(more…)

Creating watermarks with PHP and GD Library

Wednesday, July 11th, 2007

The last post i wrote was about getting started with GD library, today i want to show you practical use of this wonderful library. I want to protect all images on my server, so i need to create watermarks for all my images, but let’s pretend i want to sell this images at the same time so there cannot be any watermarks on it. There are two solutions to this problem: create images with and without watermarks or use GD library and create watermarks on the fly. Obviously we will take advantage of the second method because it is more professional and requires less work in the end.

(more…)

Getting started with GD Library

Tuesday, July 10th, 2007

Often we need to create a chart or add watermark to image, we could do it manually and create those images by ourselves using Photoshop for example, but it would be time consuming and would cost a lot of money (to buy graphics software mainly). Fortunately PHP has got nice library for creating and editing images on the fly, it is called GD library.

This library is not installed by default with PHP, but almost always you can find it in PHP package, so if you have PHP installed then probably everything you need to install GD library is already on your computer, however you may still need to configure GD.

The best way to find out if your GD library is ready to use is to create simple script like:

If you will receive Fatal Error while running this script it means your GD library is not active and you need to install it or configure server first, it is very simple, and installation process is well covered in PHP manual so I won’t go into details here.

I assume you have your GD library up and running so we can write first script.

We will start with small image containing text only, this will be simple script, but it should give you an idea how to handle GD library.

1
 

We start with setting content type to image/png, we have to do it because using GD library we cannot throw our image into html code. If you have script ready then save it as img.php and open in browser, you should see black image with white string on it, but try to view source code, there is no html, right? This is because our img.php file is no longer text file for our server it is PNG image.

Let’s play with it further, after “?>” add to img.php “I like HTML”, save file and reload it in browser. What do you see now? A lot of signs and letters which do not make any sense? If yes then you did this exercise correctly. By adding text we corrupted our file structure, the same effect can be achieved if you open with Notepad any image on your computer add some text to it, save and close image. If you will try to open this file with some image viewer you will get error saying that there is something wrong with your file. Of course you know that, because you just edited this file by yourself.

However, what should concern you now is a fact that img.php is just image file and we can’t really do anything with it, besides displaying our image, therefore if you wish to display our image on your website with html code around it then you need to create new .html (or .php) file and add there this similar line, if your new file is in the same directory as img.php.

1
<img src="img.php" mce_src="img.php">

Now let me explain our code briefly, imagecreate(…) is a function which creates new blank image, two parameters given are image width and height of course. In the next line you can find imagecolorallocate(…) function which assigns to variable color in RGB format, BUT always first use of this function after imagecreate(…) fills background with selected color. So after first two lines we have 200 px width and 50px height black image.

In the next line we assign value which represents white color to variable $white, then by using imagestring() function we add text to our image. First parameter is a reference to image which will contain this string, second parameter is a size of build-in font (from 1 to 5), third and fourth parameters are x and y coordinates, we need to know where our string starts and this numbers define it. Fifth parameter is string which we want to put in the image and finally last parameter is color of our string, defined earlier with imagecolorallocate(…).

Imagepng(…) sends created image to output as a PNG image, analogically if we want to send our file as GIF then we must use imagegif(…), if we need JPEG then we must use imagejpeg(…). Of course you need to remember to change header if you change file format.

If we would like to save our image to file as PNG image then in our example we should redirect output stream to file, in other words instead of imagepng($img); we should write imagepng($img, “our_first.png”);.

That’s it for now. If you are new to GD library then I am confident this article will get you started and you will soon want to learn how to draw objects with GD, so for more functions visit www.php.net and find “Image Functions” category.

Zend Framework 1.0 finally relased

Sunday, July 8th, 2007

On 2nd of July stable Zend framework was released. We have been waiting for a very long for that to happen, mainly because Zend is the biggest company involved in PHP development and their every product is something that can really improve programmers work, however most of them are commercial, you need to spend some cash to get them, but Zend Framework is free for all and it is available for download at www.zend.framework.com.

(more…)

How to avoid Google Duplicate Content

Saturday, July 7th, 2007

All webmasters believe that duplicate content is caused by coping other articles posting someone feeds on your site. It definitely is the true but i have few my own views on this that i want to share with you.

I will start with spotting duplicate content, this is very easy all you need to do is make a query on Google like that one:

(more…)

What is Ajax?

Friday, July 6th, 2007

Ajax is quite new web development technology, it became quickly very popular, but still a lot of people do not know what it is and how to make a use of it. In this short article i want to present you my views on it, especially when to use Ajax, because often people use this powerful technology in wrong way which may hurt your SERP rankings.

Are you one of this people? Read on to find out.

(more…)

How to think about Your blog?

Friday, July 6th, 2007

A lot of people think that their blog is their job or business and because of it they make very common mistake of treating blog like a job. This is very wrong mindset because most of people associate job with feelings like: being bored, stress and so on.

(more…)

Hello world!

Friday, July 6th, 2007

Hi my name is Grzegorz!

First of all i start with explaining why i created this blog, i know there is a lot of web marketing and web business blogs out there so why do we need another one, isn’t everything already covered and all products reviewed?

Well this is true, there are many web marketing blogs but this is not a point, because web development is not selling it is mainly about creating websites, and this is what i want to focus on.

I will be delivering you info about new trends in web development AJAX, PHP, asp.net and other new technologies.