iTamer's Keywords

July 20, 2007

Newbies, don’t upload exploits with your images!

Posted by Sarah King in Technical Discussions

Manuel Lemos from phpClasses.org has written an excellent post about about the risks when allowing users to upload images. It’s not something I’ve done alot but lets say you have a generated image such as this one - with a .php extension. I could upload it to your server and have it served from there - not much use to me because it would fail to update.

The next guy, however, might be uploading a malicious script that might take over your server, send spam etc.

Read his post here: PHP security exploit with GIF images

June 9, 2006

A Radio List in a table for CakePHP

Posted by Sarah King in CakePHP

I wanted to present a range of choices in a nicely formatted table and couldn’t see helper to do the job - so this is my first snippet for Cake PHP. I doubt it’s perfectly cake (for instance I do the header row myself rather than using the html helper, and I concatenate a string rather than building an array)

In this instance I added the function radioTable to a helper called “fed” and gave it the standard model and field variables. More »

May 28, 2006

Useful Sites

Posted by Sarah King in Technical Discussions

I’m working on a new project at the moment, it’s an intranet type thing so no point in linking to it, but I’m using CakePHP and thats been really interesting. Definately RAD, supposedly simple but it’s got so many really good features that while it is simple, it can be hard to discover the genius.

For instance,

  1. $this->flash controls post save redirects, but doesn’t do the actual redirect if you have debugging turned on. You have to dig out the default template to know this though.

DigitalPoint remains the number one forum on the net, as far as I can see and I’ve recently been made a moderator. It actually changes the way I use the forum and it’s really very interesting.

Christian Mezei owns SEOPedia and a free directory WebXperience - and he has big plans for that. More »

February 24, 2006

How to use -> and => in PHP

Posted by Sarah King in PHP & Web Development

I just saw a forum post asking the difference between -> and => and it’s one of those tricky questions to research, just how can a search engine understand what you’re asking?

Well, luckily the answer is quite simple.

-> is used by objects to set, get or call a method of that object.
Ref: Chapter 18. Classes and Objects (PHP 4)

=> is used by arrays to describe the relationship between the key and the value
Ref: Arrays

Here’s an example of how the -> is used in a class More »

December 13, 2005

Using CaRP

Posted by Sarah King in PHP & Web Development

CaRP is a “Caching RSS Parser“, thus it’s name. It comes in a variety of flavours but I tested the free version.

The only problem I had was that my host had safe mode turned on and that caused some problems in the “installation” - creating the cache folders but the manual instructions did the trick.

The scripts come with an install and example page. To get real value check their online examples which show how you can combine two feeds and take the most recent, for example. More »

Using DOMIT! RSS

Posted by Sarah King in PHP & Web Development

I’ve worked with DOMIT! because it’s part of the Mambo and Joomla CMS systems so I expected this to be a doddle. Sorry, it wasn’t. There were 2 undefined constants and one code defect which all took time to identify.

There is no doubt that the code in DOMIT! is far more exhaustive than that of Magpie but, really, you don’t need it if all you’re planning to do is parse an RSS onto a webpage. More »

December 12, 2005

Adding RSS to your website

Posted by Sarah King in PHP & Web Development

This is the main page of a series (yet to be written) of How-To guides for adding RSS feeds to your website.

It’ll cover HTML and PHP scripted sites and all the tools will be free to use.

Why HTML? Well, some blogging systems and the Blogger sites don’t allow the user to add serverside scripts. Poop to them, but until they relax or allow some controlled way around it then those sites need to be treated as pure HTML.

Method Type Cache 3rd Party? SEF Score Demo
Magpie RSS PHP Yes No Yes 10 here
DOMIT! RSS PHP Yes No Yes 5 here
CaRP PHP Yes No Yes 4 here
SimplePie PHP Yes No Yes 10 here

More »

Pages

Categories:

Other Resources

Subscribe in NewsGator Online
GeoURL