php

The power of 4

Bill Stegers - 1 hour 44 min ago

After (mis)using my prev-gen 15″ Macbook Pro for 8 months, today I finally got round to installing a much needed 4Gb memory upgrade. Together with the 2.6Ghz CPU and the 180Gb 7200rpm drive I should have no problems enjoying this marvel of engineering for some time to come.

Now, if I only had something (as in some gadget) to put the remaining 2×1Gb modules in. I sure do hate this kind of waste.

Categories: php

SocialGeek.be: Clean urls through readable slugs in PHP

PHP Developer - 1 hour 49 min ago

On the SocialGeek blog there's a recent post that looks at making stubs for your URLs, making them easier to read and remember.

This is where the fun begins of course. How many times have you been confronted with someone sending you an indecipherable, thus untrustworthy link? Right, so we agree that for a user, it is important to have a clean URL that is readable and includes the title of the page or (at least) some description related to the content. Slug time!

They explain what slugs are (and how they're useful for users) as well as how to convert a title into a "slugged" string by replacing anything that's not an A-Z or 0-9 character to remove the less URL friendly characters.

Categories: php

FliquidStudios.com: Introduction to using Google's search API

PHP Developer - 2 hours 46 min ago

The Fliquid Studios site has posted their introduction to using the Google Search API via a cURL interface in PHP.

A lot of people these days use 3rd party sites or services to gain SEO data about their site or service. A lot of these people simply do not realize just how simple it is to build some tools to gain statistics from the big search engines. In this post I plan to give you a very basic introduction on how to go about getting some search engine statistics from Google using their API.

They show how to create the connection (including the URL to search on) and a form that can be used to submit the terms back to the script. A demo and downloadable code are included.

Categories: php

php|architect's C7Y: Schedule and Free Webcast Series

PHP Developer - 3 hours 29 min ago

The php|architect crew have officially posted their schedule for this year's php|tek conference (May 2009) and have announced a free webcast series on a range of PHP subjects.

We're happy to finally announce the schedule for php|tek 2009'"a bit late, we know, but with 250 proposals to sort and rank, it was tough work! In addition, we are also introducing a series of free webcasts on a wide range of topics relevant to the PHP world to keep all of us busy while we wait for the conference, culminating with Marco Tabini's opening keynote, live from Chicago at 9:00 on May 22.

You can find out more about the conference from its website and more on the webcasts (and to sign up) here.

Categories: php

DevShed: Polishing the Visual Presentation of a Blogger with the Code Igniter PHP Framework

PHP Developer - 4 hours 24 min ago

DevShed has posted the fifth part of their series looking at CodeIgniter and its use to make a simple blogging application. The focus this time is on the output, working with the views to "pretty up" the resulting pages.

Although in its current state, the blogger works well, its visual presentation looks pretty primitive. Therefore, in this fifth part of the series I'll be adding some CSS styles to the view files that comprise this blog application to improve its look and feel.

They start with a review of the code so far - a simple blogging app with the ability to let users comment on each entry. The HTML and CSS you'll need to add to the views to make the output look more like this.

Categories: php

Published in php|architect

Planet-php - 4 hours 30 min ago
I'm very excited to be able to say that I was published in php|architect, in December's issue. I had the /etc column, where I wrote a bit about phpwomen.org and what we're up to these days. As I've wanted to write for them for ages, I was very chuffed to be asked and it was fun doing it :)
Categories: php

Published in php|architect

Lorna Jane - 4 hours 30 min ago
I'm very excited to be able to say that I was published in php|architect, in December's issue. I had the /etc column, where I wrote a bit about phpwomen.org and what we're up to these days. As I've wanted to write for them for ages, I was very chuffed to be asked and it was fun doing it :)
Categories: php

Johannes Schluter's Blog: Goto your Christmas presents with PHP 5.3

PHP Developer - 5 hours 56 min ago

Johannes Schluter recently looked at one of the new features coming with PHP 5.3 - the goto functionality:

Over the last few days I already mentioned a few hidden gems from PHP 5.3. Now at Christmas I wanted to take a look at some new language feature of the upcoming PHP version: Added "jump label" operator (limited "goto"). (Dmitry, Sara)

No, its not the sort of "goto" you're thinking of - its a bit more limited than that. Johannes mentions that it only allows you to jump within the same execution unit and you can't jump into loops. Used incorrectly, it can be bad but he points out two useful instances - one being a code generator and the other an instance where you might need to drop out of code but not kill off the script in the process (sample code is included for this second one).

Categories: php

Doug Brown's Blog: Difference between ASP and PHP

PHP Developer - 6 hours 45 min ago

In this recent post to his blog Doug Brown spends a little time comparing (at a high-level) some of the differences between ASP and PHP.

The difference between PHP and ASP is that ASP is a Microsoft product based on visual basic syntax whereas PHP has C and Java based syntax. ASP works better on Microsoft servers.

He describes the target audience for each language and talks about the environments that they work best in as well as some general statements about their speed and flexibility. Basing his judgment on the facts he noted, he suggests PHP as the best alternative of the two for being more flexible, running in more places and being a bit faster overall.

Categories: php

Johan Mares' Blog: Running PHP CLI shell scripts

PHP Developer - 7 hours 29 min ago

Johan Mares has a recent post about using PHP on the command line:

I already knew how to run PHP scripts from the command line (CLI), although I never really used it. What was new to me was that there are 2 ways of doing this. The first one is by using the php command and the second, and new for me, is by adding a shebang on the first line of your script.

His first way is to run the PHP file through the interpreter directly (via a command line call to something like "php myfile.php"). The second it to actually include the path to the interpreter inside the PHP file itself and use the shell to execute the contents based on that (adding something like "#!/path/to/php" at the top). Then you just make the file executable and you can run it like any other binary file.

Categories: php

Dave Marshall's Blog: Competition: PHP Job Hunters Handbook up for grabs

PHP Developer - 8 hours 20 min ago

Dave Marshall is having a contest to give away a few copies of the "Job Hunter's Handbook" (by Michael Kimsal) - all you need to do is sign up:

I've got a couple of copies of Php|architect's PHP Job Hunter's Handbook to give away, the only catch is you have to sign up to PHPPositions' feed via email. It's managed by Feedburner, so it can be trusted and you wont get any spam, just super smashing great php jobs in the UK.

If you'd like to find out more about the book (or to order your own copy), head over to the book's page on the php|architect website. Normal price is $27 CAD for Print/PDF and just $23 CAD for the PDF.

Categories: php

Blog from your Ubuntu Desktop

VT's Tech Blog - 8 hours 27 min ago

There is a small utility in Ubuntu called Gnome Blog which allows you to blog directly from your desktop. If you are running firefox on Ubuntu, click on this link to install the package or enter the following command in your terminal

sudo apt-get install gnome-blog

Once installed, right click on an empty area on your panel and add “Blog Entry Poster”. Once you’ve added this click on it to start the app. First time you run, you’ll be prompted to enter details about your blog.

First select your blog type - Blogger, Wordress, LiveJournal and MovableType are all supported here and a few more. For Wordpress blogs, enter your blog’s URL and username and password and you’re all set to go.

Once you’ve set it up properly, you can start your blog post by just clicking on the Blog button on your panel.

7 things….

Planet-php - 12 hours 57 min ago

Already a few days ago I got tagged by Manuel Pichler and Gaylord Aulke. I could not post as I was really sick the last two weeks. Today is the first day where I see light at the end of the tunnel and I feel good enough to answer the questions.

So you really want to know seven things about me ? Well - you asked for it

1. I earned my first money by creating a blackmarket in secondary school for sexual explicit material, which I bought cheap and sold expensive. This was one of the reasons I had to leave this school.

2. My first love was named Commodore 64. I teached myself Assembler and started to rip off music from games, creating my own demos.

3. My holidays are usually spent in croatia as my beloved wife was born there.

4. I work with a bunch of developers in lithuania, and hey - these guys (and girls!) are really good.

5. Recently I donated my book collection of > 2500 science fiction and fantasy books to a shop where handicapped sell the books to life from that.

6. Although I was born in bavaria my limit are 3 litres of beer, after that I am really really drunk.

7. I can’t stand cold weather - I feel well at an average of 26+ degrees. Oh, do you remember 4. ? In .lt the winters are really really REALLY cold and I hate it.

So - now my turn. Not so easy. I think nearly everybody who I know was already tagged, therefore - sorry about that - I need to tag a bunch of german people who I think are not yet tagged by this meme.

Here we go:

1. Nils Langner for teaching PHP
2. Thorsten Rinne just to remember him that he still ows me a self cooked thai menu.
3. Xenjo because I am curious what he would write….
4. Ralf Eggert to support his upcoming Zend Framework book (in german only)
5. Christopher Kunz who runs partly my servers for swoodoo and takes care about themeven from holiday. Thanks Chris !
6. Tomas Liubinas one of the .lt developers I mentioned and actually he was part of the team who won in plat-forms contest.
7. Max Horvath for… hmm… I still wait for the pics

These are the rules apparently:

Link your original tagger(s), and list these rules on your blog.
Share seven facts about yourself in the post - some random, some weird.
Tag seven people at the end of your post by leaving their names and the links to their blogs.
Let them know they’ve been tagged by leaving a comment on their blogs and/or Twitter.

Categories: php

Webdav authentication, authorization and locking

Planet-php - 13 hours 24 sec ago
We just released the 2008.2 release of the eZ Components yesterday. This stable release received 6 months of care by the core developers and many contributors. Thanks to all of you for the great work!My tasks for 2008.2 were dedicated to the Webdav component. This package allows you to easily integrate WebDAV access features into your applications. For the new release I implemented support for authentication and authorization, which allows easy integration into your existing environment. In addition, I added lock support, so the Webdav component now complies to WebDAV class 2 (and almost 3).
Categories: php

7 things - the virus

Planet-php - 13 hours 24 sec ago
When I returned from vacation it looked to me like Planet-PHP blogs were all infected by some strange virus. Everyone seems to be keen on providing 7 things that many people don't know about him. Since I got "tagged" 2 times now (Kore and Sebastian), I'll jump on the bandwagon and also share some secrets with you.
Categories: php

Seven things - tagged by Mark Karpeles

Planet-php - Tue, 2009-01-06 07:50

Sometimes internet memes are something horrible. On PHP, right now, the whole idea is to share seven things about yourself (not things everyone knows about, it won’t be any fun), all of this because of Tony Bibbs (yes, it’s his fault, even if I don’t know him at all, he’s the one who started it all on the Who tagged who).

By the way I’ve been tagged by Mark Karpeles, myself. If you want to know why, you’ll have to read more.

For the people who don’t know me at all, I won’t eat you, you can come and try to talk to me. I started working on PHP’s WDDX extension (right now rewriting a part of it to use xmlreader instead of expat-like stuff) which was maintained by Andrei Zmievski (who wouldn’t have liked at all seeing the wddx functions assuming “everything is ISO-8859-1″, as he said before, “English is not the only language” and stuff like that).
Oh and now, I’m not using Coldfusion at all, I never touched Coldfusion, I use WDDX because it’s a nice serialization system, and because I got something to unserialize it on the other side.

  • Like Paul Reinheimer, I also do some photography.
    I like being able to take still images out of things I see in my daily life, and that’s what cameras are made for. Since I had the chance to travel around, I got a few pictures from other countries, and a few months ago I bought  a second hand Nikon D70s which helps a lot taking nice pictures.
  • I never finish anyth…
    In fact, sometimes, I happen to finish something, but “finishing something” is just too boring. I always do a new version at some point, so nothing is really “finished”. Just tag it with a version number and continue it (already got this thinkgeek tshirt).
  • My first computer was a Sinclair ZX Spectrum 128k +2.
    My mother was writing little games for me in BASIC, and I started BASIC quite soon. I knew almost every instruction in BASIC (was just missing arrays with DIM) and already started touching the ASM part with POKE, PEEK and USR before I was 7. When I was 8, I got an Amiga 500, quickly followed by an Amiga 2000, another Amiga 2000. Today I own two Amiga 1200…
  • During the Paris’ PHP Forum 2008, I showed Lukas Smith around (especially to find a nice place with better food than the forum’s sandwitches). That day I ate twice.
  • I fully speak and understand spoken French, English and Japanese (which I’m unable to write, and sometimes unable to read). I’m able to utter some words in other languages (the tourist survival base) in Italian, Spanish, German, Hebrew, Russian, Latin and some Chinese. I love travelling, and I even went to Tel Aviv (Israël) during my PHP training (hey, PHP3 is from there).
  • I’m geek. And not half, as I even been featured in a documentary called “Suck my Geek“. While I’m mainly a computers geek, I also do common stuff like watching japanese animation (I learnt Japanese from there), replying to “seven things” extraweb memes, troll by using non-existant words, etc…
    Being geek also implies being curious. While I never finish anything, I started a lot of things, including an OS project, a xinetd-like program in PHP, a BitTorrent tracker in PHP using PHP/GTK, IRC bots with PHP (MatrIRX), an IRC daemon in C++, and even more useless things than that. Most of them aren’t documented (I’m not a documentation guy, it was hard to write, it must be hard to use… isn’t it?) but are working, and some of them are even actively developed (I recently got a guy who decided to work on some things for pinetd).
  • I make apple pies.
    Not apple pies like the ones you’re used to eat. My apple pies are uniques. If you ever come to Paris, message me before so I can prepare one and let you take a bite. My apple pie follows a receipe I got from my mother, who got it from my grand-mother, etc

Truncated by Planet PHP, read more at the original (another 1410 bytes)

Categories: php

Robert Basic's Blog: Login example with Zend_Auth

PHP Developer - Tue, 2009-01-06 05:14

Robert Basic has posted an example of the use of the Zend_Auth component of the Zend Framework inside of an example controller.

So, here's what I'm going to do: authenticate an user against a database table using Zend Framework's Zend_Auth component. It's really a piece of cake. You can see a working example here: http://robertbasic.com/dev/login/.

He sets up a registry instance, a database table for the logins and the sample controller with both login and logout functionality. Complete code (and links to Zend Framework documentation are included).

Categories: php

Jani Hartikainen's Blog: Decoupling models from the database: Data Access Object pattern in PHP

PHP Developer - Tue, 2009-01-06 04:22

In this new post to his blog Jani Hartikainen looks at implementing the Data Access Object pattern in your PHP applications.

The advantage of this is that you can easily implement different methods to persist objects without having to rewrite parts of your code. I'm again going to use the programming language quiz game I wrote as an example. Since I initially wrote it to use Doctrine ORM directly, and both the old and new code are available, you can easily see how the code was improved.

He starts off with a look at the pattern itself (including a diagram of how an example would work with Doctrine) followed by the creation of the models for his Questions example. Add in the factory to create an instance and an exmaple of it in action and you're there.

Categories: php

Community News: Eli White is Zend's New "Community Guy"

PHP Developer - Tue, 2009-01-06 03:37

According to this new post on his blog, Eli White has taken over the post of "community guy" at Zend (a post previously held by Cal Evans).

I've been offered a position at Zend, and accepted it. The official (lengthy) job title is Zend Community Manager/Leader & DevZone Editor-In-Chief. The short form to many people would be: "The job formerly held by Cal Evans" I'm extremely excited about this opportunity to work with Zend and to have the focus of my daily job to be working with the PHP community which I dearly love. I know that any attempt to fill Cal's shoes will be met with failure, so I hope instead to come up with my own twist on the position and to give it my best.

He'll be acting as the liason between the PHP company and the rest of the community including writing articles, doing some podcasting and all around getting in the middle of whatever's going on in the PHP community. Congrats Eli!

Categories: php
Syndicate content