Jump to content

Search the Community

Showing results for tags 'php simplehtmldom scraping'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. My script don't work correctly. get more results than expected. I' m finding a solutions by 1 week ! here an example by more than a week <?php include 'simple_html_dom.php'; $city = ('trento,rovereto'); $keyword = ('bar,hotel,cinema,geometra'); $array_city_pre = explode(',', $city); $array_keyword_pre = explode(',', $keyword); $list_pre = array("http://$city3.virgilio.it/ricercalocale/searchbu?ref=LOCAL_VIRGILIO&fz=0&usr=1&sgg=0&qs=&dove=&cl=022205&ll=&geoll=&viall=&stxt=$keyword3"); foreach ($array_city_pre as $city3) foreach ($array_keyword_pre as $keyword3) { $list_pre[] = "http://$city3.virgilio.it/ricercalocale/searchbu?ref=LOCAL_VIRGILIO&fz=0&usr=1&sgg=0&qs=&dove=&cl=022205&ll=&geoll=&viall=&stxt=$keyword3"; if (!empty($list_pre)) { foreach ($list_pre as $url_pre) { if (!empty($url_pre)) { $html_pre = file_get_html($url_pre); if (!empty($html_pre)) { foreach ($html_pre->find('//*[@id="search-content"]/section[2]/div/h1/span[1]') as $pre_page); { $page_1 = ($pre_page->innertext / 20); $page = ceil($page_1); $max_page = 100; if ($page >= $max_page) { $page_finale = $max_page; } if ($page < $max_page) { $page_finale = $page; } /*stampo un output per il debug*/ echo "citta:$city3 key:$keyword3 pagina:$page_finale</br>"; $list = array("http://$city3.virgilio.it/ricercalocale/searchbu?ref=LOCAL_VIRGILIO&fz=0&usr=1&sgg=0&qs=&dove=&cl=022205&ll=&geoll=&viall=&stxt=$keyword3&page=$number"); if (!empty($list)) { foreach (range(1, $page_finale) as $number) { $list[] = "http://$city3.virgilio.it/ricercalocale/searchbu?ref=LOCAL_VIRGILIO&fz=0&usr=1&sgg=0&qs=&dove=&cl=022205&ll=&geoll=&viall=&stxt=$keyword3&page=$number"; } if (!empty($list)) { foreach ($list as $url) { echo "$url</br>"; } } } } } } } } } ?> Here the output analysis of ' error http://www.federweb.com/NETBEANS/FSCRAPER/OUTPUT-en.html please give me some inspirations or help... very thanks ! Mauro IT
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.