Giter Site home page Giter Site logo

gumer-psn-php's Introduction

gumer-psn-php

Try it out here: http://ilendemli.info/PSN/index.php/

Changelogs:

  • v0.3:

    • Added composer support.
    • Breaking changes, now in Gumer\PSN namespace.
    • Requests are made out of constructed objects.
    • Authentication manager with user provider and interface that are extensible.
  • v0.2:

    • updated for the new login procedure by sony
    • make the code a bit more tidier
  • v0.1:

    • initial release

For now this script can do:

  • Log in to the site and receive access and refresh tokens
  • Refresh the access token
  • Get profile data
  • Get friend list (you always can get your friendlist, you can also get the friendlist of a friend of yours, they just have to allow it)

##Features planned

  • Get trophies
  • Get all coversations (as overview)
  • Get one conversation (as chat, gets all messages)
  • Send a text message
  • Friends
    • Friends management (add, delete, block)
    • Messaging with voice and image
  • Profile feeds (depends on users privacy)
  • Notifications

##Requirements

  • A valid PSN account
  • A webserver (can be locally or hosted somewhere)
  • Some brain

##Installing I don't have to explain this, do I? But let me just say that you need a folder called 'tmp' in the same folder where the login.php is

###PHP

// Setup the connections and instances.
$client     = new Guzzle\Http\Client('', ['redirect.disable' => true]);
$connection = (new Gumer\PSN\Http\Connection)->setGuzzle($client);
$provider   = new Gumer\PSN\Authentication\UserProvider($connection);
$auth       = Gumer\PSN\Authentication\Manager::instance($provider);

// Attempt to login.
$auth->attempt('username_here', 'password_here');


// Get the current user profile.
$request    = new Gumer\PSN\Requests\GetMyInfoRequest;
$response   = $connection->call($request);
$info       = json_decode($response->getBody(true), true);

// Get the friends list for the current 
$request    = new Gumer\PSN\Requests\TrophyDataRequest;
$request->setUserId($info['onlineId']);
$response   = $connection->call($request);

and so on..

Contribute

NOTE: I do own a PlayStation 3 system, so i can spam my friends with messages and check if they are online. I downloaded the PSN app on my iPhone 5 and the apps are similar. I can sniff the data which are sent to PlayStation servers, so I was able to create the code to send messages. You can donate to [email protected], if you want to support me and my work. Any support is appreciated!

gumer-psn-php's People

Contributors

ilendemli avatar qligier avatar jjiko avatar tleilax avatar cjwyatt avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.