phphtmlremote-accessplaystation3

how to get prices from Playstation Store


I guess it is loaded by ajax.

I already tried CURL, DOMDocument and PHP Simple HTML DOM Parser

Details:

I'm trying to get the price of games on Playstation Store. I have an url like https://store.sonyentertainmentnetwork.com/#!/en-us/jogos/shadow-of-the-colossus/cid=UP9000-NPUA80677_00-SOTC000000000001 and I want to get the price. <div class="price">$19.99</div>

I just noticed that if you check the source code of the page, it does not have any element displayed on page, that is because I believe all is loadaded by something like ajax and I guess PHP parses will never work here.

I tried Jquery AJax(), Get() and Load() functions and I did not get success. Some problem with crossdomain.

There is a website called PSN Prices that can do it.

Additional Info:

It is totally for personal purpose, I just want to do some kind of wishlist and follow prices by myself.

Sorry my english.


Solution

  • The price is retrieved through JSON: https://store.sonyentertainmentnetwork.com/chihiroview/storetree2?https%3A%2F%2Fstore.sonyentertainmentnetwork.com%2Fstore%2Fapi%2Fchihiro%2F00_09_000%2Fcontainer%2FUS%2Fen%2F999%2FSTORE-MSF77008-BASE%3FsessionCountry%3Dus%26sessionLang%3Den%26geoCountry%3DPT%26size%3D30

    search for 19.99

    "display_price":"$19.99"

    EDIT:

    Game url:

    https://store.sonyentertainmentnetwork.com/#!/en-us/jogos/shadow-of-the-colossus/cid=UP9000-NPUA80677_00-SOTC000000000001

    JSON url:

    https://store.sonyentertainmentnetwork.com/store/api/chihiro/00_09_000/container/US/en/999/UP9000-NPUA80677_00-SOTC000000000001

    Using http://jsonformatter.curiousconcept.com/ to make it easier, it seems you need to get

    default_sku->display_price