A
A
Andrey Troshkov2014-07-30 11:57:51
PHP
Andrey Troshkov, 2014-07-30 11:57:51

How to find out the hash of a photo in vk.com?

I managed to log in to vk.com using cURL, but then a new question arose, for which I can’t find a solution for an hour already. I want to like the photo. To do this, you need to send a POST request to the vk.com server with some parameters (photo id, etc.). One of these parameters is a hash. How and what was hashed, of course, I don’t know. But it's different. I can't find this hash anywhere in the HTML source code. When you click on the like, the "Photoview.like()" function is triggered. The function does not take any parameters. Inside the function, the hash is taken from some global variable ph. Initially, I planned to parse the page and send a request with a hash, but I can't figure out where this hash is located. Perhaps someone has already met with this, where can I find this hash?
Thanks a lot.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
alternativshik, 2014-07-30
@alternativshik

Why not use the API? All the same, you will need a bunch of accounts and proxies, if you make some kind of bots, then at least you won’t have to fool your head with the pages and with the curl.

A
Alexander Kubintsev, 2014-07-30
@akubintsev

You have to go deeper =)
prntscr.com/47ry82

B
bahek2462774, 2014-07-30
@bahek2462774

6a591b2e195b4b1699cdbe4840b34d0e.PNG
it is stored in onclick.
And you can parse, for example, if you go either to the post page (if you like the post) - or to the page of the photo itself (if you like the photo)

A
Andrey Troshkov, 2014-07-30
@AndyMarrel

Thank you! The post on the wall does have a hash, but the photo, unfortunately, does not.
screencast.com/t/SxLW358wWB

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question