miércoles, 12 de marzo de 2008

Migrating Web-Based PHP Applications to Ajax

This article describes a makeover of a typical database-backed web form. We'll show some old code – a mixture of HTML, JavaScript, and PHP – and rebuild it with modern web techniques like Ajax, and modern tools like jQuery. The benefits will include:

  • Separating dynamic content from static content.
  • Separating content, style, and processing.
  • Web client-server communication via function calls.
  • Partial page updates instead of flash-bang page reloads.
  • Faster development and more maintainable code.
  • Faster load times and improved caching.


(more...)

PC-BSD 1.5 now available!

The PC-BSD Team is pleased to announce the availability of PC-BSD version 1.5! This release includes many new features and fixes, including the following:

  • NEW System Updater tool - Keeps system & PBIs up to date - Allows override variables, so that admins can use their own mirrors / servers to roll out updates to users.
  • NEW sound detection program! Uses XML backend to identify and load modules
  • NEW amd64 build of 1.5, including PBIs that are on our auto-build server
  • NEW PBI icon preview library, now a PBI file shows the embedded icon on your desktop, not the generic "PBI" format icon
  • Xorg 7.3
  • KDE 3.5.8
  • FreeBSD 6.3 Release

(more...)

Write a well structured CSS file without becoming crazy

This is a descriptive post about how to write a well structured CSS file. I already spoken about code readability in CSS files, but after several most specific requests about this argument (mainly about the difficult of some readers to manage CSS file with a big quantity of layout elements), I decided to illustrate the process I use in these cases.

I experienced, proceeding without "order" or a clear vision about what you want to realize can be harmful and you risk to add, change, remove classes and properties, with the only result to have untidy code with a lot of unused elements on your final product.

Before you start writing directly CSS code, I suggest you to prepare a "draft" with all sections your site will have. Then follow these simple "rules" to optimize your work.

(more...)

lunes, 10 de marzo de 2008

How to design a sexy header for your site using CSS

Yesterday I received a lot of positive messages about the new template of my site. Expecially for the new header (in particular the green bar on top of the page). Some of my readers asked to me to dedicate a post about how to realize a similar "graphic composition", so I decided to publish a post with the "process" I use in general to design graphical sections for my web sites.

Acid 3 is out! IE 5.5 beats IE 7?

I am quite excited. The Acid 3 web standards-compliance test is now up, and there’s no browser in existence yet that fully succeeds at the test.

Let me explain what these results are telling us before I show them. The World Wide Web Consortium (W3C) develops standards for Internet applications. For example, XHTML, HTML, CSS, etc. Acid 3 basically takes a lot of W3C’s newer standards and tests to be sure that the browser supports the features it should and that it behaves as it should when using them. Acid 3 is a suite of 100 different tests to be sure that these standards are being met. So when I say that browser X gets a score of 55%, this means that browser X passed 55 of the 100 tests it was given.

Here are the results as they currently stand (tested myself)

domingo, 9 de marzo de 2008

Check your DNS records with dig

Have you ever wanted to query the Domain Name System (DNS) to discover what information it holds about your domain? Do you have some important changes to make to your DNS records and need a way to verify your changes? Here's how to check your DNS records with a tool called dig.

Hide .php extension with url rewriting using .htaccess

Last time I’ve written an article about hiding php file extension where I’ve showed you how you can use .html or .asp extension of file instead of .php extension. But there was one flaw in that technique you have had to change the file extension explicitly but in this post I’m going to show you how to rewrite the URL instead of renaming the file extension Using this technique you will see product.html in the address bar of the browser but the actual file name remains product.php and you don’t need to rename the file extension. Furthermore you can rewrite the URL like product.php?id=5 to product-5.html.

"When a search engine visits the dynamic url like product.php?id=5 it does not give much importance to that URL as search engine sees “?” sign treat it as a url which keeps on changing. so we’re converting the dynamic URL like the product.php?id=5 to static url format like product-5.html. We’ll rewrite the url in such a way that in browser’s address bar it will display as a product-5.html but it actually calls the file product.php?id=5. So that why these kind of URL also named as SEO friendly URL."

(more...)

How They Hack Your Website: Overview of Common Techniques

We hear the same terms bandied about whenever a popular site gets hacked. You know… SQL Injection, cross site scripting, that kind of thing. But what do these things mean? Is hacking really as inaccessible as many of us imagine; a nefarious, impossibly technical twilight world forever beyond our ken?

Not really.

When you consider that you can go to Google right now and enter a search string which will return you thousands of usernames and passwords to websites, you realize that this dark science is really no mystery at all. You’ll react similarly when you see just how simple a concept SQL Injection is, and how it can be automated with simple tools. Read on, to learn the basics of how sites and web content management systems are most often hacked, and what you can do to reduce the risk of it happening to you.

Creating a CAPTCHA image with security code to validate forms

In this tutorial you will learn to create a security code image generator, or a CAPTCHA image, that is so helpfull against spammers.

sábado, 8 de marzo de 2008

Writing Silverlight applications in PHP

"In my last post about Phalanger I mentioned that our important goal is to support the Silverlight (2.0) platform. Shortly Silverlight is a cross-browser platform that can be used for developing client-side components that run in the web browser and contain rich media, graphics and can interactively communicate with the user. The language that can be used for writing Silverlight code can be in general any .NET language, so our goal is to allow using PHP by making Phalanger compatible with Silverlight."

(more...)

Monitoring a slow system

When your UNIX® system runs slow, it is vital that you discover what the problem is as quickly as possible so you can get your system back into the normal operating mode. There are many causes for a slow system, but actually identifying the problem can be exceedingly difficult. In this article, study examples of how to identify and diagnose the cause of your slow running UNIX system to get your machine running properly again.

Automatically backup your mysql databases daily

This script will not only backup all the databases on your server once a day, but it will also optimize/repair them -- and to keep things clean, it gzips the backups and automatically deletes any backups that are more than 3 days old. You must have the root mysql password in order to use this particular script, though.

viernes, 7 de marzo de 2008

Create Your Own Cross-Platform Backup Server

Backing up your data on a regular basis is important, and turning a spare computer into a backup server is often the best way to make sure it gets done. But most methods require either a good deal of command-line learning or serve only one operating system. Not with Restore, a free, open-source backup system that can install or run from a live CD, work with any OS, and operate through a simple browser-based interface. Today I'll demonstrate backing up a Windows laptop to an older desktop, but you'll see how Restore can be easily molded to fit just about any home backup needs.

(more...)

Lighttpd Webserver setup with php5 and Mysql support

Security, speed, compliance, and flexibility — all of these describe lighttpd (pron. lighty) which is rapidly redefining efficiency of a webserver; as it is designed and optimized for high performance environments. With a small memory footprint compared to other web-servers, effective management of the cpu-load, and advanced feature set (FastCGI, SCGI, Auth, Output-Compression, URL-Rewriting and many more) lighttpd is the perfect solution for every server that is suffering load problems. And best of all it’s Open Source licensed under the revised BSD license.

(more....)

Filtering input variables

Hundreds if not thousands of vulnerabilities have been discovered in php based application because of the lack of filtering of input data. You can never trust a user, and verify what you are receiving.

The lack of securing input data can lead to sql injections, php injections, path disclosures, and more vulnerabilities. Some of these can be a serious risk not only for your website or a database but also to the whole server where your site is hosted. For example using mysql injection and path disclosure it’s possible to read and even write files (of course it depends on the server configuration.).

(more...)

Installing Backtrack Linux to a USB Thumb Drive

A few months back, when I was doing to series on my Capstone class for school, I wrote about installing Backtrack Linux to your hard drive. For those not in the know, or for those that didn't read my article, Backtrack Linux is a Linux distro based off Slackware Linux, and is designed for pentesting, and hacking. It normally comes as a live CD, and is pre-packaged with all sorts of hacking tools and scanners.

(more...)