V
V
Vadim9972014-10-18 15:34:04
PHP
Vadim997, 2014-10-18 15:34:04

How to parse hidden information?

After pressing the button, information appears through js, but when it is updated, it is not available accordingly. And you need to parse this information into a script using php. I am using the Simple_html_dom.php library.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
T
throughtheether, 2014-10-18
@Vadim997

The phone number is given in XML, a GET request to a URL like this:
You need to substitute the appropriate bull_id value , it matches the numbers after the last slash and before ".html", i.e. 16218116, 16239961 in your examples.

I
Ivan, 2014-10-18
@0neS

You need to look at js, infa can be loaded immediately in the body of scripts and loaded later (ajax, etc.).

E
Evgeniy Samoilenko, 2014-10-18
@samoilenkoevgeniy

You can’t say without clarification, most likely it is loaded using ajax, then you need to look where the request is sent, and where the data is taken from, and based on this, add your Js and send the data where you need

A
Anton Shamanov, 2014-10-18
@SilenceOfWinter

If the information is loaded using AJAX, then just directly request a response, and if somehow differently, then load the page through an iframe and send it to your script via AJAX.

V
Vadim997, 2014-10-18
@Vadim997

I just can't parse a phone number from moscow.drom.ru/nissan/moco/16239961.html. I understand that this phone is loading from database using ajax. But how to bring this phone to the script? Here is the php code:

require "simple_html_dom.php";
  
  $html = file_get_html('http://moscow.drom.ru/volkswagen/touareg/16218116.html');

  echo $html->find('#contacts_loading_box_16239961')[0];

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question