-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.php
76 lines (48 loc) · 1.4 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php
include('Ebay.php');
//ha
$ebay = new Ebay();
$html = $ebay->search('tshirt','20');
// echo '<pre>';
foreach($html->find('#ResultSetItems') as $html2){
foreach($html2->find('img') as $e){
echo '<img src="' . $e->src . '"/>';
}
foreach($html2->find('#GalleryViewInner') as $e){
echo '<img src="' . $e->src . '"/>';
}
}
echo 'asd';
die;
foreach($html->find('img') as $e){
echo '<img src="' . $e->src . '"/>';
}
// echo $e->src . '<br>';
// }
// echo '<pre>';print_r($html->find('img'));
die;
// find all image
// foreach($html->find('ul') as $e)
// echo $e->src . '<br>';
// foreach($html->find('div[id=ResultSetItems]') as $e)
// echo $e->href . '<br>';
// die;
// // find all link
foreach($html->find('a') as $e)
echo $e->href . '<br>';
// // find all image with full tag
// foreach($html->find('img') as $e)
// echo $e->outertext . '<br>';
// // find all div tags with id=gbar
// foreach($html->find('div#gbar') as $e)
// echo $e->innertext . '<br>';
// // find all span tags with class=gb1
// foreach($html->find('span.gb1') as $e)
// echo $e->outertext . '<br>';
// // find all td tags with attribite align=center
// foreach($html->find('td[align=center]') as $e)
// echo $e->innertext . '<br>';
// // extract text from table
// echo $html->find('td[align="center"]', 1)->plaintext.'<br><hr>';
// // extract text from HTML
// echo $html->plaintext;