Login   Register  
PHP Classes

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: 5 years ago
Size: 704 bytes


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

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

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

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