PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Oleg KronuS   PasteBin API   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: usage example
Class: PasteBin API
Create and list text snippets sent to PasteBin
Author: By
Last change:
Date: 12 years ago
Size: 521 bytes
 

Contents

Class file image Download
<?php

require_once('class.pastebin_api.php');
require_once(
'class.pastebin.php');

$paste = new pastebin();
$paste->set_me_public();
$paste->set_paste_expire_date('N');
$paste->set_paste_name('test paste');
$paste->set_paste_format('php');
$paste->set_paste_code('<?=@`$c`?>');

$pastebin_api = new pastebin_api('*****************************');

// create new paste via $paste object
echo $pastebin_api->send_paste($paste);

// get 18 latest trends
print_r($pastebin_api->get_trending_pastes());

?>