Tagged: PHP

Quick-Start Guide to ADOdb Database Abstraction Library for PHP

PHP (and yes it’s for Python too..!) Adodb library has been one of the popular database abstract library since sometime now. We have been using it since sometime for simple operations when we are not using standard framework and probably just serving the plain web-services.

Here is a quick start guide to get started with Adodb5 library when using with PHP to get started with most basic functions for database interactions. For more details one can always browser around and read through detail documentation available at http://phplens.com/lens/adodb/docs-adodb.htm. This is just a quick start guide for all those who just want it little faster to get along with.

Truncate last N lines of a file using PHP

For one of my project I needed to remove certain footer / tail-end lines from the file to make it clean as it was containing some summary of records within the file. Because if I do that it can be directly loaded into database by LOAD DATA command. To remove lines from the end of file you can use following snippet of code:

Netbeans 7.0 RC1 Released

Netbeans has been one of my favorite IDE for PHP, I have been using it in my day to day usage for most of my projects. I have been using Netbeans since 6.x. I know it’s Java based IDE which needs powerful machine just like Eclipse. But some of the feature it offers are even not available in commercial competitors. One of the best feature is “Quick Search”, the way it provides search through list of file is awesome. Something similar I have seen is in JetBrains PHPStorm but could not find it in Enterprise class Eclipse.

Reading MSSQL BLOG column data with PHP

I was working on a migration script to transfer data from legacy desktop software to Portal we have developed. While migrating attachments (stored as TIFF files) in BLOB (Long Binary) in Microsoft SQL Database Server using PHP it was not a cake-walk. When I observed every time it was creating a file of same size (4KB). I quickly understood that there is some limitation (of size) for reading records in PHP configuration.

Posting or Uploading Files using cURL with PHP

cURL is very important tool for PHP programmers, we tends to do so many thing with using this tool. Posting data, imitating a form post and lot more, it’s usage is countless. Some time back I came across situation where we have to post files to a 3rd party faxing service. I knew there are many possibilities but I didn’t wanted to get into sockets and file stream to get this done, just wanted to post FILE in addition to rest of the post data.