Mostrando las entradas con la etiqueta programming. Mostrar todas las entradas
Mostrando las entradas con la etiqueta programming. Mostrar todas las entradas

sábado, 6 de febrero de 2010

HipHop for PHP: First look

Just this tuesday Facebook announced a ambitious project called “HipHop for PHP”, if you missed it general opinion says you have been coding PHP in a cave. As I write this review no code has been posted yet, but Facebook has made a great move to open source the project so we can all get our hands on it, use it and contribute to it. So since the code is not out there yet, this is literally a first impression article based on the presentation made by Facebook and various posts from core PHP developers who got a first look at the technology before the release.


(more...)

martes, 23 de junio de 2009

Create better namespaces in PHP

PHP V5.3 introduces the ability to provide namespaces to your PHP classes, constants, and functions. Using namespaces allows you to avoid naming collisions and provide context for your PHP code. These tips provide a few guidelines for building your namespaces so that you get the most out of them.


(more...)

martes, 6 de enero de 2009

How to load content via AJAX in jQuery

This tutorial will show you How to load content via AJAX in jQuery.

sábado, 13 de diciembre de 2008

martes, 23 de septiembre de 2008

Building Your Own Desktop Notepad Application Using PHP-GTK

If you think building a desktop application such as Notepad is difficult, think again. If you use PHP-GTK, it's almost ridiculously easy. This article will show you how. By the time you're done, you'll have a full cross-platform application in about 100 lines.

miércoles, 2 de julio de 2008

Anatomy of an Ajax Application

This chapter covers the shortcomings of the traditional web interface, identifying specific problems to be overcome. It also introduces the various building blocks of an Ajax application and discusses how they work together.

What You'll Learn in This Chapter:

* The Need for Ajax
* Introducing Ajax
* The Constituent Parts of Ajax
* Putting It All Together

In this chapter you will learn about the individual building blocks of Ajax and how they fit together to form the architecture of an Ajax application. Subsequent chapters will examine these components in more detail, finally assembling them into a working Ajax application.

martes, 1 de julio de 2008

Manipulate Excel Spreadsheets with PHP on Linux

Have you ever faced a situation when you need to manipulate Excel spreadsheets with PHP on the server that is running Linux? If you had a Windows Server you could use PHP COM extensions. However they are unavailable on Linux.

Hopefully, there is a solution. It is called Open XML. It’s a new format of Microsoft Office documents introduced in Microsoft Office 2007. Basically, an Open XML file is a ZIP archive that contains XML files that represent the document mark-up. You can view it yourself or read some documentation, my article isn’t about Open XML, but about the PHP library for working with Excel 2007 files. It also supports Excel 97 format by incorporating a PEAR library.

The library is called PHPExcel. It allows you to read/write Excel spreadsheets, save them in many formats including PDF and HTML. It supports formulas,styles and etc.

It requires:

  • PHP 5.2+
  • GD extension
  • XML extension
  • ZIP extension

I have these two simple examples that show you how to create an Excel spreadsheet and save it in several formats and how to read a spreadsheet and display it on the HTML page.



lunes, 30 de junio de 2008

9 PHP Debugging Techniques You Should Be Using

Save yourself time, effort and headaches by employing the debugging techniques discussed in this article. I cover topics from enabling notices to writing Unit Tests, as well as some ideas you may not have thought of...

domingo, 29 de junio de 2008

AjaxCRUD

AjaxCRUD is an open-source PHP API which allows you to connect to a mySQL database and easily perform the necessary CRUD operations (create, read, update, & delete rows).

(more...)

Prevent form post request from another domain in PHP

HTTP POST request from outside domain is one of the way of attacking your website. A intruder can use JavaScript in other domain or localhost to send the repetitive POST request to your web page containing PHP script. We must prevent this kind of cross domain form posting which might be harmful of our website.

(more...)

viernes, 20 de junio de 2008

Building a Unique Contact Form

I’m calling this Part 2, because last week I began this adventure over on Tutorial Blog where we first designed a unique contact form:

Photoshopping a Unique Contact Form

Here we are going to pick up where that left off and actually build this thing with HTML/CSS, as well as add some validation with jQuery, and make it tick with PHP. Here is what we are building.

miércoles, 18 de junio de 2008

LDAP authentication with PHP

Wouldn’t it be nice to authenticate your intranet applications or website users against an LDAP server?
The main reason why we could do this is to centralize the user credentials, our valuable users will only have to remember one password for all their applications / services.

In this example, I will try to explain how to connect to a Zimbra LDAP server using php5-ldap.

lunes, 16 de junio de 2008

Reading/Parsing Excel Spreadsheet using PHP

In this tutorial we will see, how we can easily parse or read an Excel sheet and display the parsed data to user. Even though we are going to display the output, the other extension of this technique is that we can parse an excel sheet filled with data, in set format, and convert it into SQL statement and insert the data into database. Now this is an easy task on an windows based server, to do the same thing in Linux we need to use some other libraries.

This tutorial assumes that you know PHP.

domingo, 15 de junio de 2008

Screencast: Introduction to jQuery

The popular javascript library jQuery is an amazing way to extend the design possibilities of your site beyond what CSS can do. But luckily, if you are already comfortable with CSS, you have a huge head start in jQuery! This is a very basic introduction to including jQuery on your web page and getting started writing a few functions.

(more...)

sábado, 14 de junio de 2008

Tips for Creating your First WML Page

WML (Wireless Markup Language) is the new web language for making sites on mobile phones. WML is used to create pages that can be displayed in a WAP browser. WML is a content format for devices that implement the WAP specification, and preceded the use of other markup languages now used with WAP, such as XHTML and even standard HTML. Pages in WML are called DECKS. Decks are constructed as a set of CARDS.

(more...)

viernes, 13 de junio de 2008

Database-enabled Ajax with PHP

Ajax has taken the Web to a new level by offering an intuitive interactive model that rivals the desktop. To compete with desktop applications, database interaction is necessary to unleash the true power of an Ajax Web application.

In this article you'll learn how to create database-enabled Ajax requests using PHP and MySQL.

jueves, 12 de junio de 2008

Using Eclipse+PDT as a PHP IDE

There are a lot PHP Integrated Development Environments (IDEs) on the market, some freeware, some pretty expensive. In this tutorial you will learn how to install and use Eclipse + PDT.

Filtering User Input in PHP

Never trust input. I have said this many times before, and am always cognizant of this phrase when I am developing new websites or web applications. Always assume that someone is going to try to exploit your program - be it with malicious intentions or not.


With this article, I want to shed some light on some of the ways to protect the security, quality and integrity of you web applications written in PHP and MySQL. There is always going to be rotten people out there that want to take advantage of a poorly secured or filtered program - think of it like someone breaking into a house that has no locks on the front door.

Manipulating PHP arrays with SQL

With toolkits like LINQ for .NET and the subsequant PHPLinq (thanks Nick), we're always looking for more power to manipulate data in-memory rather than writing one-off algorithms to do whatever commonly used sorting, ordering & manipulation you need.

Trent Richardson created a very small and simple JsonSQL library for JavaScript which allows you to run an extremely limited subset of SQL against a Json array/object.

I quickly ported it over to PHP 5 and it works like a charm, although the syntax for the WHERE clause isn't exactly the same but the rest ported across properly.

(more...)

domingo, 8 de junio de 2008

How I hacked Digg

Two weeks ago I filed a bug report on Digg.com, explaining several XSS vulnerabilities and bugs I found. Some of these were (and some still are!) very critical. A day later, I got an automated response to my report:

We’ve contacted our development team who are investigating the issue, and will fix it as soon as possible.


All well and good I thought, but when a few days ago all vulnerabilities were still there, I decided to exploit one of them.