| | #1 |
| SpiderCon War Room Member Join Date: 2012 Location: Earth
Posts: 194
Thanks: 30
Thanked 17 Times in 16 Posts
|
This piece of code gets all the required links, now I want to save them in a file and can't figure out how to do this. Any help would be appreciated. Code: <?php
include_once('simple_html_dom.php');
// Get Contents with Multiple Links
$page1 = file_get_html('http://www.example.com/link1.html');
$page2 = file_get_html('http://www.example.com/link2.html');
$page3 = file_get_html('http://www.example.com/link3.html');
$html = str_get_html($page1.$page2.$page3);
// Find all links in cat_listings_title div
foreach($html->find('a.cat_listings_title') as $element)
echo $element->href . '<br>';
?> |
| |
| | #2 |
| Active Warrior Registered Member Join Date: 2013
Posts: 58
Thanks: 4
Thanked 16 Times in 12 Posts
|
Here you go: http://pastebin.com/7a3LtJNj |
| |
| The Following User Says Thank You to geekSoftware For This Useful Post: |
| | #3 | |
| SpiderCon War Room Member Join Date: 2012 Location: Earth
Posts: 194
Thanks: 30
Thanked 17 Times in 16 Posts
|
| |
| |
|
| Bookmarks |
| Tags |
| file, results, save |
| |