Login   Register  
PHP Classes


Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Bermi Ferrer Martinez  >  PHP Base  >  README  >  Download  
Role: Documentation
Content type: text/plain
Description: README
Class: PHP Base
Submit data files to the Google Base service
Author: By
Last change:
Date: 9 years ago
Size: 1,961 bytes


Class file image Download
PhpBase 0.1a (http://www.phpbase.org)

What is it?
PhpBase is a free PHP library useful for submitting you website
dynamic content to Google Base.

Common field validation according to http://google.com/base/tab_attributes.html
Default scheme definitions (actually only Housing)
FTP Client for submitting to Google Base


You can start using this library by including in your source the file PhpBase.php.

$PhpBase =& new PhpBase('Housing');

Where Housing is the schema found at phpbase/schemes/Housing.php

If a domain name is specified, it will be appended to the id attribute.
$my_properties = array(
'12-LKF' => 
'title'=>'Nice house on the beach', 
'description' => 'Nice house with views to bay, 
It has an enormous deck for up to 10 boats' ),
'14-LKF' => 
'title'=>'Apartment in San Francisco', 
'description' => 'Cute apartment for sublet in 
downtown San Francisco'),
//.........more properties here

    'password', 'filename')){
        echo "Data was submitted 
        successfully to Google Base";
        echo "There was an error on 
        the FTP connection to Google Base";
    echo "Ooops, there where some 
    problems when preparing the data feed. 
    These are the attributes 
    where we found the problems ";
    echo join($PhpBase->getAttributesWithProblems());

You can also add row by row like this
    echo "There was an error on ".

and the send it normally data as on previous example using
'password', 'filename');

In order to create you own schema have a look to schemes/Housing.php and to the attribute helpers in the attributes/ folder 

Please send bugs and suggestions to phpbase akelos com

Thanks for your interest.