Pastebin

A Pastebin is a text storage application where anybody can paste text, code, or snippets and share it with the world. Open Source guys are very friendly with such tools especially if you are old IRC user, the reason why lots of Pastebin implementations are available around the web. So here is another one, written in PHP and Symfony and require only Redis server. Best feature of a pastebin implementation, is that it could be used from command line, below some usage examples :

$ curl -X POST --data-binary 'Lorem ipsum' http://pastebin.tld
# 201 Created
# Location: /54ae
# X-Paste-Token: 99d6a7cb2f
http://pastebin.tld/54ae

$ curl http://pastebin.tld/54ae
# 200 OK
Lorem ipsum

$ curl -H 'X-Paste-Token: 99d6a7cb2f' -X PUT --data-binary 'Lipsum lorem' \
    http://pastebin.tld/54ae
# 204 No Content

$ curl http://pastebin.tld/54ae
# 200 OK
Lipsum lorem

$ curl -H 'X-Paste-Token: 99d6a7cb2f' -X DELETE \
    http://pastebin.tld/54ae
# 204 No Content

Released under an MIT license, more information and download at https://github.com/alcohol/pastebin-php

LEAVE A REPLY

Please enter your comment!
Please enter your name here