P
P
Progrik2011-09-05 12:02:25
PHP
Progrik, 2011-09-05 12:02:25

Login to VKontakte via php/python

I would like to write one useful poster for a contact, which would spit out on the group page every morning the schedule of classes at the university for the day. Anyway, everyone comes into contact in the morning, so why not show the schedule in the news so that he doesn’t forget anything? :)
Faced an authorization problem. Previously, it was somehow easier at the contact with authorization, but now they have done something and the banal repetition in the script of what is sent to the server for some reason does not work anymore ... I googled a bunch of porridge about this, everything is already either old or not at all working.

How can I now log in to VKontakte with a script? What is the catch there? I used php+curl, in response to the login page I received a void, and on the next request (cookies were shoved into the file, but it seems not the same ..) of the main page, it was displayed with a password entry form for authorization.

PS: You don't need to post links to ancient May/June articles :)
PPS: I'm not familiar with OAuth, and I think it won't suit me. If it fits and someone uses it that way, I'll be glad to hear it. Links to recent articles from Habr on OAuth should not be given.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
B
bracadabra, 2011-09-05
@Progrik

For authorization, I simply used the usual get request to vk.com/login.php?email=EMAIL&pass=PASSWORD , after that I received the user page and the necessary cookies, which I used to obtain an authorization token (without a browser component) for further execution of requests to API.

W
WebSpider, 2011-09-05
@WebSpider

If you are satisfied with the publication on the group wall, then here it is written how to do it through the API.

K
Kindman, 2011-09-05
@Kindman

You can try to log in through the mobile (WAP) version of VKontakte, and repeat the exchange of requests with the script. I think it's easier there.

A
Anatoly, 2011-09-05
@taliban

vkontakte.ru/club1 (ask the question in the source) What is the point of
asking the same question twice? Like it didn’t work there, will it go here? The effect will be the same.

C
charon, 2011-09-05
@charon

a little off topic, but a look at the problem from the outside: IMHO, the schedule should be made available through the phone, and not through VKontakte. I'm not sure that everyone reads VKontakte before classes. Personally, I can’t develop a weather forecast reading system in any way, because I don’t turn on the computer before work, and the phone is super simple.
So I would write for iOs and Android. The phone is looked at more.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question