Jump to content

Search the Community

Showing results for tags 'communication'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • RuneLocus
    • News & Announcements
    • Information Booth
    • Website Support
    • Introductions
    • Chat
    • Forum Games
  • RuneScape Development
    • RSPS General
    • RuneScape Private Server (RS2)
    • RuneScape Private Server (503+)
    • RuneScape Private Server (EoC 742+)
  • Other
    • Digital Art
    • Gaming
    • Webdevelopment
    • Computers
  • Marketplace
    • RuneScape Market
    • RSPS Market
    • Others Market
    • Freelance Middleman Services
  • Super Secret Club's Topics

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Found 7 results

  1. Hello guys, I would like your recommendations on what encryption algorithm I should use for client<->server communication that is sensitive and where client must be authenticated so that data replay is not possible or harder to do. I was making a keystore that uses RSA but then I got confused about how encryption/decryption happens in the client side if the client side only has the public key.
  2. I don't know why but it seems to be that my vote system chooses by itself when it wants to work or not, somethimes i get the JDBC communcation link failure, but everything is correctly filled in and my ip has been added in my remote mysql section: [B][U][SIZE=4][COLOR="#00FF00"]Skype:[/COLOR][/SIZE][/U][/B] Syclonepk or (if the first one doesn't find then: ) Shershah fedrik [SIZE=3][COLOR="#008000"]Ip in remote MySQL:[/COLOR][/SIZE] [IMG]http://i.gyazo.com/21fb6d2c1a92c759b2fc1694cd5a6dc5.png[/IMG] [SIZE=5][COLOR="#00FFFF"]Server files to connect to MySQL[/COLOR][/SIZE] [QUOTE] launcher.java: public static MainLoader vote = new MainLoader("syclonepk.no-ip.org", "syclonep_mib", "*******", "syclonep_mib"); VoteManager.java Class.forName("com.mysql.jdbc.Driver").newInstance (); String IP="syclonepk.no-ip.org"; String DB="syclonep_mib"; String User="syclonep_mib"; String Pass="*******"; con = DriverManager.getConnection("jdbc:mysql://", "syclonep_mib", "*******"); Connect.java Class.forName("com.mysql.jdbc.Driver").newInstance (); String IP="syclonepk.no-ip.org"; String DB="syclonep_mib"; String User="syclonep_mib"; String Pass="*********"; conn = DriverManager.getConnection("jdbc:mysql://", "syclonep_mib", "*********"); String IP="syclonepk.no-ip.org"; String DB="syclonep_mib"; String User="syclonep_mib"; String Pass="*********"; return conn = DriverManager.getConnection("jdbc:mysql://", "syclonep_mib", "*********"); MainLoader.java host = "syclonepk.com"; pass = "********"; user = "syclonep_mib"; db = "syclonep_mib"; [/QUOTE] [SIZE=6]Also are my server and mysql ports open:[/SIZE] [COLOR="#FF0000"][SIZE=5]MySQL:[/SIZE][/COLOR] [IMG]http://i.gyazo.com/7e0fda98cb24da341860a58d31230724.png[/IMG] [COLOR="#FF0000"][SIZE=5]Server:[/SIZE][/COLOR] [IMG]http://i.gyazo.com/606f06cce205a5c42b0fcbb02eec1d72.png[/IMG] [SIZE=5][COLOR="#0000FF"]Error:[/COLOR][/SIZE] [QUOTE] [GTLVote V1.1] Settings initializing... [VoteManager] Connection to SQL database failed! com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link fai lure The last packet sent successfully to the server was 0 milliseconds ago. The driv er has not received any packets from the server. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou rce) at java.lang.reflect.Constructor.newInstance(Unknown Source) at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1 116) at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:344) at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2332) at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2 369) at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2153) at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:792) at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou rce) at java.lang.reflect.Constructor.newInstance(Unknown Source) at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:381) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java :305) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at com.rs.vote.Connect.connect(Connect.java:31) at com.rs.vote.MainLoader.<init>(MainLoader.java:24) at com.rs.Launcher.<clinit>(Launcher.java:55) Caused by: java.net.ConnectException: Connection timed out: connect at java.net.DualStackPlainSocketImpl.connect0(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) at java.net.AbstractPlainSocketImpl.connect(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.<init>(Unknown Source) at java.net.Socket.<init>(Unknown Source) at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.ja va:257) at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:294) ... 17 more [/QUOTE] [SIZE=3]It is defenetly not logic that it doesn't work everything is correctly filled in, and the ports are also open. Please contact me on Skype.[/SIZE] Thanks for response, would be greatly appriciated :cool:
  3. Hi, so do i have to put my server ip on my jdbc communication link? if my server ip is runescape.no-Ip.org Should my jdbc communication look like this (so it would work on the server after someone voted)? [QUOTE] return conn = DriverManager.getConnection("jdbc:mysql://runescape.no-ip.org:3306/exampledb", "exampleusername", "examplepassword") [/QUOTE] Or should it be like this? (so others could also vote correct and get reward?) [QUOTE] return conn = DriverManager.getConnection("jdbc:mysql://", "exampleusername", "examplepassword") [/QUOTE] Wich one is correct so people could get their reward after voting on the server? Thanks for youre answer would be appriciated.
  4. This may sound a noob question but im new to the MySQL codes. So im trying to let work My vote system, i needed to insert my communications link correctly And it looks (yust an example) [QUOTE] return conn = DriverManager.getConnection("jdbc:mysql://", "exampleusername", "examplepassword"); [/QUOTE] And at the part at should be my ip adress from my server or should i let it stay on and anything needed for the ports also? Thanks for youre answer would be realy appriciated.
  5. Can someone give me an example of the JDBC link, because i don't know how to put it, mine looks like this: [QUOTE] return conn = DriverManager.getConnection("jdbc:mysql://"+IP+"/"+DB, User, Pass); [/QUOTE] Can someone give me an example. How it should look like. Would be appriciated.
  6. The following tutorial teaches you how to perform basic communication tasks to and from a server using the Structured Query Language (SQL) from either your java application, rsps server, or website. Some things this might be useful for: displaying number of players online on your website, sending important player data to an sql server for safe keeping, updating player's ranks on your forum from your server, and even a start to creating your own vote, highscores, or donation system. Pre-Requisites to Reading this thread: [LIST] [*]Know how to create an SQL database on your website or computer. [*]Know how to add a new table to your database along with adding columns to that table. [*][URL="http://echopx.com/how-to/create-mysql-database-in-cpanel"]Here's a link[/URL] incase you don't know how to do either of those. [/LIST] The two languages we'll be working with today are Java and PHP. Both have internal libraries that handle the execution of SQL related processes. [SIZE=4][U][B]PHP Section:[/B][/U][/SIZE] As said above, php offers SQL libraries to help communicate with your chosen database. This is very commonly used for systems such as forums, blogs, keeping user information, ect. [B]Sending Information using PHP: [/B][INDENT]In the below example, we create a php variable named con and apply an sql connection to it using the mysql_connect method provided by PHP. The parameters for this function is (connection IP address, the database username, the database password), which are all strings. Most leave the connection IP as localhost since their database is located on the same server as what they're running the script off of, but some might change it to a different IP depending if their database is external or not. [/INDENT] [code]<?php $con = mysql_connect("localhost", "DATABASE_USERNAME", "DATABASE_PASSWORD"); if (!$con) { die("Could not connect to database: " . mysql_error()); } mysql_select_db("DATABASE_NAME", $con); mysql_query("INSERT INTO people (name, age) VALUES ('Tommy ', 33)"); mysql_close($con); ?> [/code][INDENT]After applying the connection, we check to see if everything is alright. If the connection contains errors, we simply call the die() method, which in other terms 'exists'. By calling the mysql_error() method when calling an exit to the page, we can grab whatever the error was in the connection. Usually, it's because you didn't type the username or password correctly, so make sure all your credientials are correct! Next, we select a database to use from our server. The method mysql_select_db(your database name, the connection variable) selects the chosen database. If all went well, you're 100% connected to your database using SQL. Next, let's say you want to add something to your table in your database. The mysql_query function can be used for many different edits to your database, like editing, retrieving, adding, deleting, ect, but for this tutorial, we're going to cover just inserting and retrieving. [/INDENT] [code] mysql_query("INSERT INTO people (name, age) VALUES ('Tommy ', 33)"); [/code][INDENT]The above code is basic syntax for inserting information into your database table. INSERT INTO is followed by your table name inside your database. Keep in mind that everything is case sensitive. Following your table name is a parameter container for the columns that your table owns. In this example, my table 'people' has 2 columns, which are name and age. The name in my database is a varchar and the age is an integer. Followed by the column names is the keyword VALUES, then a container for the values. Also keep in mind that the values are in order the same as (name, age). Finally, we call mysql_close to exit the connection (although it's not really needed for this small of a script, since the connection automatically ends at the end of a script). [/INDENT] [B]Recieving Information using PHP:[/B] [code]<?php $con = mysql_connect("localhost", "DATABASE_USERNAME", "DATABASE_PASSWORD"); if ([SIZE=2]!$con) { die("Could not connect to database: " . mysql_error()); } [FONT=arial]mysql_select_db("DATABASE_NAME", $con); $data = mysql_query("SELECT * FROM people") or die(mysql_error());[/FONT][/SIZE][FONT=arial] [/FONT] while ($person = mysql_fetch_array($data)) { echo $person['name']; echo $person['age']; } mysql_close($con); ?> [/code][INDENT]The above code connects to the database just like before, but this time we're using the mysql_query in a different way. Following the SELECT keyword, we put a * to indicate grab all. This is then followed by the FROM keyword, then the name of our table. What this does is select all the rows from our table called 'people'. The variable $data now holds all the rows listed in our table (if any). Next, we loop through our data using the mysql_fetch_array($data) method. While inside the loop, we can obtain certain columns from each row recieved. For example, if you just wanted to get the persons age from the row, you would take the iterated variable, which is $person followed by ['column name']; You might be wondering, well what if I don't want to get all the rows, what if I want to search for someone's name? [/INDENT] [code] $data = mysql_query("SELECT * FROM people WHERE name='George'") or die (mysql_error()); [/code][INDENT]Using the above query will select all rows from the table where the column name is equal to "George". It could potentially return n results depending on how many "George" there are in the table. [/INDENT] [SIZE=4][U][B]Java Section: [/B][/U][/SIZE][INDENT]As stated before, Java also contains a set of useful utilities for sending and recieving information to a database using SQL. Below is an example of a Java class that uses SQL functions. [/INDENT] [code] import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; public class SQL { private static Connection con = null; private static Statement stmt; public static void createConnection() { try { Class.forName("com.mysql.jdbc.Driver").newInstance(); String IP="WEB HOST IP"; String DB="DATABASE NAME"; String User="DATABASE USERNAME"; String Pass="DATABASE PASSWORD"; con = DriverManager.getConnection("jdbc:mysql://"+IP+"/"+DB, User, Pass); stmt = con.createStatement(); } catch (Exception e) { e.printStackTrace(); } } public static void process() { createConnection(); ResultSet results = statement.executeQuery("SELECT * FROM people WHERE name='George'"); while(results.next()) { String name = results.get("name"); } statement.executeQuery("DELETE FROM `people` WHERE name='GEORGE'"); destroyConnection(); } private static void destroyConnection() { try { stmt.close(); con.close(); } catch (Exception e) {} } } [/code][INDENT]The above code is very similiar to what I showed you in the PHP section, there's essentially just different names for the functions. Executing a query, as you can see, uses the same concepts from the PHP section. Since they're almost the same, I'm going to let you explore the functions Java has to offer. If you use an IDE (such as eclipse), you can view all the functions in the sql package. Mostly all of them that I know of are well documented on the [URL="http://docs.oracle.com/javase/6/docs/api/java/sql/package-summary.html"]oracle website[/URL] if you want to take a look. [/INDENT] [B]Some Sample Scripts: [/B][SPOILER="Sample Scripts"] The below script recieves the amount of players online stored in a database. It also checks to see if the server is online using fsockopen(); [code] $query = mysql_query ("SELECT * FROM status WHERE world = '1'") or die(mysql_error()); $status = false; $players = 0; while($row = mysql_fetch_array($query)) { $players = $row['players']; $timestamp = $row['timestamp']; //will use in future $host = "SERVER IP"; //only handles world 1 right now, need handle for future worlds. $port = "43594"; $connection = @fsockopen($host, $port); if (is_resource($connection)) { $status = true; //server online fclose($connection); } else { $status = false; //server offline } } [/code] [/SPOILER] Again, this is just a basic coverage of SQL communication, seening as there's a lot more content. I've done a basic version, because I feel like the RSPS community doesn't nessisarily need such advanced SQL material. Most of what you're doing is simply related to easy executions for voting, donations, and keeping small data. If you want to learn more, feel free to check out documentation, or send me a message.
  7. [CENTER][IMG]http://imageshack.us/a/img692/8263/bannerbak.png[/IMG] - Well, because I feel Rune-Server is full of abuse and simple-minded children, I have decided to migrate over to RuneLocus. Echo is my latest 637 project, aiming to do better than I have ever done before. I have built a communication system between the forums, website, and launcher (see post #2), that features quick loading, multiple support between servers, and much much more. I am proud to announce that Echo has already become my best project ever, and I haven't even started the in-game content. Latest Updates: [LIST] [*]Full fledged Farming System! [*]Lobby now displays whether you have recoveries, membership days, e-mail registered, and messages on the forums! [*]Being a 'Donator' is now being a 'Member' with 'Membership days', that decrease with each day passing [*]Echo Launcher! I am proud to say this is complete and ready to go for Launch Day! [*]Infraction Manager. If you receive an Infraction on the forums, the server will notify you! Infractions can also be applied to in-game offences [*]I have started working on making the server friendly and exciting, our home will again be Mos Le Harmless! [*]A TON of MySQL database connections to the server. I have tested this for lag, and there is zero to none! I have named these connections Echo Communications [/LIST] [/CENTER]