Seeder Support Script for Modern Image Board Systems
 
Because when it comes to "serious business", I'm here to help ;) 
 
Main
 
News
 
FAQs
 
BBS
    WakaChan BBS
    4Chan BBS

 
Releases / Downloads
 
See working example
of this script

 
Become a seeder for
an ImageBoard

 
Give your ImageBoard
the ability to be seeded

 
ImageBoardSyncher
(Tool for making
ImageBoard mirrors)

 
Docs
    SeedSupport.php
    PHPKernel.php
    ImgChan.htm

 

 

PHPKernel.php Documentation

 

Command Line:   Cmd=Config
Example:   PHPkernel.php?Cmd=config
Purpose:   Admin use only, the script will only allow this command when the client IP is 127.0.0.1 (local loop back)
Returns a GUI in HTML to the admin for use in a browser
The GUI will be used to help the admin edit settings
      
Command Line:   Cmd=UpdateConfig
Example:   PHPkernel.php?Cmd=updateconfig
Additional Args:   To manny to list,,, or rather, I dont feel like listing them all  o_o
Purpose:   Not for human usage
Admin machein use only, the script will only allow this command when the client IP is 127.0.0.1 (local loop back)
After the Cmd=config has been used, the settings are then set with this command.
The Cmd=config is only used to return a GUI, the Cmd=updateconfig is used to change the settings
     
Command Line:   Cmd=JavaScriptDirListing
Example:   PHPkernel.php?Cmd=JavaScriptDirListing
Additional Args:   None
Purpose:   Returns JavaScript code used by ImgChan.js
.html (and the JavaScripts within them) cannot access any files from outside their domain (server), and thus the only way for them to get information from a seeder is to use the <Script Language="JavaScript" Src="blah"> tatic, replacing 'blah' with 'PHPkernel.php?Cmd=JavaScriptDirListing'.  The java script then adds the list of files the seeder is sharing to a JavaScript array called "DirList".  The JavaScript returned assumes there is a function called AddArrayItem(Arr, Data2Add) defined - it is defined in the ImgChan.htm
     
Command Line:   Cmd=ShowupForm
Example:   PHPkernel.php?Cmd=showupform
Additional Args:   None
Purpose:   Returns a GUI in HTML to users for use in a browser
The GUI will be used to help the users choose a file on their harddirve and upload it
Future Plans:   This page will:
  • Discuss rules that may be private to the individual seeder
  • Enable multiple file uploads
     
Command Line:   Cmd=Upload
Example:   PHPkernel.php?Cmd=upload
Additional Args:   File to upload
Purpose:   Not for human usage
Not for <whatever>Chan script usage

Uploads a file into non-public temp space.  This should redirect the user to a mode that will rename the file (to add tags and set properties), and that mode would be Cmd=PromptTorenameFileInDB
Future Plans:  
  • Posibly give the seeder/admin the ability to disable this function as it is not needed to seed a *chan
  • Check IP against a ban list... o_o yeh it's not yet implemented, this is near the top of my ToDo list.  For the time being if you need to ban, ban them using your HTTP server.
  • Give the user ability to upload .zip and .rar files (uploading full CGs)
     
Command Line:   Cmd=RenameFileToDB
Example:   PHPkernel.php?Cmd=renamefiletodb&TmpName=ImagIJustUploaded.jpg&ReNameTo=NundityLevel[None] Contains[CatGirl] CRC16[F7A2] CRC32[DD74BD16].jpg
Additional Args:   TmpName - The name of the file uploaded when using the mode Cmd=Upload
ReNameTo - The new name with tags and properties set
Purpose:   Not for humans to navigate to manually, the Cmd=Upload should navigate the use to this mode
Not for <whatever>Chan script usage
  • Moves the file out of non-public space and into publicm space
  • Renames the file with the ReNameTo param (obviously)
  • Adds the new entery to the ImgChan.js file
  • Creates thumbnail and put it in thumb cache directory
     
Command Line:   Cmd=PromptToRenameFileInDB
Example:   PHPkernel.php?Cmd=PromptToRenameFileInDB&ImageTarg=http://127.0.0.1/PubImages/NundityLevel[None] Contains[CatGirl] CRC16[F7A2] CRC32[DD74BD16].jpg
Additional Args:   Any one of the following parameters must be used, and then "=<TargetFile>"
TargImg4Editting
ImageTarg
CurName
TmpName
NOTICE: Whatever parameter is used, the target that follows MUST be a URL and start with "http://"
Purpose:   Returns a GUI in HTML to users to use in a browser
The GUI will be used to help the users rename the file
Users should be routed to this mode by the Cmd=Upload command line.
When users decide to rename the file, the actually renaming is done by the mode Cmd=RenameFileInDB
Future Plans:  
  • When a user has uploaded multiple files, rename one file right after another
  • Preload the next file when the above task has been implemented
  • Make a default tags/values option for the situation where the multiple files are going to be renamed, the user doesn't have to keep adding the same tags on for one file after another, the default tags will be added automatically every time the user has been switched top a new file to rename.
     
Command Line:   Cmd=RenameFileInDB
Example:   PHPkernel.php?Cmd=RenameFileInDB&CurName=NundityLevel[None] Contains[CatGirl] CRC16[F7A2] CRC32[DD74BD16].jpg&ReNameTo=NundityLevel[None] Contains[CatGirl] CRC16[F7A2] CRC32[DD74BD16].jpg&NundityLevel[None] Contains[1P.Swimsuit]Contains Hair[Yellow+Red]Hair CRC16[F7A2] CRC32[DD74BD16].jpg
Additional Args:   CurName - The name of the target file which you want to rename
ReNameTo - The new name with tags and properties set
Purpose:   Usually used with ImgChan.htm
Not for <whatever>Chan script usage

Same as Cmd=RenameFileToDB, only this one is used to rename a file that already exists in public space.  This command (Cmd=RenameFileInDB) is usually used to rename a file that has accidentally been named wrong, or to add tags onto the filename.
     
Command Line:   Cmd=FindFilename
Example:   PHPkernel.php?Cmd=FindFilename&FileName=NundityLevel[None] Contains[CatGirl] CRC16[F7A2] CRC32[DD74BD16].jpg
Additional Args:   FileName - The name of the file which is wished to be found on the seeder
Purpose:   Used to find a file in which the full name is know, but the directory location is unknown.
This was created a while ago, but no longer is really needed.
When the requested file is found, the php shall redirect the user
Future Plans:   This may either be taken out, if not, then..
  • Give the seeder the ability to disable this mode
  • Make this mode be able to search by CRC (as of now it can only search by full name, and the name MUST match exactly
     
Command Line:   Cmd=CompileCRC32
Example:   PHPkernel.php?Cmd=CompileCRC32&FileName=http://127.0.0.1/PubImages/NundityLevel[None] Contains[CatGirl] CRC16[F7A2] CRC32[DD74BD16].jpg
Additional Args:   FileName - Preferably the file URL, but could also just be the filename of the file which is targeted
Purpose:   Returns the 8 character long ASCII version of a CRC32 compiled by the server. This DOES NOT simply take the CRC from the filename.  This does not return HTML code, only the ASCII CRC32.
Note: If the given input is a URL, and the URL does not reference the seeder, the php WILL NOT download the file from another source.  This mode is only used for use of compiling CRCs on the seeders machine.
     
Command Line:   Cmd=CompileCRC16
Example:   PHPkernel.php?Cmd=CompileCRC16&FileName=http://127.0.0.1/PubImages/NundityLevel[None] Contains[CatGirl] CRC16[F7A2] CRC32[DD74BD16].jpg
Additional Args:   FileName - Preferably the file URL, but could also just be the filename of the file which is targeted
Purpose:   Returns the 4 character long ASCII version of a CRC16 compiled by the server. This DOES NOT simply take the CRC from the filename.  This does not return HTML code, only the ASCII CRC.
Note: If the given input is a URL, and the URL does not reference the seeder, the php WILL NOT download the file from another source.  This mode is only used for use of compiling CRCs on the seeders machine.
     
Command Line:   Cmd=ReMap
Example:   PHPkernel.php?Cmd=ReMap
Additional Args:   None
Purpose:   Seeder/Admin use only
Tells the script to trash any notes taken about what is public, and do a scan of the public directory and compile the list of files made public all over again.
I recommend to use this if you have allot of people uploading to you constantly, it takes out any errors that may exist in the script.
Also, keep in mind that if you (the human seeder) simply copy files into the public directory, the script will NOT notice.  Use this mode to make it take note of any new manully copyed file's existance.
     
Command Line:   Cmd=Thumb
Example:   PHPkernel.php?Cmd=Thumb&Target=http://127.0.0.1/PubImages/NundityLevel[None] Contains[CatGirl] CRC16[F7A2] CRC32[DD74BD16].jpg
Additional Args:   Any one of the following parameters:
Target
TmpName
CurName
FileName

Whichever parameter is used, it must be the external URL to the full image file, which the thumbnail is wanted

Purpose:   Returns an image, a thumbnail of the full image URL input.  This will NOT download an impage and make a thumbnail of a URL to goes outside the seeder and to another server.
Based on the seeder's settings, the thumb may be compiled real time, or recalled from cache
The size of the image can very, it is based on the seeder's settings, but by default the max image size is 100x100 pixels at max, and either the width or height may be smaller to keep aspect ratio.
By default, the seeder will use resembling to compile the thumbnail, but don't count on this
     
Command Line:   Cmd=Whois
Example:   PHPkernel.php?Cmd=Whois
Additional Args:   None as of right now, there may be some in the future.  If there ever is any, they will be optional.
Purpose:   Returns the text:

<ScreenName> is sharing <FileCount> files

Does not return HTML code

     
Command Line:   Cmd=Ver
Example:   PHPkernel.php?Cmd=Ver
Additional Args:   None as of right now, there may be some in the future.  If there ever is any, they will be optional.
Purpose:   Returns an ASCII string representing the version of the php script.  This will not return HTML code.
     
Command Line:   Cmd=ShareList
Example:   PHPkernel.php?Cmd=ShareList&ShowCRCs=1
Additional Args:   ShowTagData - (1 = yes; 0 = no)  This will show an tag data (such as CRC info) next to each link, a tab will separate the link from the tag data, and each nre item of tag data for a given entry will also be separated by a tab
Purpose:   Shows list of non-relative (full path) URLs that link to files being shared by the seeder.  Each entry will be separate by a new line (Char13 and then Char10)

Unlike Cmd=ShowShareList, this will NOT return HTML code.  With that one exception, the command outputs are almost identical.  All Cmd=ShareList does is display the content from either ShareList.txt or ChecksumData.txt based on $ShowTagData (ShowTagData is a argument in the command line)
     
Command Line:   Cmd=InitSort
Example:   PHPkernel.php?Cmd=InitSort
Purpose:   For human seeder use only
Supplies a GUI to get one read to sort images, the GUI will ask the user what he/she would  like to sort.  It will show how many images exist on their computer that are unsorted, and show how many images exist on ArchiveChan that are unsorted.
     
Command Line:   Cmd=RecallFile
Example:   PHPkernel.php?Cmd=RecallFile
Purpose:   For image board use only
All seeders receive this this command when a report has come into an image board saying that a certain file is illegal content, and an admin/mod of that board has verified it.  By default the seeder-side script (the script this documentations focuses on) will delete the file from the HD and share list of the seeder.  Of course, even if a seeder still holds onto the file, the image board will not redirect users of the board to that file, because all file pointers to that file will be erased on the ImageBoard-Tracker.

When this function is called, the seeder-side script will check if the IP calling this command line is the IP of any of the image boards that seeder is seeding.  This is how I stop random people from deleting files from others computers.