Archive for category PHP

Web Development – Mac or PC?

All of my machines are Linux. Been that way for 5 years. I love my Linux machines, but it is becoming apparent that to go further in my development career I need to, at least include, one of the two main computer companies. Read the rest of this entry »

No Comments

Pointless Fun With Twitter’s API

Or The Unsinkable Wilford Brimley.

Because when we are all dead and gone, He will remain.
Get ahold of somebody, get ahold of anybody! We gotta report this mess.

Needed something to test the regex function on for a new project and what’s better than inappropriate dead celebrity humor.

Wilford Brimley Outlasted

, , , ,

No Comments

Using Regular Expressions with Twitter Search

A new project has me using Twitter’s search api.
The json returns text of each message, which is to be expected, but many posts have “@soandso” or “http://is.gd/lko6g” or something, and that kind of info can’t just be left to sit there now can it?

No it can not.

However, a little regular expression magic and presto! Links GAlore.

Using preg_replace you can quickly and easily replace each text version of ‘@johnmangino’ with @johnmangino.
The only “trick” here is to use the parenthesis to give you a reference that will allow you to make the user link without the ‘@’.

Here is a quick function used within the loop to href the links.
Import the function and run the text through it like so:

$text = $r->text;
$text = makeRich($text);

Hope you enjoy.

Yours truly,
$johnny

, , , , ,

No Comments

PHP to MySQL connection POLL

I’m a little curious where PHP developers are with fundamental MySQL connections these days. So here is a little poll. It closes on July 1st.


, ,

No Comments