My Wiki Parser Class for PHP

I was looking for a script which could parse wiki syntax which is used in Google Code (see http://code.google.com/p/support/wiki/WikiSyntax). I could only find MediaWiki parsing, which isn’t what I wanted. The closest I could find was a PHP class which parsed ‘wiki’ syntax, but had quite a few bugs in (http://www.phpclasses.org/package/3111-PHP-Retrieve-and-process-articles-from-Wikipedia.html). This was my starting point.

I used the WikiSyntax page given above to add some of the features that I wanted to add. I didn’t add all of them, because I didn’t need all of them, but you can edit the code to suit your needs if you want to. Read the rest of this entry »

How to find a “tag” in a “post”

Twitter and Facebook both allow you to tag friends in posts. It starts with “@”, has their username and then the rest of the message carries on. I developed a bit of PHP code to identify and link tags for me. Here it is:
Read the rest of this entry »

Formatting JSON like the Facebook Graph API

A recent project of mine required me to format JSON in a similar way to the Facebook Graph API. So I wrote a bit of PHP code to do the job.
Read the rest of this entry »

Open Graph Protocol

Facebook have recently launched their Open Graph protocol. It is designed to connect websites to people’s social graph via Facebook more easily.

I was recently implementing it on my website, NewHaze, and I found it surprisingly easy to use. It is a completely different concept to the older model. But I think it is an improvement. It is much lighter and a much more logical approach to accessing the data available.

I am, however, concerned about what data exactly I will be able to access from my website. I was thinking that if somebody doesn’t permit me from access certain information, would the code on my site work? It’s just a small concern, and I’m sure it will be fine!

I also love the new authorization screen, it’s much cleaner and nicer to look at… and only one screen rather than having to be redirected from page to page in order to grant loads of permissions!

In all, I am a pretty big fan of the new protocol, it all seems to be working pretty well!

PHP Code: Generate random string

For whatever reason, it may be useful for your PHP application to automatically generate a PHP string. We have written a quick function to do this for you. Enjoy! Read the rest of this entry »

PHP Code: Resize and crop images

I couldn’t find a function that did this anywhere on the internet, so I built it. I hope other people find it useful. What it does is resizes and then crops an image so that it doesn’t lose its aspect ratio. It’s very cool…
Read the rest of this entry »

PHP Anywhere!

Ever wish you could update your website from anywhere in the world instantly? There is an amazing tool online called PHP Anywhere (http://www.phpanywhere.net) which enables you to write PHP code quickly and easily from your browser. Now you don’t need to be on your own computer to update (or even create) your website!

Features

  • Connect to your site using FTP
  • Manage a project on the website
  • Code colouring
  • Free!

You can sign up for your free beta account today!

Follow

Get every new post delivered to your Inbox.