RSS

New category

June 29th, 2010 • UncategorizedNo Comments »

Hello, i am glad to announce a new category of my blog. It is called – “World problems” It will contain my thoughts about world problems in these days. And yes, with this category my blog turns out in a full personal blog with my thoughts, opinions and ideas! Also I think that it will be a great category to discuss, if you are a person like me, which hates seeing teens going drunk or smoking share your feelings and opinion! :)

Teen smoking problems

June 29th, 2010 • World problems1 Comment »

It’s so sad to visit facebook these days, because you will never know what surprises it will throw at you today. And again, today I was surprised and very sad as i see more and more of my age teens uploading their photos. You may ask what’s the problem that they upload photos. Well, the problem is that they upload photos which contain them or their friends holding cigarettes, smoking them. I think that is just terrible for 14-16 years old teens to smoke and even UPLOAD photos where they are smoking. I have never tried to smoke in my life and I will never will! I can’t understand how people can put that shit in their mouths, gosh! It is horrible! Even more sad that most of classmates were surprised as I have told them that I haven’t smoked, at all! This is a big problem really, and nobody cares about it. I think that some actions should be taken. If you think that classmates sharing cigarettes during a lesson or seeing teen friends smoking in a street is NOT NORMAL than please share your thoughts here. Once again, I am really SAD cause of things like this :(

P.S I have never wrote anything like this. It’s my first time, so please, avoid bad words.

Getting information about host

June 27th, 2010 • PHP TutorialsNo Comments »

Did you ever need to find out some information about your website hosting provider? Well, if you don’t know how to I will show you in this most simple tutorial. First of all your webhosting provider must support PHP if it’s not, this tutorial doesn’t fit for you. If it supports PHP, than lets continue. Make a new file inside of your website host, name of the file doesn’t matter, but make sure to put .php extension at the end of file name. When you have created a file open it and add this content:

1
2
3
< ?php
phpinfo();
?>

Save and close the file. Than open it in your browser and you will see very much information about your current web host. Hope someone will find this useful. Good luck! :)

Working with your own web server (EasyPHP)

June 27th, 2010 • Website related1 Comment »

In previous tutorial i’ve wrote about how to set up local web server with the help of EasyPHP. Now, in this tutorial I will show you how to work with it, accessing and managing it. First of all, if you haven’t installed your own web server yet visit this tutorial that I have made:

Setting up local web server

Okay, so if your web server is installed now you should launch it by doing these things:

Open the directory wheres your EasyPHP is installed. Mine is installed in

C:\Program Files\EasyPHP-5.3.2i

So, that’s the directory that i am going to open. Go ahead and open yours too!

EasyPHP installation directory

This is how the directory should look like. What I mean should look like that you should have same files as the view it self can be different, based on the Windows version you are using and of the folder view type.

After you have EasyPHP directory open you should launch EasyPHP-5.3.2i.exe just by simply double clicking it. When you have double clicked the .exe file the EasyPHP program should launch it self and you will be able to see it in the bottom right of your screen. Just like this:

Location of EasyPHP in toolbar

Do you see the “E” letter? If you do it means that EasyPHP has been launched. However if you don’t you should read this post from the beginning again, maybe you will find what you did wrong. Anyway, we should continue. Double click the “E” letter in the bottom of your screen, and you should see that new window has been opened

The window of EasyPHP

By the default EasyPHP should have services already started if it’s not, this is what you do:

Press the same, but a little bigger “E” letter inside a new opened window. A new, little window should open inside the window select the “Start” and mouse click it or you can simply press F2 to start it. You should notice that new text appeared in window, which looks something like this:

27/06 10:24:38 EasyPHP: Servers starting

It means that EasyPHP servers has been set to start. Just wait a moment and it should be started fully. You will notice that the two light things turn in green light, showing that EasyPHP has been started successfully. Now you have MySQL, PHP and Apache servers successfully started, giving you all the abilities your own web server needs. Now, I will show you where you should put your web files and how to access phpMyAdmin. In order to manage your web files you should open the same directory of EasyPHP, mine is:

C:\Program Files\EasyPHP-5.3.2i

But now, this is what you do. Inside the EasyPHP folder you should see another folder named “www”. Open it!

As you see, this folder is empty, because there is no files in your web server yet. Here is where you put all of your web files, nowhere else, just here! After you have files in this folder you can access them by typing this address in your browser:

127.0.0.1

Do not enter www. before the address, because it will not work. However, you can enter HTTP:// before the address, it will work in this way.

Okay, so a new page should be opened. Here, i will show you how to get into phpMyAdmin, to access MySQL. In the new opened page search for a little house icon in the top of the screen and press it. You should be taken to another page. There a few choices in this page, like:

  • Manage MySQL
  • MySQL Parameters
  • PHP Parameters
  • Time Zone
  • Extensions

If you want to get to phpMyAdmin, you should press “Manage MySQL” and you will be taken to a phpMyAdmin. There you can manage MySQL databases, MySQL users and much more. Google phpMyAdmin for more information about it.

That’s all for this tutorial. If you have any problems or want to ask something, feel free to do so! :)

Setting up local web server

June 25th, 2010 • Website related4 Comments »

In this tutorial I will teach you on how to set up your own local web server.

What i mean by local web server is that you will have an ability to run PHP, MySQL, Apache web services on your own computer. This tutorial is based on Windows only. So if you are Linux user you should look for an other tutorial. For local web server we will use EasyPHP program which has fully integrated PHP, Apache, MySQL. All in one package! So let’s get strated.

The first step that you should do is download EasyPHP from here:

http://www.easyphp.org/download.php

I will give you a full instructions on how to download. So after you have opened the link i gave you its content should look like this:

EasyPHP download page

Read the rest of this entry »

My DVD drive burned. :(

June 24th, 2010 • About meNo Comments »

Sad news, after trying to connect my old DVD to the new computer seems like it burned. I have been looking for a reason that caused such thing and i’ve came across this:

One of the power cable wires that goes into DVD drive has been taken off which caused bad electricity flow into the drive and it started to burn. At least there is one good thing that any other parts didn’t suffer any consequences and i am still alive, haha. DVD Drive was:

HP dvd840 writer if anyone else had same problems feel free to comment. I will be sharing some photos of this DVD drive later.

My new PC case/box

June 23rd, 2010 • About me10 Comments »

In previous post i have been talking about my pc upgrade. Now in this post i am going to tell you a little about the case/box of it. So, let’s get started.

About 5-6 days ago I was searching for a low priced and good enough case for my new upcoming computer, and i have come to the following one:

Codegen M609

Codegen M609 case

As you can see in the picture the front panel of this case has a huge sized LCD screen which displays current temperature, fan information, timer and more. At the top of this case there is audio, microphone jack, two USB 2.0 connections and of course standard power, reset buttons

M609 Case rear

The rear of this case is not much to look at, as all of the standard cases it has some holes made up for ventilation, power supply and all other stuff. So after look at it, i’ve decided to order it. It bought it for a pretty low price – 149 LTL which is about $53. It came right next to my door at the second business day. Sounds like a pretty good delivery time for me, hehe? Anyway, it weighted about 7-8 kilograms as most of the ATX cases does, contained all the needed screws also it had pre-installed 400W power supply which I have found really useful as my old power supply seemed pretty “tired” :)

Well, it should be all for this post. I will be posting more about my new computer soon. :)

My PC upgrade

June 23rd, 2010 • About me2 Comments »

Hello, today I have upgraded my personal computer. There was many reasons that caused me to do such thing. The main reason I guess would be the age of its parts. It contained very old Intel Pentium 4 processor, some crazy unknown china motherboard which I think burned during power loss, and of course tiny space hard disk drive. Now, after upgrade my computer has the following parts:

  • Intel Core 2 Quad Q9505 2.83 GHz processor
  • Gigabyte NVIDIA 9500 graphics card
  • 1 TB(terabyte) Samsung hard disk drive
  • ASRock P45DE motherboard

You can’t even imagine how happy now I am! :) Later I will post more, in depth information about my new computer and it’s parts but for now I will and have some fun with it! :P

MySQL – Connection, Table Creation, Accessing Table

June 21st, 2010 • PHP Tutorials, Programming Tutorials8 Comments »

Hello, in this tutorial I will teach you how to connect into MySQL database, create new table inside of it, put information inside the created table and later read the information from the table. So, lets start!

First of all, you should make MySQL database if you haven’t already. After you have MySQL database ready we should make connection to it using the following code:

1
2
3
< ?php
mysql_connect("hostname","username","password");
?>

Read the rest of this entry »

Reading part of a string

June 21st, 2010 • PHP Tutorials, Programming Tutorials2 Comments »

Hello everyone, in this tutorial I will teach you how to read part of a string in PHP. To do so we will use string function called “substr”.

substr function is used to get part of string. The full syntax of substr is:

string substr ( string $string , int $start [, int $length ] )

Now I will explain the parameters of it:

First parameter is “string $string”. With this parameter you choose the string that you want to use this function with. Example:

$firststring = "This should be the string";

Second parameter is “int $start”. This one is used to tell the function where it should start reading string from. For example, if you enter positive number “1″ into this parameter it would start reading the string from the second character(Remember, that in PHP counting starts from 0, not from 1!). So, if we had our string like:

$firststring = "Test";

And given number “1″ for this parameter it would start reading this string from the letter “e”. If you type in negative number just like “-1″ for the parameter it would work basically the same, but instead of reading string from its beginning it would read the string from its end. (Notice: If you enter “-0″ it just won’t work, and would read the whole string)

The third parameter is “int $length”. It is not needed to have this parameter included, but you can use it to tell the function read the string part only in the length you’ve given.

So let’s put it all together and read five characters from the word: “Hello!”.

<?php
$string = "Hello!";
$printString = substr($string,1,5);

echo $printString;
?>

This code would give us respond:

ello!

Hope this will help someone. Took me some time to write it. :)

If you found any problem with this please respond. :P