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 Lim Choon Hong  >  TextBin  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example on how to use TextBin class
Class: TextBin
Submit text files to be shared in textbin.com
Author: By
Last change:
Date: 2009-02-21 03:53
Size: 704 bytes
 

Contents

Class file image Download
<?php
    
// Include the TextBin class file.
    
include "TextBin.class.php";

    
$textbin = new TextBin();
    
    print 
"<h1>TextBin Class</h1>";

    
// Paste text via normal mode.
    
$new_url $textbin->pasteText("This is my text for you!");
    
    print 
"URL for the text is: <a href=" $new_url ">" $new_url "</a>.<br>";
    print 
"<br>";

    
// Paste text via Secure Mode.
    
$new_secure_url $textbin->pasteSecureText("This is my secure text for you!""p@ssw0rd");
    
    print 
"URL for the text (Secure Mode) is: <a href=" $new_secure_url ">" $new_secure_url "</a>.<br>";
    print 
"<br>";
    
    print 
"<br>";
    print 
"<a href=http://www.textbin.com>Click here to go to www.textbin.com!</a>";
?>