I've got a question, did any of you know if there is a forum script completely based on data posted to popular paste-services pastebin alike? I mean that all of data is transfered (fsocks) to pastebin and than all links are catalogued into one text data and all that is keeped on hosting in single link + php files and no other stuff.
Why I am asking? Because I know that this is possible (in perl, bash and c#) e.g.:
#!/bin/bash #Pastebin poster, created by Jaku #Username USER="jaku_bin" #Data retainment (d=1 day, m=1 month, f=forever) RETAIN="d" #Default Text type (too many to list) TEXT="None" #Default pastbin URL URL="pastebin.com/pastebin.php" while read input; do CODE="$CODE $input" done curl -i -d "code2=$CODE&paste=Send&expiry=$RETAIN&poster=$USER&format=$TEXT" $URL -s| grep -i Location:
#!/usr/bin/perl -w
#
# Author: Fred Blaise <chapeaurouge_at_madpenguin_dot_org>
# Date: 21 Nov 2005
# Purpose: Make it easy to paste a file to pastebin.ca
#
# Updated: 29 May 2007 by Stephen Olesen <admin at pastebin dot ca>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
use strict;
use WWW::Mechanize;
use Getopt::Long;
# Types of text, and their option number
#
# [22/ASP|18/Action Script|19/Ada Source|20/Apache Configuration|21/Assembly (NASM)|2/Asterisk Configuration|23/BASH Script|3/C Source|9/C# Source|4/C++ Source|24/CSS|25/Delphi Source|26/HTML 4.0 Strict|7/Java Source|27/JavaScript|28/LISP Source|29/Lua Source|30/Microprocessor ASM|31/Objective C|5/PHP Source|14/PL/I Source|12/Pascal Source|6/Perl Source|11/Python Source|*1/Raw|10/Ruby Source|16/SQL Statement|17/Scheme Source|32/Visual Basic .NET|8/Visual Basic Source|15/XML Document|13/mIRC Script]
# Expiry options
# [*/Never|5 minutes|10 minutes|15 minutes|30 minutes|45 minutes|1 hour|2 hours|4 hours|8 hours|12 hours|1 day|2 days|3 days|1 week|2 weeks|3 weeks|1 month|2 months|3 months|4 months|5 months|6 months|1 year]
# api_key is used for spam protection methods, do not adjust this or pastes may fail
my $api_key = "hS5Xpk1VbjFLB9EJn2wHwkEwi50xEVPl";
my $pastebin_url = "http://pastebin.ca/quiet-paste.php?api=$api_key";
my $pastebin_root = "http://pastebin.ca";
my %f = (
content => '',
description => '',
type => '1',
expiry => 'Never',
name => 'clueless',
);
GetOptions ( \%f,
"content=s",
"description=s",
"type=i",
"expiry=s",
"name=s"
) || die $!;
my $boy = WWW::Mechanize->new();
$boy->get($pastebin_url);
die $! unless ($boy->success());
unless ($f{content}) {
## -- Commented this out since it can be identified by API key
# $f{description} = $ARGV[0];
# $f{description} .= " -- automated paste by paste2pastebin.pl";
$f{content} = join "", <>;
}
$boy->form_name('pasteform');
$boy->set_fields(%f);
$boy->submit_form( button => 's');
die unless ($boy->success);
my $content = $boy->content();
if($content =~ m/^SUCCESS:(.*)/) {
print "Your paste URL is: " . $pastebin_root . "/" . $1 . "\n";
} else {
print $content;
}
try
{
HttpWebRequest request = (HttpWebRequest)
WebRequest.Create("http://davux.pastebin.com/pastebin.php");
request.AllowAutoRedirect = false;
request.Method = "POST";
string post = "&parent_pid=&format=text&code2=" + HttpUtility.UrlEncode(text) + "&poster=Dave&paste=Send&expiry=m&email=";
byte[] data = System.Text.Encoding.ASCII.GetBytes(post);
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = data.Length;
Stream response = request.GetRequestStream();
response.Write(data,0,data.Length);
response.Close();
HttpWebResponse res =(HttpWebResponse) request.GetResponse();
res.Close();
// note that there is no need to hook up a StreamReader and
// look at the response data, since it is of no need
if (res.StatusCode == HttpStatusCode.Found)
{
Console.WriteLine(res.Headers["location"]);
}
else
{
Console.WriteLine("Error");
}
}
catch (Exception ex)
{
Console.WriteLine("Error: " + ex.Message);
}
But this isn't the only reason. I want to use forum script working like this (with pastebin and a mirror to prevent timeout when one of these is offline) to release full power of hostings with unlimited bandwidth, but also limited storage (to, like, 5 megs). If that kind of script exist I will be very appreciated when you post it's name here in this thread. I think that millions of people either :).
Regards,
fatof
-edit1-
Another idea is storing forum data on mail (there are many mail-services with unlimited storage and fast servers, so it would be nice).


Sign In
Create Account

Back to top









