Closed veuxx closed 3 years ago
Yes, working but open index php change define values.
After the automatic login process, you can provide the necessary information with the html dom.
I'm definitely not getting it to run. I changed the define values, and used the you example:
login_inst();
sleep(5);
$page = curl_inst('https://www.instagram.com/explore/tags/php/');
var_dump($page);
Where the error reported returns. I must be doing it wrong
Edit: the cookie file is generated normally.
Edit2: i change the line 50 to:
if (!preg_match('/<form data-encrypt method="POST" id="login-form" class="adjacent".*?<\/form>/is', $page, $form)) {
die('Failed to find log in form!');
}
and error change:
Warning: file_get_contents(/Applications/XAMPP/xamppfiles/htdocs/instatune/painel/app/user.txt): Failed to open stream: No such file or directory
funny that the text file is in the same directory.
There was an error saying that the login form could not be found. I tested and solved the codes. The problem will be solved when you replace the code between 56 and 58th lines with the code I have given below (New Code):
*// try to find the actual login form if (!preg_match('/<form data-encrypt method="POST" id="login-form" class="adjacent".?<\/form>/is', $page, $form)) { die('Failed to find log in form!'); }**
After first including the file and editing the login information, you can pull the page source and do whatever you want. Note that the two-step verification should be passive!
I ran a test on xampp and it didn't give me an error just because of the form, the version I used is xampp v3.2.2 / php 5.6.30
Does this script still work? Have error: Failed to find log in form!