Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Dean Newman  >  CURL phpBB Functions  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example file
Class: CURL phpBB Functions
Manage a PHPBB forum remotely
Author: By
Last change: Added read()
Date: 8 years ago
Size: 707 bytes
 

Contents

Class file image Download
<?php

// Init class
include('curl_phpbb.class.php');

// The ending backslash is required.
$phpbb = new curl_phpbb('http://www.phpbb.com/phpBB/');

// Log in
$phpbb->login('username''password');

// Send random_user a pm
$r $phpbb->new_pm('random_user'print_r($_SERVERtrue), 'Hello user...');
echo ( 
$r ) ? 'Posted' 'Failed';

// Post a topic
$r $phpbb->new_topic('16''This is just a test post!''Topic subject');
echo ( 
$r ) ? 'Posted' 'Failed';

// Post a topic
$r $phpbb->topic_reply('343298''This is just a test post!''Post subject');
echo ( 
$r ) ? 'Posted' 'Failed';

// Read index
echo $phpbb->read('index.php');

// Log out
$phpbb->logout();

?>