Skip to content
an anonymous chat, php based, json database free for all sort of like 4chan but built to be a chat-like environment with images instead of an imageboard (currently developing nerve-standalone, this repo's development is in a likely permanent pause)
PHP JavaScript CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
functions
images
scripts
LICENSE.md
README.md
database.json
index.php
logo_full.png
style.css

README.md

Markdownify

About

Nerve is an anonymous chat, php based, json database free for all sort of like 4chan but built to be a chat-like environment with images instead of an imageboard, could also be used as just a chat engine, more on that in the GET requests and database connections section.

Install & Configuration

Nerve is ready to deploy, just clone the repo to the root of your server and you're good to go, if you wanna change any messages or anything like that, you can do it by modifying the "database.json" file manually, nerve is not intended to be moderated, if you want to moderate it, you can do so manually or code your own moderation system.

LINUX USERS DO MAKE SURE YOU SET NERVE'S DIRECTORY PERMISSIONS TO AT LEAST 0777

Configuration

Authentication: To set up authentication, type in a password in the $password variable in the index.php file, line 13.

Message auto-deletion: Nerve comes pre-configured with a 10 message maximum capacity, which means that nerve will automatically remove the oldest message once the database has 10 messages in it, you can change this at any point by modifying the $max_messages variable in the index.php file, line 14, setting this value to 0 will disable this option (though it's not recommended), you can also configure weather nerve removes files associated with the post automatically or not in the variable $auto_remove_files, right below $max_messages. file auto deletion might be glitchy in linux based servers because of the permission system, PHP doesn't have permission to delete files previously created by PHP

GET requests and database connections

You can send your nerve a POST request using a form that is not within your nerve's directory, also, since the database is a JSON file, you can interface with it using jQuery or JavaScript or any other laguage, which means you can use it as an API, to send messages, send the POST request to your nerve's index.php, an example of this would be:

  <div id="messages"></div>
  <form action="http://yournerve.com/" enctype="multipart/form-data" method="post">
      <textarea name="message" placeholder="type in a message" cols="42"></textarea><br /><br />
      <input type="file" name="file" id="uploadFile">
      <input type="submit" name="submit" />
  </form>

and then to grab the messages from the database using jQuery:

$(document).ready(function(){
  $.getJSON("http://yournerve.com/database.json", function(data){
    for (var i = 0; i < data.length; i++) {
      var div = document.getElementById('messages');
      div.innerHTML += data[messages][i][message] + "<br />";
    }
  });
});

TODO:

  • make nerve compatible with MOV, MP3, WAV and FLAC
You can’t perform that action at this time.