Ask Question Forum:
Model Library:2025-02-08:A.I. model is online auto reply
C
O
M
P
U
T
E
R
2
8
Show
#
ASK
RECENT
←
- Underline
- Bold
- Italic
- Indent
- Step
- Bullet
- Quote
- Cut
- Copy
- Paste
- Table
- Spelling
- Find & Replace
- Undo
- Redo
- Link
- Attach
- Clear
- Code
Below area will not be traslated by Google,you can input code or other languages
Hint:If find spelling error, You need to correct it,1 by 1 or ignore it (code area won't be checked).
X-position of the mouse cursor
Y-position of the mouse cursor
Y-position of the mouse cursor
Testcursor
caretPos
Attachment:===
Asked by Rodrigo Costa
at 2024-08-09 06:02:18
Point:500 Replies:3 POST_ID:828728USER_ID:10
Topic:
PHP Scripting Language;Asynchronous Javascript and XML (AJAX);JavaScript
Hi folks, I need to retrieve three informations displayed on a certain website, the information is always showed with the following format:
<td class="minimun price "> INFORMATION I NEED</td>
<td class="medium price "> INFORMATION I NEED</td>
<td class="max price "> INFORMATION I NEED</td>
How would I go about retrieving it? Any help would be greatly appreciated.
Cheers!
<td class="minimun price "> INFORMATION I NEED</td>
<td class="medium price "> INFORMATION I NEED</td>
<td class="max price "> INFORMATION I NEED</td>
How would I go about retrieving it? Any help would be greatly appreciated.
Cheers!
Expert: duncanb7 replied at 2024-08-09 09:54:40
Thanks
Have a nice day, talk you later
Duncan
Have a nice day, talk you later
Duncan
Accepted Solution
Expert: gr8gonzo replied at 2024-08-09 06:15:54
250 points EXCELLENT
Read my article on HTML scraping and manipulation where I cover exactly this sort of thing:
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_10277-HTML-Manipulation-Made-Easy.html
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_10277-HTML-Manipulation-Made-Easy.html
Assisted Solution
Expert: duncanb7 replied at 2024-08-09 06:13:48
250 points EXCELLENT
$url="http://yoursite.com/example.htm";
$file_url=file_get_contents($url);
$dom = new DOMDocument(); @$dom->loadHTML($file_url);
for ($a;$a<3;$a++){
$d1=$dom->getElementsByTagName('table")->item(0);
$d2=$d1->getElementsByTagName('tr")->item(0);
$data=$2->getElementsByTagName('td')->item($a)->nodeValue;
echo $data;
}
$file_url=file_get_contents($url);
$dom = new DOMDocument(); @$dom->loadHTML($file_url);
for ($a;$a<3;$a++){
$d1=$dom->getElementsByTagName('table")->item(0);
$d2=$d1->getElementsByTagName('tr")->item(0);
$data=$2->getElementsByTagName('td')->item($a)->nodeValue;
echo $data;
}