Skip to content

a simple pastebin implement in php

License

Notifications You must be signed in to change notification settings

alcohol/pastebin-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

alcohol/pastebin-php

I mostly use this demo application to keep myself up to date with the various changes introduced by new (major) Symfony releases.

Dependencies (external)

  • redis-server (production environment)

Testing

vendor/bin/phpunit

cURL 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

Contributing

Feel free to submit a pull request or create an issue.

License

alcohol/pastebin-php is licensed under the MIT license.