Hello Again everyone! Today I am here to showcase the my latest and greatest ComputerCraft project, the SUB-ETHA-NET. This is an infinitely expandable network of computers, that allows you, similar to the modem messaging framework, to send messages an infinite distance, even across servers, simply by plugging your computer into the ground! How you may ask? If you are interested in the science of this process, click the spoiler below. Spoiler Well, I cannot reveal any actual code, or too much about how the process works, (except to moderators,) so have this fake answer. When you transmit a message to the modem, it sends electrominetec signals through a specially fabricated dirt conductance block, which then spreads the message through every connected block in the server (encrypted, of course,) and by doing this makes the message embedded in the server frequency. This frequency is spread throughout the internet, and picked up by other modded servers with CC, and it can then be sent to the receiving fabricated dirt conductance block and down a network cable. If you are interested in how the API works, read the next spoiler. Spoiler I plan on writing an importable LUA API, but I have not yet, it isn't really hard to code into your program... Code: --Sends a message to ip address 10.0.0.1 rednet.broadcast("s:10.0.0.1:message"); --Need to be connected to cable to sub-etha-net by modem --When a message arrives, a rednet message is broadcast with the following attributes "m:10.0.0.2:message" --Where 10.0.0.2 is origin address Pricing information is located below: Spoiler 2 diamond - set up cost 1 diamond - every 2 weeks of service Setup information is located here: Spoiler To set up, we simply need to claim one chunk, in OR outside of you base. We will place the base station there, and feed the cable out accordingly. Once you connect to that cable, you can connect to the SUB-ETHA-NET So, hope you enjoyed this post on the SUB-ETHA-NET, and if you have any questions, please ask below. If you are interested in subscribing, contact me in-game or below. Sincerely -Weaversam8, the Conqueror. P.S. A demonstration is available at my shop in the bazaar.
It does, and uses a combination of software between a real PHP server and client side lua server code.
Can you release PHP source for this? There were so many other projects like this on the CC Forums but they all end up not working after awhile (if they worked in the first place).http://www.computercraft.info/forum...82-zombienet-http-cross-server-communication/
I suppose I shall. I don't really have the resources to do this right now. Understand, the code is very unclean, and it requires a specific MySQL database setup. PHP Code: Spoiler PHP: <?php /*** SKOnline PHP Source* Created by Samuel Weaver, 2014* (weaversam8)*** Just credit me. That's all I ask. :)**/ $con=mysqli_connect("server","user","pass","db"); // Check connectionif (mysqli_connect_errno()){ echo "Failed to connect to MySQL: " . mysqli_connect_error();} $type = $_GET[t];$who = $_GET[c];$message = $_GET[m];$dest = $_GET[d]; if($type == 1) { $result = mysqli_query($con,"SELECT * FROM users WHERE address='" . $dest . "'"); $row = mysqli_fetch_array($result); if($row != null) { echo('y'); } else { echo('n'); }}if($type == 2) { if($who != null && $message != null && $dest != null /*&& strlen($message) <= 128*/) { $result2 = mysqli_query($con,"SELECT * FROM users WHERE address='" . $dest . "'"); $row = mysqli_fetch_array($result2); if($row != null) { $result3 = mysqli_query($con,"SELECT * FROM users WHERE auth='" . $who . "'"); $row = mysqli_fetch_array($result3); if($row != null && $_GET[i] != null) { $from = $row['address']; $dest = str_replace(".","d",$dest); mysqli_query($con,"INSERT INTO messages VALUES ('" . $dest . "', '" . $from . "', '" . $message . "', " . $_GET[i] . ")"); echo('y'); } else { echo('n'); } } else { echo('n'); } } }if($type == 3) { if($who != null) { $result4 = mysqli_query($con,"SELECT * FROM users WHERE auth='" . $who . "'"); $row = mysqli_fetch_array($result4); if($row != null) { $rec = $row['address']; $quer = "SELECT * FROM messages WHERE goto='" . $rec . "'"; $result5 = mysqli_query($con,$quer); $row = mysqli_fetch_array($result5); if($row != null) { echo("m:" . str_replace("d",".",$row['from']) . ":" . $row['message']); mysqli_query($con,"DELETE FROM messages WHERE id=" . $row['id']); } else { echo('n'); } } }} ?> Also note, you will need a database with these settings: SQL Code to Generate Tables: Spoiler -- phpMyAdmin SQL Dump -- version 2.11.11.3 -- http://www.phpmyadmin.net -- -- Host: **.***.***.*** -- Generation Time: Mar 20, 2014 at 05:18 PM -- Server version: *.*.** -- PHP Version: *.*.* SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; -- -- Database: `weaskonline` -- -- -------------------------------------------------------- -- -- Table structure for table `messages` -- CREATE TABLE `messages` ( `goto` varchar(16) NOT NULL, `from` varchar(16) NOT NULL, `message` varchar(128) NOT NULL, `id` int(16) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -- Dumping data for table `messages` -- -- -------------------------------------------------------- -- -- Table structure for table `users` -- CREATE TABLE `users` ( `username` varchar(25) NOT NULL, `auth` varchar(60) NOT NULL, `address` varchar(16) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -- Dumping data for table `users` -- Just credit me guys, and thanks for being an awesome community. Sincerely, Weaversam8 The Conquerer
I might take you up on that offer, I actually already have a server where this is running, MySQL and everything. I just haven't had the in-game resources to market it yet.