Show DevBest WinterBin - The New PasteBin! [PHP, SQL]

Status
Not open for further replies.

Quackster

a devbest user says what
Aug 22, 2010
1,765
1,245
Hey,

I coded this script which is very secure and is my coding :)

Check out - System disabled - download and use your own, a spam patch will be released soon.

--

Its fully secure such as:

  • Blocks XSS
  • Blocks SQLi (Example: )
--

Download:
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,199
3,934
You should make it so we cannot spam, And cannot do languages like "lol". And stuff. Other than that, AWESOME RELEASE.

-EDIT- Also, The:

PHP:
$id = rand(10, 1000);

Isn't needed? You could just make it go from 1 - 1000. Lol. But this is nice, Didn't know you coded so nicely in PHP ;].
 

Quackster

a devbest user says what
Aug 22, 2010
1,765
1,245
You should make it so we cannot spam, And cannot do languages like "lol". And stuff. Other than that, AWESOME RELEASE.

-EDIT- Also, The:

PHP:
$id = rand(10, 1000);
Isn't needed? You could just make it go from 1 - 1000. Lol. But this is nice, Didn't know you coded so nicely in PHP ;].

Hey Thanks,
If you had a look at pastebin.com, there is heaps of spam such as just old, plain text :)
But I will code a IP ban function and a system that logs your IP's so you know who is actually the spammer
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,199
3,934
It's pretty good I set it up, impressive (;

And yeah I know lots spam, it's just it's too easy to spam on yours, when you have submitted it, you can just keep your finger on f5 lol.
 

Quackster

a devbest user says what
Aug 22, 2010
1,765
1,245
It's pretty good I set it up, impressive (;

And yeah I know lots spam, it's just it's too easy to spam on yours, when you have submitted it, you can just keep your finger on f5 lol.
I'll have alook more into that later, I kinda was slack to code that lol :)

-System disabled, use your own.
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,199
3,934
If people need, You can put this up for your demo, - I don't mind, I'l keep it up, xD.
 

RastaLulz

fight teh power
Staff member
May 3, 2010
3,934
3,933
I don't understand why you'd use the PHP rand() function to create the ID. This will just result in older data that was pasted with the same ID being replaced. Therefore, you should set the ID in database for the paste to "auto_increment", and it will just go up by one every time a paste is submitted.
 

RastaLulz

fight teh power
Staff member
May 3, 2010
3,934
3,933
Having the id as one through 1,000 isn't necessarily unique, and would be quite easy to find all pastes. Also, if it is going to create bugs in your script, you simply can't keep this method on the basis of wanting it to be unique - you must figure out a better solution.

For example, you could still have a "unique" code to find the paste by using the following format: id-randomcode.

The random code could be generated in the following way:
PHP:
<?php
$randomCode = time().rand(10000, 99999);
?>

The random code would have it's own field in the database, and to get the paste you would do the following:
PHP:
<?php
//view.php?id=id-randomcode
$explodeID = explode('-', $_GET['id']);
$db->query("SELECT * FROM pastes WHERE id = '{$explodeID[0]}' && random_code = '$explodeID[1]' LIMIT 1;");
?>

Obviously you'd validate the $_GET data, etc - but that's the basic idea.
 
Status
Not open for further replies.

Users who are viewing this thread

Top