+ Reply to Thread
Results 1 to 12 of 12

Thread: Events xml or webservice

  1. #1
    Telaran
    Join Date
    Mar 2011
    Posts
    94

    Default Events xml or webservice

    Is there an xml feed or webservice where we can pull the current active events from?

    I was wondering where the site http://events.riftpluz.com/ got their data from, and if it were publicly available.

  2. #2
    RIFT Fan Site Operator Riane's Avatar
    Join Date
    Apr 2011
    Posts
    5,612

    Default

    Nope, there is currently no actual XML or public file.

    Feel free to take a look at RAT - Rift Assistance Toolbox to utilize the same method for grabbing the Event information you need.

  3. #3
    Telaran
    Join Date
    Mar 2011
    Posts
    94

    Default

    Riane do you have an example of how to authorize and login via php?

    I've been going through your code, but I'm a bit stumped.

    I've gotten this far:

    Code:
    
    function auth()
    {
        $fields;
        $fields_string;
        $url = 'https://auth.trionworlds.com/auth';
        $data = array('username' => 'someusername', 'password' => 'somepassword', 'channel' => '1');
        $header = array('Content-type: application/xml', 'Host: auth.trionworlds.com');
        foreach ($data as $key => $value) {
            $fields_string .= $key . '=' . $value . '&';
        }
        rtrim($fields_string, '&');
    
        $curl = curl_init();
        curl_setopt($curl, CURLOPT_URL, $url);
        curl_setopt($curl, CURLOPT_HEADER, $header);
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
        //curl_setopt($curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
        curl_setopt($curl, CURLOPT_POST, count($fields));
        curl_setopt($curl, CURLOPT_POSTFIELDS, $fields_string);
        global $response;
        $response = curl_exec($curl);
        $status = curl_getinfo($curl);
        curl_close($curl);
        login();
    }
    
    Last edited by Sharana; 05-30-2014 at 12:35 PM.

  4. #4
    Shadowlander Zanderfied's Avatar
    Join Date
    Apr 2014
    Posts
    31

    Default

    Quote Originally Posted by Sharana View Post
    Riane do you have an example of how to authorize and login via php?

    I've been going through your code, but I'm a bit stumped.

    I've gotten this far:

    Code:
    
    function auth()
    {
        $fields;
        $fields_string;
        $url = 'https://auth.trionworlds.com/auth';
        $data = array('username' => 'someusername', 'password' => 'somepassword', 'channel' => '1');
        $header = array('Content-type: application/xml', 'Host: auth.trionworlds.com');
        foreach ($data as $key => $value) {
            $fields_string .= $key . '=' . $value . '&';
        }
        rtrim($fields_string, '&');
    
        $curl = curl_init();
        curl_setopt($curl, CURLOPT_URL, $url);
        curl_setopt($curl, CURLOPT_HEADER, $header);
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
        //curl_setopt($curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
        curl_setopt($curl, CURLOPT_POST, count($fields));
        curl_setopt($curl, CURLOPT_POSTFIELDS, $fields_string);
        global $response;
        $response = curl_exec($curl);
        $status = curl_getinfo($curl);
        curl_close($curl);
        login();
    }
    
    What does your error.log output in the relevant subdirectory of your webserver, if you're not getting errors printed then they're likely to be in there?

  5. #5
    Soulwalker
    Join Date
    Apr 2014
    Posts
    9

    Default

    Quote Originally Posted by Sharana View Post
    Is there an xml feed or webservice where we can pull the current active events from?

    I was wondering where the site http://events.riftpluz.com/ got their data from, and if it were publicly available.
    I am struggling with the same thing I have some URLs but they seem strange to work with

  6. #6
    Telaran
    Join Date
    Mar 2011
    Posts
    94

    Default

    Quote Originally Posted by lordraz0r View Post
    I am struggling with the same thing I have some URLs but they seem strange to work with
    Ok so I got a rough beta up and running (http://rift-ashken.rhcloud.com/) using the Rift mobile api. I can send you the source code and you are welcome to take a look at it.

    It's inspired by http://events.riftpluz.com/, but in a layout I prefer more.
    Last edited by Sharana; 06-26-2014 at 11:43 PM.

  7. #7
    Rift Disciple Fooman's Avatar
    Join Date
    Feb 2011
    Posts
    153

    Default

    The toggle pvp button seems to only work for the NA cluster.

    Would love to see some source code.

  8. #8
    Telaran
    Join Date
    Mar 2011
    Posts
    94

    Default

    Thanks for spotting the pvp bug

    Here is the authorize and login code:

    Code:
     function authorize()
      {
        $postdata = http_build_query($this->query);
        $opts = array('http' =>
            array(
                'method' => 'POST',
                'header' => 'Content-type: application/x-www-form-urlencoded',
                'content' => $postdata
            )
        );
    
        $context = stream_context_create($opts);
    
        $this->ticket = file_get_contents($this->server_auth, false, $context);
        $this->login();
      }
    
      function login()
      {
        $postdata = http_build_query(
            array(
                'ticket' => $this->ticket
            )
        );
    
        $opts = array('http' =>
            array(
                'method' => 'POST',
                'header' => 'Content-type: application/x-www-form-urlencoded',
                'content' => $postdata
            )
        );
    
        $result = file_get_contents($this->server . '/loginByTicket?os=iOS&osVersion=5.100000&vendor=Apple', false, $context);
    
        $cookies = array();
        foreach ($http_response_header as $hdr) {
          if (preg_match('/^Set-Cookie:\s*([^;]+)/', $hdr, $matches)) {
            parse_str($matches[1], $tmp);
            $cookies += $tmp;
          }
        }
    
        $this->cookie = $_SESSION['cookie'] = 'SESSIONID=' . $cookies['SESSIONID'];
        $this->authorized = true;
        $this->cookie;
      }
    After that it's basically just looking through the Rift Mobile code, the Rift Assiatance Toolbox and Ruby client for Trion World's RIFT Mobile App API
    Last edited by Sharana; 07-07-2014 at 07:09 AM.

  9. #9
    Plane Walker Elioty's Avatar
    Join Date
    Dec 2011
    Posts
    464

    Default

    Hey, I did not know your zone event tracker until now and it looks great too. I feel quite happy to see people being inspired by my tracker And to have some competitors too. Got to work on the future version of my zone event tracker.

    However, just as a note, you do not need to connect/authenticate to access the zone event tracking API ;)

  10. #10
    Telaran
    Join Date
    Mar 2011
    Posts
    94

    Default

    Quote Originally Posted by Elioty View Post
    Hey, I did not know your zone event tracker until now and it looks great too. I feel quite happy to see people being inspired by my tracker And to have some competitors too. Got to work on the future version of my zone event tracker.

    However, just as a note, you do not need to connect/authenticate to access the zone event tracking API ;)
    Thanks And thanks for the lovely tracker, I've been using for forever!

    Yeah I found that out after I'd done all the code :s Guess it's only for all the chat part.

    That's the next part of the project, to pull out that stuff.

  11. #11
    Plane Walker Elioty's Avatar
    Join Date
    Dec 2011
    Posts
    464

    Default

    Quote Originally Posted by Sharana View Post
    Thanks And thanks for the lovely tracker, I've been using for forever!
    Oh, thanks

    Quote Originally Posted by Sharana View Post
    Yeah I found that out after I'd done all the code :s Guess it's only for all the chat part.
    Do not forget the lottery tickets too

    Quote Originally Posted by Sharana View Post
    That's the next part of the project, to pull out that stuff.
    Good luck! And in the end, you did not code your authentication class for nothing ;)

  12. #12
    Ascendant forbiddenlake's Avatar
    Join Date
    Jun 2013
    Posts
    5,706

    Default

    Something like http://chat-us.riftgame.com:8080/cha...t?shardId=1704 ?

    You need a list of shard IDs - can be found on http://chat-us.riftgame.com:8080/chatservice/shard/list [which seems mostly broken, but you can find the right shard IDs eventually]. And the event list looks up to date.

    What I'd really like is official documentation the mobile API and this chat-us / chat-eu data.

+ Reply to Thread

Bookmarks

Posting Permissions

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