Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

02 SMS java class

  • 30-08-2004 6:00pm
    #1
    Registered Users, Registered Users 2 Posts: 885 ✭✭✭


    Hi, I am looking for someone to give me a hand creating a java class that logs into and sends SMS messages from O2's website. I used to have a fully working class but O2 changed their site arround a year ago and since then I keep getting a 403 error. I have got all the correct variables,variable names and URL's but just cant get it to work in java. I have created a HTML page with the same variables and it works fine. I have included all the files I have been working on.


Comments

  • Moderators, Education Moderators Posts: 1,863 Mod ✭✭✭✭Slaanesh


    I too was going to do this and had a quick crack at it.

    The problem I think is that the login page uses SSL so you need SSL connectivity in your hava class, I downloaded an API to do this, but it never parsed the correct HTML page for me, always got some error page. Gave up pretty quickly. If you can understand Perl take a look at mackers.com and look at his script for sending txts, maybe you can get something out of that.

    Slaan.


  • Registered Users, Registered Users 2 Posts: 885 ✭✭✭clearz


    The program logs into o2 website without any hastle. It is just when you go to send a message that the problem is. It must be something got to do with the cookie.


  • Moderators, Education Moderators Posts: 1,863 Mod ✭✭✭✭Slaanesh


    Does it matter if the form is POST or GET ? You're putting all the information into the URL, the cookie looks ok.


  • Registered Users, Registered Users 2 Posts: 885 ✭✭✭clearz


    For the login part it does not matter so I just use GET. To send a message the POST method has to be used.


  • Moderators, Education Moderators Posts: 1,863 Mod ✭✭✭✭Slaanesh


    clearz wrote:
    For the login part it does not matter so I just use GET. To send a message the POST method has to be used.

    I ran mackers perl script in debug mode and here is the output I got.

    Set-Cookie: GX_jst=6e4750b7662d6165;Domain=apps.o2.ie;Path=/; path=/NASApp/System
    Set-Cookie: GX_jst=6e4750b7662d6165;Domain=apps.o2.ie;Path=/
    Set-Cookie: JSESSIONID=6031db4056251fda;Domain=apps.o2.ie;Path=/

    The top cookie is the only thing I noticed that differed from yours ?

    Slaan.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 885 ✭✭✭clearz


    What program are you useing to monitor the HTTP flow or is that part of the perl script. A simple mod to the prog gives me.
    1 null HTTP/1.1 200 200 OK
    2 Server Netscape-Enterprise/6.0
    3 Date Tue, 31 Aug 2004 08:25:32 GMT
    4 Set-Cookie GX_jst=6e4750b7662d6164;Domain=apps.o2.ie;Path=/; path=/NASApp/Syst
    em
    5 Set-Cookie GX_jst=6e4750b7662d6164;Domain=apps.o2.ie;Path=/
    6 Set-Cookie JSESSIONID=0f6983ef561cbc24;Domain=apps.o2.ie;Path=/
    7 Connection close
    


  • Moderators, Education Moderators Posts: 1,863 Mod ✭✭✭✭Slaanesh


    It's part of the perl script. Dunno if it's of any use to you. I don't know much about the raw HTTP data and how to work with cookies. Might be of some help to you, if it is let me know !

    Slaan.


  • Registered Users, Registered Users 2 Posts: 885 ✭✭✭clearz


    Accually there is plenty of info in that text file you gave me. ill look at that for a while and ill let you know how I get on.


  • Registered Users, Registered Users 2 Posts: 885 ✭✭✭clearz


    Got it working


  • Moderators, Education Moderators Posts: 1,863 Mod ✭✭✭✭Slaanesh


    clearz wrote:
    Got it working

    Well done, been trying myself and thought I might have been close. Any chance of your solution ?

    Cheers.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 59 ✭✭moochie


    hiya clearz,

    Any chance of getting you solution to this? Well done on finding out how!

    Thanks

    Moochie :rolleyes:


Advertisement