Results 1 to 5 of 5
  1. #1
    technoreject is offline Member
    Join Date
    Jun 2011
    Posts
    9
    Rep Power
    0

    Default How to go to a website using variables then read whats on the website?

    I am trying to make a simple authentication program, in which (I want) my program to go to a url using variables then read what my website says and if its true then do something
    EX: mywebsite.com?authentication=variable1

    Then my website will echo either 'YES' or 'NO' depending on if variable1 equals what I want it the equal.
    PHP Example Code:
    Java Code:
    <?php
    	
    	$auth = $_GET['authentication'];
    	if($auth == '123' || $auth == '234'){
    		echo 'YES';
    	}
    	else{
    		echo 'NO';
    	}
    	
    ?>

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,307
    Rep Power
    25

    Default

    Look at using the HTTPURLConnection class for the client.
    Do you have an existing website/server?

  3. #3
    technoreject is offline Member
    Join Date
    Jun 2011
    Posts
    9
    Rep Power
    0

    Default

    Not existing, im away from my desktop, but I can get one easily and implement my code into it.

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,307
    Rep Power
    25

    Default

    Is that it? No further questions?

  5. #5
    walkineagle is offline Member
    Join Date
    Apr 2011
    Posts
    7
    Rep Power
    0

Similar Threads

  1. website
    By rithish in forum Java Servlet
    Replies: 0
    Last Post: 04-24-2011, 09:13 PM
  2. Want to use OOP on my website
    By DoubleDee in forum New To Java
    Replies: 23
    Last Post: 09-11-2010, 12:55 AM
  3. What do I need to use this website?
    By ZachVK in forum Java Applets
    Replies: 27
    Last Post: 06-24-2010, 08:15 PM
  4. How to download website (Get all link in website)
    By finalmem in forum Advanced Java
    Replies: 0
    Last Post: 11-12-2008, 08:43 AM
  5. How do i read from a website with a certificate??
    By karl in forum Advanced Java
    Replies: 0
    Last Post: 07-12-2007, 04:25 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •