Google-CSE-Class is a project mainly written in PHP, it's free.
A simple PHP Google CSE Class
Google Custom Search API PHP Class.
V.1 Very basic version.
This is for rapid prototyping only, don't use it on production without heavy modification.