Archive for May, 2008

Getting User’s IP in PHP

Written by admin on Saturday, May 17th, 2008 in PHP Tutorials, Tutorials.

Sometimes you may need to get a users IP that is browsing your website and store it for protection or display it to the user.

In PHP this is simply done by using the $_SERVER variable.

The code below will store a users IP into a variable:

<?php

$UsersIP = компютри$_SERVER[’REMOTE_ADDR];

?>

REMOTE_ADDR simply grabs the remote IP Adress being used.

Lots more info can be obtained this way. But that is how to grab a Users IP.

HTML Validation

Written by admin on Monday, May 12th, 2008 in Tutorials.

HTML Validation

Plain Text   view plain   expand/collapse
  1. <span style="color: #000000"> HTML validation is kept under maintenance by W3.org.</span>

HTML validation runs through your code to see if your HTML/xHTML coding is perfect and up to scratch.

To make sure your site is validated perfectly Make sure you have the following in your html document.

doc type
html tags
head tags
body tags
ommittags

DOC TYPES give the html document a type.

Example:
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
The html tags are included in tis doc type.

Body tags are essential to a document as it keeps all layout coding where it is suppoed to be and lets the page know when to start displaying.

Head tags are for containing Page titles, links to style sheets and hosting css styles.

Ommittags are new to html and are considered xHTML.

They make tags close themselves without having the closing tag.

This is done by a slash “/”.

Examples are sown below:

<br /> instead of <br>

<img src=”" />
Following the steps above will make your html document valid.

You can validate your document by the
following url:

http://www.validator.w3.org

Colour Changing Tables

Written by admin on Thursday, May 8th, 2008 in Tutorials.

Okay. This isn’t all HTML, Its a bit of JavaScript but you will pick it up easily.

Right Plain tables can look boring and if there is a large amounts of rows with data alternating colours is not enough and it can get very annoying when you loose your place and can be stressful on the eyes.

So highlighting your table cells can be very helpful when reading down a list.

This tutorial will show you how to make a cell change colour (effectively highlight itself) when it is hovered over.

In your td tag place the following code:

Plain Text   view plain   expand/collapse

<td onMouseover=”this.bgColor=’#FFCC00′”>

This will make your cell change colour when its hovered over. The value in the single quotes is the colour it will go.

what it is doing is saying. When hovered over this cells bgcolor = #FFCC00.

But this colour will stay and will not disappear.
So we need to tell the cell what to do when its not hovered over.

(more…)

Output Data from Text File with PHP

Written by admin on Wednesday, May 7th, 2008 in PHP Tutorials, General.

In this tutorial I am going to teach you how to generate data from a text file with the use of PHP.

To start you must first make a document called data.txt

Open up your data.txt for editing (I highly recommend using Notepad++).

Now put the following code into your text file.

Plain Text   view plain   expand/collapse
  1. | News 1 | News 2 | News 3

The above is what we can output. Each phrase is separated by a |. We need this so that we can tell our php script when to stop outputting a piece of data.

Now you need to make a PHP file called quotes.php.

This is the file that will generate our data.
Insert the following code into your php file.

(more…)

Revolutionary Pay-to-Click programmes

Written by admin on Tuesday, May 6th, 2008 in General.

As the web grows in size and the opportunities for making money with the internet is becoming even bigger. The newest way of doing this is Pay-to-Click programmes otherwise known as PTC sites. The name is self explanatory but let me explain further.

You get paid x amount for each time you click on a link on the website. The link will take you to an external website which you must view for a certain amount of time for your click to be registered. Each valid click can you get you between $0.005 upto $0.015. Although this does not sound a lot it all mounts up when you click 30+ adds per day. Another catch to these sites are referrals. Referring people boosts your earning power as you earn a percentage from each of their clicks, sometimes even 100% credit from their clicks.

However some sites are there to cause inconvenience to you and to others so here is a list of reliable and worth while PTC sites.

I will update this list once I find some more reliable PTC programmes.

The earning potential from these websites is sometimes unbelievable. Steady investment into these programmes can gain you massive profits in the long run.These are not get rick quick schemes, but can sure put a bit of spare cash in your back pocket.



Site Navigation SEO Services