NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming > CODE
Reload this Page Ping.FM Wrapper Class

CODE This forum is for posting code snippets and example scripts that aren't quite tutorials, but could be useful for others. You may post code snippets and/or completed scripts that you've written and want to share here.

Advanced Search
7 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 06-21-2008, 11:02 AM THREAD STARTER               #1 (permalink)
Danltn.com
 
Daniel's Avatar
Join Date: May 2007
Location: Danltn.com / Nottingham, UK
Posts: 1,201
Daniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond repute
 


Ethan Allen Fund Ethan Allen Fund

Ping.FM Wrapper Class


Ping.FM wrapper class

Version 0.2.1b

Download link: http://danltn.com/bin/b4g.phps
PHPClasses.org link: Browse the available classes - PHP Classes
????: NamePros.com http://www.namepros.com/code/484348-ping-fm-wrapper-class.html

This class allows you really easy interaction with the API features of Ping.FM. It also parses the XML return for easy access to the important data. (Accessible in $wrapper->details array)

Nothing too confusing about it, if you need more details check it on the Ping.FM API site, otherwise I can probably answer most questions.

Basic usage example:

PHP Code:
try
{
    
$wrapper = &new PingFM_Functions;
    
/** Create a new function call */
    
$wrapper->dev_api 'DEV_API';
    
/** Your dev API */
    
$wrapper->user_api 'USER_API';
    
/** Their user API */
    
if ( $wrapper->validate() ) /** If it validates */
    
{
????: NamePros.com http://www.namepros.com/showthread.php?t=484348
        
/** Let's retrieve the last 3 messages for fun */
        
if ( $wrapper->latest(3'DESC') )
        {
            echo 
'Latest 3 message IDs: 'implode', 'array_keys($wrapper->details['messages']) ), '.';
            echo 
'<br />'"\n";
            
/** Show the array, just an example, you wouldn't really use this. */
        
}
        if ( 
$wrapper->post('status''is bored') ) /** Post to it */
        
{
            echo 
'Your status has been updated to "is bored."';
            
/** Another weird example */
        
}

    }
}
catch ( 
exception $e )
{
    echo 
$e->getMessage();

Enjoy, and any questions - just ask.
Last edited by Daniel; 06-21-2008 at 03:15 PM.
Daniel is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


 
All times are GMT -7. The time now is 07:24 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger