Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (495)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Game Development / Networking & Multiplayer / Connect Java App to a Wordpress MYSQL Database on: 2013-05-11 07:54:32
Hello

So I'm in the current process of building a launcher for my game. One of the systems I need is login. How the login will work on a general base is the java app will somehow send the username and password encoded (I already know how to do the encoding) to the Wordpress front end and request a login using the username and password. From there WordPress does its normal way of logging in. But instead of returning the website it needs to goto, I would like it to return if the user was accepted or not.

So I would be guessing a plugin on the wordpress side will be required so it can just return true or false. Next will be java, I need a way to send a username and password to wordpress. Though wordpress doesn't use java, it uses PHP. So is there I can request a php query inside java.

I have looked at XMLRPC but I can't find a way for just to login to wordpress from that, it seems that you have to use a function to do something to test to see if you can login. If someone knows how to just do login, I wouldn't mind that either.

Thanks, Sam
2  Game Development / Networking & Multiplayer / Wordpress Login on: 2012-11-08 05:49:11
Hello

So what I want to be able to do is have a login for my game, which uses my website database for logins. This is a wordpress site so it uses wordpress database structure. In the game I use JMonkey game engine and I'm using nifty-gui for my GUI interface. So what I would like to know is how I can get the username and password out of the nifty textfields and send them to my website to get checked to see if they're correct or not. Then for it to pick up the response and if correct goes into the game otherwise have to retry.

The nifty code is
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
<?xml version="1.0" encoding="UTF-8"?>
<nifty>
   <useStyles filename="nifty-default-styles.xml" />
   <useControls filename="nifty-default-controls.xml" />
   
   <screen id="start" controller="racer.LoginStateScreenController">
       <layer id="layer1" backgroundColor="#003f" childLayout="center">
           <panel height="25%" width="35%" align="center" valign="center" backgroundColor="#f60f" childLayout="vertical">    
               <panel id="firstPanel1" width="100%" height="40%" childLayout="center">
                   <control id="username" type="textfield" visibleToMouse="true" align="center" valign="center"/>
               </panel>
               <panel id="firstPanel2" width="100%" height="40%" childLayout="center">
                   <control id="password" type="textfield" visibleToMouse="true" align="center" valign="center" passwordChar="*"/>
               </panel>
               <panel id="firstPanel3" width="100%" height="20%" childLayout="center">
                <control id="button1" type="button" align="center" valign="center" label="login" visibleToMouse="true">
                   <interact onClick="submit1()"/>
                </control>
            </panel>
           </panel>
        </layer>
  </screen>
</nifty>


And the Login Controller is
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
package racer;

import de.lessvoid.nifty.Nifty;
import de.lessvoid.nifty.screen.Screen;
import de.lessvoid.nifty.screen.ScreenController;

public class LoginStateScreenController implements ScreenController {
   
   Nifty nifty;
   Screen screen;
   
   @Override
   public void bind(Nifty nifty, Screen Screen) {
     
   }
   
   @Override
   public void onEndScreen() {
     
   }
   
   @Override
   public void onStartScreen() {
     
   }
   
   public void submit1() {
     
   }
}



Thanks Sam. Just ask if you need any addition information.
Pages: [1]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

BurntPizza (14 views)
2014-09-19 03:14:18

Dwinin (32 views)
2014-09-12 09:08:26

Norakomi (58 views)
2014-09-10 13:57:51

TehJavaDev (80 views)
2014-09-10 06:39:09

Tekkerue (40 views)
2014-09-09 02:24:56

mitcheeb (62 views)
2014-09-08 06:06:29

BurntPizza (46 views)
2014-09-07 01:13:42

Longarmx (32 views)
2014-09-07 01:12:14

Longarmx (37 views)
2014-09-07 01:11:22

Longarmx (36 views)
2014-09-07 01:10:19
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!