I am writing a parser for one site. I use biblioteka
simple_html_dom
I wrote this code:
<?php require "simple_html_dom.php"; /* Получаем документ, находим необходимые элелементы для авторизации и устанавливаем им значения логина и пароля. */ $html = file_get_html('http://sb.ua/?id=2&cat=1'); foreach($html->find('input[name=login]') as $login) $login->value = 'k@l.ru'; foreach($html->find('input[name=pass]') as $login) $login->value = '15r'; // проверяем установлено ли значение foreach($html->find('input[name=login]') as $element) echo $element->value . '<br>'; foreach($html->find('input[name=pass]') as $element) echo $element->value . '<br>'; ?> You need a form, the elements of which are set values for authorization, send for processing on their server. After, you need to get the returned document for further parsing.
P.S. link to the page with the library here.
If there are options for implementing this in JavaScript, I will be happy to take a look.