PHP Basics: Accessing Remote URLs using cURL
In this post, I’m going back to basics to talk about accessing remote URLs with cURL.
In PHP, there are actually four ways to access a remote URL – fopen() fsockopen(), cURL extensions and HTTP_Request class from the PEAR library. Now, choosing one way over another really depends on your needs for simplicity, control, and portability. [...]
In: PHP Tutorials · Tagged with: curl, PHP, tutorial
PHP’s alternative syntax and why it’s useful
PHP offers an alternative way to write their control structures for as long as I’ve remembered. It basically does away with the curly brackets and replaces the opening curly with a colon (:) and the closing with ‘end’-whatever. I have to be honest and say I’ve never really found a need to use the alternative [...]
In: PHP Tutorials · Tagged with: codeigniter, PHP, syntax
CodeIgniter: Extending the native ‘Model’ and make it your own.
Today I took advantage of CodeIgniter’s ability to extend the native libraries, and I was well satisfied that it just works.
Let me elaborate, I’m in the process of creating models for my CI project, and realized that certain functions within the models were getting repetitive. Using CI’s ability to create my own custom libraries, [...]
In: PHP Tutorials · Tagged with: codeigniter, models, PHP
Oracle 11g and PHP
When we talk about PHP, MySQL is often the other word that goes hand-in-hand with it. But Oracle? 2 weeks ago, I had an opportunity to attend the Singapore’s PHP User Group monthly gathering, and the topic was on Oracle 11g and PHP.
Oracle is not often associated with PHP in my world, so the [...]
In: News · Tagged with: database, oracle 11g, PHP
CodeIgniter: Organizing views simply
Having been brought up developing PHP using templating systems like Smarty, I’m very used to segmenting my page elements into reusable block, and swapping out blocks of HTML codes, nesting blocks of code within other blocks and so on.
Trying my hands at using CodeIgniter, one of the first obstacles I had was how to organize [...]
In: PHP Tutorials · Tagged with: codeigniter, PHP, views
Cacti: Ubuntu 8.04 Cacti Plugin – Invalid PHP_SELF Path problem
Lately, I’ve been spending a lot of time with Cacti on my Ubunto 8 install. Cacti as we all know is a (great) PHP wrapper application around the rrdtool command. Cacti and rrdtool are typically used by network/systems administrators for graphing network conditions, churning out great looking graphs for various SNMP data.
I’ve been investigating whether [...]
In: PHP Tutorials · Tagged with: cacti, PHP, plugin
PHP Class for Date Time calculations – Part 2
In my previous posting I touched on a PHP class called DateClass (by Steve Powell) that I downloaded from phpclasses.org. The DateClass package actually contained 2 separate classes. One for manipulating dates and the other for date spans.
This post will cover how to use the DateSpanClass to easily calculate the difference between 2 dates, in [...]
In: PHP Tutorials · Tagged with: class, date, PHP
CakePHP: Baking in frustration
Sometime back, I posted about my first experience with CakePHP. I installed the framework and went through the tutorial on building a simple blog application, and said “I was quite impressed”.
Now, after 3+ development weeks trying to build a real-world application, I think, maybe I was too hasty to draw that conclusion.
In: PHP Tutorials · Tagged with: Beginners' Guide, cakephp, PHP
To interoperate or not?
Later this week I’ll be attending a talk on interoperability, organised by Microsoft. A friend of mine working at the local Microsoft office is organising the event. He was asking me to help spread the word about the event.
We got talking and from what he tells me about his job as an ‘Evangelist’, I [...]
In: News · Tagged with: Microsoft, PHP
PHP or .NET? Help me to choose!
We’ve all encountered it before, and we’ve all asked this question in one way or another. I see it appearing in Yahoo Answers every now and then, and I see similar platform comparison in blogs I read. Its clear this issue is still quite relevant today and will continue to be tomorrow.
So which is better? [...]
In: PHP Tutorials · Tagged with: Microsoft, PHP
