Author: Brian

Avoid Duplicate Content Pages

Many people do not think about the possibility of duplicate content pages on their website, when this is very common and easily avoidable. All it takes is a little HTML in the head tags of the page.

What is a duplicate content page?

Duplicate content is content that is showing up on the Internet by multiple URLs. Another words, a page like aboutus.php might be coming with the same content as aboutus.php?do=send.

This causes some problems with search engines as far as determining which page the engine should use for query matches, page ranking, use of meta tags between the two versions, and just which one to include for their indices.

How do you avoid duplicate content?

Let’s say these are your pages that are coming with the same content:

Original source:
post.php?id=1
.

Duplicate content pages:
post.php?id=1&lang=en
post.php?id=1&do=login

On post.php we can include a <link> tag that will reference to the original source so Search Engines gather the original correct information from the server, rather than trying to decide between the serveral duplicate pages.

Place in the <head> tags of post.php:

[code lang=”php”]
echo ‘‘;
[/code]

This will take the $id and put it into the URL as just post.php?id=$id. So any other URL parameters, such as lang=en, or do=login, will not be read as a duplicate page, but tell search engines to use the content of just post.php?id=$id.

If you do not need to use PHP and you just want the page to load a set content of just post.php then you would use the tag like so:

[code lang=”html”] [/code]

When using this method, you want to be sure that you are consistent throughout your website with your canonical URLs. If your canonical url is like: “http://www.bgallz.org/” then you want to use “www” in all of your URL references and tags for the domain.

Now, if you have pages that you do NOT want included in any search engine queries or crawled by search engine bots, then you want to use a META tag with “noindex, nofollow”.

To block a page from search engine indexes places the following in the <head> tags:

[code lang="html"]

[/code]

Walla!
Filed under: HTML, TutorialsTagged with: , ,

Setting Up Your New Website

Before you do anything, you need to pick a domain name. For example: bgallz.org.

You want your domain to be simple, obvious, effective. Think of what your website is going to be about, think of all possible searches, keywords, and most commonly used phrases or words when talking about your “niche.” A niche is a specific/special idea or description to your site. Like any website can be about cute puppy dogs, but your site is about… “Where to adopt cute puppies!” Try to keep the domain name short as possible. Something like “adoptapup.org.”

You can register one at any of the following domain registars:

  • Namecheap.com
  • Godaddy.com
  • Networksolutions.com

There are plenty of others, these are just some I know of, however I recommend using Namecheap. Select the domain you want (that’s available) and register it with a registrar. This takes some time to get configured and defined on the registrar’s side.

After you have decided on domain name, you need to get space to put the site on. This is where web hosting comes in to play. When searching  for hosting you want to consider your needs, ask yourself – what do I need? Think about how much disk space you will need, bandwidth, required server applications and languages, etc. You want to find the best price that meets your requirements. Also, know the difference between web hosting and VPS (virtual private servers). VPS is needed for things like managing your own small web hosting business, running certain server-side programs, etc.

Web hosting is not something to just pick any cheap possible option for. Your website is going to be hosted on the place you order from, so make sure it is reliable, dependable, stable, and yeah – a good price. At bgallz.org you can get 250 GB disk space and 10 TB bandwidth for just $3.99/mo. Web hosting is usually set up very quickly, and once you have your host paid for and cleared you can put your domain on it! You do this by either transferring your recently bought domain to the web host, OR by changing the nameservers to point to your new web host.

You can change the nameservers on your domain at the registrar you just registered at. In your account somewhere under each domain you have there, you should find a link to change domain nameservers or domain name setup.

Here is a screenshot off Namecheap where I have mine:

Then you can enter your nameservers that are provided from your new web host. They are usually like ns1.webhostingsite.com and ns2.webhostingsite.com. These tell the registrar where to load your website’s files from.

Here is an image:

Now that your domain is setup with your new nameservers, you are ready to load your site’s files onto your new host.

Don’t have any files or web design? Check out my web design packages. This is where the programming comes in to play. I recommend using Dreamweaver or something of similar power to program your web code into a beautiful working website. Please contact me for all your web programming needs! My email: support@bgallz.org.

With the purchase of your web hosting you should receive login details for your FTP and cPanel (or whatever system they are using).

I like to use Filezilla as my FTP program, download it here.

Here is my FTP screen once logged in:

Once you are connected to your FTP you can upload all you want. Well based on whatever your limitations are as far as disk space. Usually you connect to ftp.yourdomain.com with the username and password your host provides you with. You want to upload in the /public_html/ directory, this is the main directory for your website.

So when people access your website, such as http://yourdomain.com/images/image1.gif – this would be uploaded to:

/public_html/images/

Your done! Once your files are uploaded and your domain settles into its new nameservers, everything should be accessible and ready to go. Enjoy.

Filed under: Tutorials

Call of Duty: Black Ops – Lag & Bug Fixes

Okay, so with the release of Call of Duty – Black Ops for PC there have been a few glitches and bugs found. These are easily fixable if you have any clue what you’re doing. It’s very easy actually – you just have to open the config_mp.cfg file located in:

C:\Program Files\Steam\SteamApps\common\call of duty black ops\players\

Call of Duty Black Ops

But first, open Steam. In your games list, right click on Call of Duty: Black Ops Multiplayer and go to Properties. Click on Updates and uncheck the “Enable Steam Cloud Updates” button. This can cause some extra unwanted CPU/bandwidth usage and lag.

In your profile’s folder you will find the config file.

Right click it, edit as Administrator if possible. Opening it with notepad makes it display all crunched into an unreadable mess. Open with Wordpad and you should be fine.

Search in wordpad: multi

First two changes:

  1. r_multiGpu – Set “1” to “0” if you do not have multiple GPU’s (graphics cards) on your machine.
  2. r_multithreaded_device – Set “0” to “1” if you have multiple cores on your processor. It’s required to have multi cores to play the game so you probably do…

You can also change the following things in the config_mp file to reduce lag and glitchiness in game:

  • cl_maxpackets – Change to “100”. Increases your packet count so it will not fail as easily.
  • r_blur_allowed – Set “1” to “0”.
  • r_glow_allowed – Set “1” to “0”.
  • r_distortion – Set “1” to “0”.
  • r_dof_enable – Set “1” to “0”. Turns off depth of view.

On top of these changes you should definitely consider the following:

  • Exiting all other unneeded programs running in the background.
  • Try lowering game resolution / graphic settings. Turn anti-aliasing and game shadows OFF.
  • Press Ctrl+Alt+Del and open task manager. Under processes right click the game and set affinity to one CPU.

I am assuming that Steam will release a patch to update the game and fix these things and others as well as far as the simple bugs in the new release.

These worked for me and many others, hope it works for you.

Filed under: Gaming

HTML Div Float Property

Div Float LayoutUsing the HTML tag – <div> and the float style property, you can make designs for your websites. Well, you can make layouts for where design could be. This is a good structural tool in laying out where content will be on your web pages, images, blurbs, etc.

Let’s say we want a page to look like this:

First I’m going to set up the CSS styles we will set our <div>’s to in the HTML to give this page the right look as far as padding, margins, borders, etc. Once we have all the styles defined we will call them to the DIV tags in our HTML like so: <div class=”CLASSNAME“>. Using the right float’s in the right order will place our DIVs in the right places to make this layout.

This will go in our <head> tags of the HTML page:

[code lang=”css”]
html, body, center {
padding: 0px;
margin: 0px;
height: 100%;
}
.header {
padding: 8px;
vertical-align: middle;
height: 80px;
background: #d60000;
}
.banner {
float: left;
border: 0;
vertical-align: middle;
width: 500px;
height: 60px;
}
.ads {
padding: 10px 0px;
float: right;
width: 300px;
height: 60px;
vertical-align: middle;
background: #ffb448;
}
.wrapper { /* Main page holder. */
padding: 10px;
width: 875px;
background: #fff;
height: 100%;
}
.page {
padding: 10px 0px;
width: 630px;
float: left;
height: 100%;
}
.top {
padding: 5px;
height: 40px;
background: #ff7c7c;
margin:0;
}
#boxes {
padding: 5px 0px;
}
.box {
width: 197px;
height: 197px;
padding: 3px;
margin: 3px;
background: #ffddaa;
float: right;
}
.rightside {
float: right;
text-align: center;
height: 100%;
padding: 10px 0px;
}
.nav {
padding: 5px;
background: #ccc;
width: 200px;
height: 100%;
min-height: 600px;
}
.content {
margin: 20px 0px;
width: 600px;
text-align: left;
}
[/code]

Now we have to write the HTML to use these styles appropriately.

Here is our <body> HTML:

[code lang=”html”]

 

Ads Here
Content Here
Box 3
Box 2
Box 1

Content Here, lots and lots of content here! Content Here, lots and lots of content here! Content Here, lots and lots of content here! Content Here, lots and lots of content here! Content Here, lots and lots of content here! Content Here, lots and lots of content here! Content Here, lots and lots of content here! Content Here, lots and lots of content here!Content Here, lots and lots of content here!

Content Here, lots and lots of content here!Content Here, lots and lots of content here!Content Here, lots and lots of content here!Content Here, lots and lots of content here!Content Here, lots and lots of content here!

[/code]

Take a look at the HTML in action here!

If you notice in the HTML the box’s are placed in descending order inside the “boxes” div ID. Since the box class is set to to the right:

[code lang=”css”]
.box {
float: right;
}
[/code]

We put the boxes in descending order so that the HTML will read down the page and float the first one to the right, then the next, then the last. So it floats BOX3, then BOX2, then BOX1.

Using the float style property of DIV tags is really useful in making layouts because it does not require any real guidelines to follow as far as where it is on the page. This sounds a little wordy but basically with a combination of float, and position style attributes you can make your DIV’s go where ever you want.

Filed under: HTML, Tutorials, Web Programming, XHTMLTagged with: , , , , , , ,

PHP Prime Number Script

Here is a simple little script that will determine if a number is prime or not. Just submit the function through with the parameter number as the integer you want to determine – is prime or not.

Syntax

[code lang=”php”]
is_prime(number);
[/code]

Here is the function’s definition:

[code lang=”php”]
function is_prime($num=0)
{

$num = (int)$num; // Make sure it’s an integer.
if($num > 0)
{
$count = 0;
$half = round($num / 2);

for($i=2;$i<=$half;$i++) // Check the remainder from 2 to the half point. { if(($num % $i) == 0) // Remainder is 0, it is divisible. Not a prime number. { $count++; // Increase count of divisible numbers. } } if($count > 0)
{
return false;
} else {
return true;
}
} else {

return false;

}

}
[/code]

Examples:

[code]
is_prime(10);
is_prime(3);
is_prime(109);
[/code]

[code]
false
true
true
[/code]

Basically our script here takes a parameter, makes sure it is an integer greater  than 0, then divides it by each number from 2 to half way to that number. So if our number was 7 the script would divide 7 by 2, 3, 4. The half mark is rounded to the nearest whole number. Since a remainder exists from each of these divisions, the number is declared as prime.

Click here to demo the script!

Click here to download this script!

Filed under: ScriptsTagged with: , , ,

PHP fopen() Function

The fopen() function will open any valid file or url.

If the function fails it will return false along with an error generated. You can hide the error message by adding an “@” in front of the function name.

Syntax

[code lang=”php”]
fopen(filename, mode, include_path, context);
[/code]

Parameters

filename (String | Required)

This specifies the URL or file to open. Example: “./files/myfile.zip“.

mode (String | Required)

The type of access you are requesting for the file.

These are the valid access modes:

  • r” (Read only. Starts at the beginning of the file)
  • r+” (Read/Write. Starts at the beginning of the file)
  • w” (Write only. Opens and clears the contents of file; or creates a new file if it doesn’t exist)
  • w+” (Read/Write. Opens and clears the contents of file; or creates a new file if it doesn’t exist)
  • a” (Write only. Opens and writes to the end of the file or creates a new file if it doesn’t exist)
  • a+” (Read/Write. Preserves file content by writing to the end of the file)
  • x” (Write only. Creates a new file. Returns FALSE and an error if file already exists)
  • x+” (Read/Write. Creates a new file. Returns FALSE and an error if file already exists)

include_path (Boolean | Optional)

This can be set to 1 or TRUE if you want to search for the requested file in the include path, also.

context (String | Optional)

Defines the context of the file stream. This is a set of options that change the behavior of the stream.

Originally posted at w3schools.com:

Note: When writing to a text file, be sure to use the correct line-ending character! Unix systems use \n, Windows systems use \r\n, and Macintosh systems use \r as the line ending character. Windows offers a translation flag (‘t’) which will translate \n to \r\n when working with the file. You can also use ‘b’ to force binary mode. To use these flags, specify either ‘b’ or ‘t’ as the last character of the mode parameter.

Here I showed you how to upload a file from a URL using this function.

Example:

[code lang=”php”]
$filename = “./images/myimage.jpg”;

$file = fopen($filename,”r”);

if($file){
echo “We have the file.”;
} else {
echo “File not found.”;
}
[/code]

Filed under: PHP, Web ProgrammingTagged with: , ,

PHP Pagination with Mysql

So you have a Mysql table you want to pull data from, but you don’t want to flood the page with everything in the table right! So you need some pagination to seperate all the content in the table into easy to open pages.

So let’s say this is your mysql query:

[code lang=”php”]
$sql = mysql_query(“SELECT * FROM table1”) or die(mysql_error());
[/code]

So this will grab everything from table1.

If we have a lot of rows in this table this is going to return all of them, so we need to make a pagination for all the rows returned. This requires modifying the query and adding some variables. I like to have the PER_PAGE,OFFSET, and PAGE_NUM variables defined so you can use them globally in every class and function, however you may not want the same values throughout so declare them as you wish.

Here is the header PHP for definitions:

[code lang=”php”]
// === START Pagination definitions === //
$pgNperPage=15;
$pgNpageNum=1;
if(isset($_GET[“p”])){
$pgNpageNum=(int)$_GET[“p”];
}
$pgNoffset = ($pgNpageNum – 1) * $pgNperPage;
// definitions
define(“SITE_URL”,”http://mysite.com/”,true);
define(“PER_PAGE”,$pgNperPage,true);
define(“OFFSET”,$pgNoffset,true);
define(“PAGE_NUM”,$pgNpageNum,true);
// === END Pagination definitions === //
[/code]

So we have to modify the query we use in $sql to include a limit with the offset and per page values used. I have made a pagination function which will do everything for me. We’ll pass the query along with some parameters through this function to output the new query and the pagination HTML.

Here is the function syntax:

[code lang=”php”]
pagination($query,$pageNum,$perpage,$sortable,$cat=””,$sort=””,$headers=””,$pageL=””);
[/code]

Function Paremeters:

  • $query – The original query to use for the Mysql. i.e. “SELECT * FROM table1”. (No ORDER BY or LIMIT).
  • $pageNum – Current page number.
  • $perpage – Per page integer value.
  • $sortable – Array of sortable fields in mysql table to order the results by.
  • $cat – What is being paginated. i.e. (Users, videos, comments, etc.) [Optional]
  • $sort – Field in Mysql table to sort it by. Default in the function definition is “timestamp” – usually used for date. [Optional]
  • $headers – Additional URL headers besides the sort and page number. i.e. “&g=bf-2142” (Start with & not ?) [Optional]
  • $pageL – Pagination letter. Useful if you have multiple paginations on one page. i.e. “cp”. (Default is p.) [Optional]

Here is the pagination function definition:

[code lang=”php”]
function pagination($query,$pageNum,$perpage,$sortable,$cat=””,$sort=””,$headers=””,$pageL=””){
$pagination = array();
$paginationDetails = “”;
$adjacents = 3;
if(!$perpage){
$perpage = 15; // default
}
if($cat){
$cat = ” “.$cat.””;
}
$pageNum = (int)$pageNum;
if(!$pageNum){
$pageNum=1;
}
if(!$pageL){
$pageL=”p”;
}
$pgNoffset = ($pageNum – 1) * $perpage;

if(isset($_GET[‘dsc’]) && $_GET[‘dsc’] != “”){
$dsc = “DESC”;
$urldsc = “&dsc=1”;
} else {
$dsc = “”;
$urldsc = “”;
}
if(is_array($sortable)){
if(in_array($sort,$sortable)){
$sort = trim($sort);
} else {
$sort = “”;
}
}
if($sort){
$order_by = “ORDER BY “.$sort.” “.$dsc.””;
} else {
$order_by = “”;
}
$limit = “LIMIT “.$pgNoffset.”,”.$perpage.””;
$queryNew = $query.’ ‘.$order_by.’ ‘.$limit;
$pagination[] = $queryNew;
if(strpos($_SERVER[“REQUEST_URI”],”?”)){
$pos = strpos($_SERVER[“REQUEST_URI”],”?”);
} else {
$pos = strlen($_SERVER[“REQUEST_URI”]);
}
$pageURL = substr($_SERVER[“REQUEST_URI”],0,$pos);

$pageURL .= “?sort=”.$sort.””;
$pageURL .= “&dsc=”.$dsc.””;
$pageURL .= $headers;

$sql = mysql_query($queryNew) or die(mysql_error());
$count = mysql_num_rows($sql);
if($count > 0){
$totalQuery = mysql_query($query) or die(mysql_error());
$totalCount = mysql_num_rows($totalQuery);
$total = ceil($totalCount / $perpage);
$pm1 = $total – 1;
$paginationDetails .= ‘

Displaying ‘.$count.’ of ‘.$totalCount.$cat.’.

‘;
if($pageNum > 1){
// previous button
$paginationDetails .= ‘

‘;
}
// conditionals for breaking up the pages
if($total < 7 + ($adjacents*2)){ // not enought to break up for($page=1;$page<=$total;$page++){ if($page == $pageNum){ $paginationDetails .= '

‘;
} else {
$paginationDetails .= ‘

‘;
}
}
}
else if($total > 5 + ($adjacents*2)){
// enought to hide some
if($pageNum < 1 + ($adjacents*2)){ // hide later pages for($page=1;$page<5+($adjacents*2);$page++){ if($page == $pageNum){ $paginationDetails .= '

‘;
} else {
$paginationDetails .= ‘

‘;
}
}
$paginationDetails .= ‘

‘;
$paginationDetails .= ‘

‘;
$paginationDetails .= ‘

‘;
}
else if($total – ($adjacents*2) > $pageNum && $pageNum > ($adjacents * 2)){
// in middle, hide little front and back
$paginationDetails .= ‘

‘;
$paginationDetails .= ‘

‘;
$paginationDetails .= ‘

‘;
for($page=($pageNum – $adjacents);$page<=($pageNum + $adjacents);$page++){ if($page == $pageNum){ $paginationDetails .= '

‘;
} else {
$paginationDetails .= ‘

‘;
}
}
$paginationDetails .= ‘

‘;
$paginationDetails .= ‘

‘;
$paginationDetails .= ‘

‘;
}
else {
// close to end, hide early pages
$paginationDetails .= ‘

‘;
$paginationDetails .= ‘

‘;
$paginationDetails .= ‘

‘;
for($page=$total – (3 +($adjacents*2));$page<=$total;$page++){ if($page == $pageNum){ $paginationDetails .= '

‘;
} else {
$paginationDetails .= ‘

‘;
}
}
}
}

if($pageNum < $total){ $paginationDetails .= '

‘;
}
$paginationDetails .= ‘

Page ‘.$pageNum.’ of ‘.$total.’ ‹ Prev ‘.$page.’ ‘.$page.’ ‘.$page.’ ‘.$page.’ ‘.$pm1.’ ‘.$total.’ 1 2 ‘.$page.’ ‘.$page.’ ‘.$pm1.’ ‘.$total.’ 1 2 ‘.$page.’ ‘.$page.’ Next ›

‘;
$pagination[] = $paginationDetails;
}
return $pagination;
}
[/code]

Now we just need to include the HTML and CSS classes for the pagination so viewers can navigate through the pages returned from this query.

Pagination CSS:

[code lang=”css”]
.pagination,.pagination div {
background-color: #eee;
font: 11px tahoma;
border: 1px solid #ccc;
text-align: left;
}
.a_td {
color: #343434;
background-color: #fff;
font-size: 11px;
font-family: tahoma;
}
.a_page {
color: #343434;
background-color: #fff;
font-size: 11px;
font-family: tahoma;
padding:0px;
}
.a_page:hover {
background-color: #eee;
}
.a_page a {
display:block;
padding:2px;
color: #333;
text-decoration: none;
}
.page_selected {
background-color: #333;
color: #fff;
font-weight: bold;
font-size: 11px;
font-family: tahoma;
}
.page_selected a {
color: #000;
}
[/code]

Now we have the function included on our page along with the necessary CSS styles. Now we can call the function and echo the contents of the returned array. The function pagination returns an array like so: pagination = [newMysqlQuery, paginationHTML].

So let’s say this was our function for downloads:

[code lang=”php”]
function downloads($g){
$g=mysql_real_escape_string($g); // Game
$validSorts = array(“title”,”catType”,”dl_count”,”timestamp”); // Sorts
if(isset($_GET[‘sort’]) && in_array($_GET[‘sort’],$validSorts)){
$sort = mysql_real_escape_string($_GET[‘sort’]);
} else {
$sort = ‘timestamp’; // default sort used.
}
if(isset($_GET[‘dsc’])){
$desc = “DESC”;
} else {
$desc = “”;
}
if(isset($_GET[‘p’])){
$page = (int)$_GET[‘p’];
} else {
$page = 1;
}
$query = “SELECT * FROM downloads WHERE gameCat = ‘$g'”;
$pagination = pagination($query,$page,15,$validSorts,”downloads”,$sort,”&g=”.$g.””); // Call the function.
$sql = mysql_query($pagination[0]) or die(mysql_error()); // $pagination[0] = new query.
$count = mysql_num_rows($sql);
}
[/code]

Now we have called the pagination function with some variables for displaying our downloads. Along with printing the pagination HTML you could display the rows with the new Mysql query that the function returns.

See how to display Mysql Rows here!

For this example we will simply echo the pagination HTML:

[code lang=”php”]
echo $pagination[1];
[/code]

Check this function out LIVE here:

http://bfgamerz.com/members.php

Filed under: MySQL, PHP, Tutorials, Web ProgrammingTagged with: , , , ,

PHP Date() Function

The date() function converts a given timestamp into a readable date format.

Here is the syntax for this function:

Syntax

[code lang=”php”]
date(format,timestamp);
[/code]

Parameters:

format
This parameter determines the format and how the date will read.

For example: “Saturday, Nov. 16th 2009” would be the following code:

[code lang=”php”]
$timestamp = time();
date(“l, M. jS Y”,$timestamp);
[/code]

timestamp
This parameter is the timestamp you want to use to format a date from. This timestamp is a number of seconds since a certain date, since we used the current timestamp of time() we are making the date for the current time.

We’ll break down our example to see what each set of letters represents as part of the date’s format.

  • l – day of the week, textual, long; i.e. ‘Friday’
  • M – month, textual, 3 letters; i.e. ‘Jan’
  • j – day of the month without leading zeros; i.e. ’1′ to ’31′
  • S – English ordinal suffix, textual, 2 characters; i.e. ‘th’,‘nd’
  • Y – year, 4 digits; i.e. ’1999′

View the complete date format reference here.

Filed under: PHP, Web ProgrammingTagged with: , ,

PHP Date Formats Reference

Here is a table for formatting the PHP function date() and the letters used to represent different parts of a timestamp.

a ‘am’ or ‘pm’
A ‘AM’ or ‘PM’
B Swatch Internet time
d day of the month, 2 digits with leading zeros; i.e. ’01’ to
’31’
D day of the week, textual, 3 letters; i.e. ‘Fri’
F month, textual, long; i.e. ‘January’
g hour, 12-hour format without leading zeros; i.e. ‘1’ to ’12’
G hour, 24-hour format without leading zeros; i.e. ‘0’ to ’23’
h hour, 12-hour format; i.e. ’01’ to ’12’
H hour, 24-hour format; i.e. ’00’ to ’23’
i minutes; i.e. ’00’ to ’59’
I (capital i) ‘1’ if Daylight Savings Time, ‘0’ otherwise.
j day of the month without leading zeros; i.e. ‘1’ to ’31’
l (lowercase ‘L’) day of the week, textual, long; i.e. ‘Friday’
L boolean for whether it is a leap year; i.e. ‘0’ or ‘1’
m month; i.e. ’01’ to ’12’
M month, textual, 3 letters; i.e. ‘Jan’
n month without leading zeros; i.e. ‘1’ to ’12’
r RFC 822 formatted date; i.e. ‘Thu, 21 Dec 2000 16:01:07 +0200’
(added in PHP 4.0.4)
s seconds; i.e. ’00’ to ’59’
S English ordinal suffix, textual, 2 characters; i.e. ‘th’,
‘nd’
t number of days in the given month; i.e. ’28’ to ’31’
T Timezone setting of this machine; i.e. ‘MDT’
U seconds since the epoch
w day of the week, numeric, i.e. ‘0’ (Sunday) to ‘6’ (Saturday)
Y year, 4 digits; i.e. ‘1999’
y year, 2 digits; i.e. ’99’
z day of the year; i.e. ‘0’ to ‘365’
Z timezone offset in seconds (i.e. ‘-43200’ to ‘43200’). The
offset for timezones west of UTC is always negative, and for those east
of UTC is always positive.
Filed under: PHP, Web ProgrammingTagged with: , ,