Shaibanii.com


Archive for the ‘PHP’ tag


Year PHP Code

Written by Shaibanii Pressed on December 2nd, 2008 - 9:18 pm Filled Under: Randomness

If you wanna use the current year for a copyright statement or whatever and not have to update it every year (if you’re that lazy :P) Here’s how:

If you’re in a WordPress environment:

1
<?php the_time('Y'); ?>

Output: 2008
(Yes, I can execute PHP in my posts.)

And in any normal .php page, you can get the year from your server.

1
<?php echo date('Y'); ?>

Output: 2008
So on exactly 31/12/2008 11:59, it’ll be 2008, and the next minute, well.. you know what’s gonna happen. :-)

Comments


Iframes Out, PHP In: Revised

Written by Shaibanii Pressed on December 2nd, 2008 - 7:37 pm Filled Under: Tutorials

Iframes Out, PHP In

Ok from what I’ve been told my previous tutorial was too confusing. I’ll do it again. This time I’ll try to make it more detailed.

Yes, you heard me, Iframes out. Yes a site can work without them. Calm down :-| Why would you wanna get rid of Iframes?

1. They’re old
2. Too “limiting”
3. Its harder to get on Google etc. with them.
4. They’re un-professional IMO.
5. They rob scripts of their functionality.

I don’t hate them, I just dislike them.

So this is your index.html page, you should make sure tags are closed, and that there’s only one of the following tags:

  1. <html>…</html>
  2. <head>…</head>
  3. <title>…</title>
  4. <body>…</body>

Read the rest »

Comments


Iframes Out, PHP In

Written by Shaibanii Pressed on August 30th, 2008 - 12:05 pm Filled Under: Tutorials

Rate: This sucks!Could be betterDecentVery GoodPerfect!

Loading ... Loading ...
Yes, you heard me, Iframes out. Yes a site can work without them. Calm down :-| Why would you wanna get rid of Iframes?
1. They’re old
2. Too “limiting”
3. Its harder to get on Google etc. with them.
4. They’re un-professional IMO.

So we’re gonna get rid of them using PHP :-D
Note: Remember to save all your files that use this method with the .php extension.
Read the rest »

Comments