Archive for the ‘PHP’ category

Getting back to shared servers problems. I have some very time consuming scripts running through CRON – some nice web scrapping jobs. They are not processing-intense, but rather slow because of slow websites. All these jobs are really hard to divide in to separate scripts (another article), so one script should have no limits to [...]

If you have been programming websites long enough you would know that user input is first think to worry about when thinking about security. It’s really hard to decide what data is acceptable, especially when user has permission to insert HTML content through form.
For example, if you are developing CMS you need to make sure [...]

PHP charting library JpGraph

March 19th, 2009

Recently code-diesel posted 6 charting libraries, but I haven’t found JpGraph there. JpGraph was recommended to me some yeas ago by my good friend and I have been using it since then. It has some major disadvantages, but there are very big strengths also – all in this article.
Compared to other libraries, especially SWF [...]

One may debug his application with print(”) statements all other the place or alert(”) for JavaScript. Luckily some years ago Firebug extension for Firefox was introduced, which introduced (?) console. Console works absolutely the same as in Linux and can be used not only to execute commands, but receive information from various sources.
To start with, [...]

As websites grows, searches like “LIKE title ‘%search term%’” becomes unreliable. There are very good solutions like Sphinx, Lucene, etc, but not surprisingly, you can’t always have Sphinx installed (shared servers again) and other solutions should be chosen.
MySQL supports full-text indexing, but it doesn’t give a lot of control over actual index. Luckily, Zend [...]

Phing is a project build system. It’s wonderful tool to automate every-days task by writing build scenario – Phing can do everything what can be done with PHP or Linux console applications. Today I was trying to use it in shared hosting server, but as you will see, Phing can’t do a lot of it’s [...]

Scraping websites with XPath is very easy (read here), but how to scrape user’s friends list from social website if it can be viewed only when user is logged in?
What we need to do is to implement algorithm, which posts login and password fields to website login form and uses the same PHPSESSID id for [...]

Currently I’m working on a new project which works on Zend Framework. I really like this framework and it has been my favourite for quite a long time – I especially like it’s standalone components and huge space for your personal programming style. But… I don’t know how to correctly implement modularity in Zend Framework.
I [...]

PayPal payment with encryption

February 22nd, 2009

Recently phpfour.com posted very interesting library for payment gateways. In my situation, PayPal is only used to pay for orders – cart and order setup is done in our shop, so I do not want to have additional problems with users changing orders numbers, amount to be paid, etc. Today I’m going to show how [...]

I believe that everyone who develops in PHP knows Zend (I know them from certification which I’ve done some time ago), especially now, when Zend Framework is more and more popular. Zend also makes (and probably specializes) software for web servers – Zend Guard, Zend Optimizer, etc. Recently Zend introduced new product – Zend Server. [...]