Answer the question
In order to leave comments, you need to log in
How to login to videoigr.net using PHP/cURL?
Dear friends, please help.
I decided to write a script that parses the personal account page of the videoigr.net online store. And I came across an authorization problem, I tried to implement it using cURL. I tried to copy-paste examples from here xdan.ru/avtorizacija-na-sajte-pri-pomoshhi-curl-ph... , and, for example, from here https://htmlweb.ru/php/example/curl_login.php (the written code itself, Unfortunately, on a machine that I don't have access to yet).
In the process, question after question arises: how to save cookies correctly, whether it is necessary to access the page in two stages (authorization, and then parsing the personal account), etc. etc.
Plus, the page itself is full of stuffing.
Tried logging in with both videoigr.net andvideoigr.net/login.php Subsequently, it will be necessary to parse videoigr.net/account.php , but parsing is the tenth question, I at least have access to its contents under my credentials.
I would be grateful for the slightest help
Answer the question
In order to leave comments, you need to log in
1. Get the page with curl http://videoigr.net/login.php
2. Find the form with name="login" and grab the action value from there, for example
http://videoigr.net/login.php?action=process&osCsid=e1caaae9002758dc6bcbdc7179c14d82
- osCsid most likely plays a role (or maybe not. You need to experiment) curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt'); // сохранять куки в файл
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookie.txt'); // считываем куки
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question