Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8606463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:05:48+00:00 2026-06-12T03:05:48+00:00

All I am using PHP Simple HTML DOM Parser to getting product details like

  • 0

All

I am using PHP Simple HTML DOM Parser to getting product details like Title & Price.
This is the code

<?php 

// Include the library
include('simple_html_dom.php');

// Retrieve the DOM from a given URL
$html = file_get_html('http://www.flipkart.com/mobiles/micromax');



// Find all SPAN tags that have a class of "myClass"
foreach($html->find('a.title') as $e){  
    echo 'Title: '.$e->outertext . '<br>';
    //$html = file_get_html('http://www.flipkart.com/mobiles/micromax/'.$e->outertext);

}

foreach($html->find('span.final-price') as $e)
    echo 'Price:'.$e->outertext . '<br>';


?>

Result

Title: Micromax X101 (White) 
Title: Micromax X291 (White) 
Title: Micromax X101 (Yellow) 
Title: Micromax X234+ (Wine Red) 
Title: Micromax Ninja 3 A57 (Black) 
Title: Micromax Ninja 4.0 A87 (Black) 
Title: Micromax Bling Q55 (Pearl White) 
Title: Micromax X222 (Cocoa Brown) 
Title: Micromax X263 (Champagne & Coffee) 
Title: Micromax X650 (Silver White) 
Title: Micromax A73 (Black) 
Title: Micromax X1i XTRA (Black) 
Title: Micromax Superfone Lite A75 (Charcoal Black) 
Title: Micromax X271 (Black & Blue) 
Title: Micromax X50 (Black) 
Title: Micromax Q56 (Baby Pink) 
Title: Micromax X104 (Black) 
Title: Micromax Q22 (Black Green) 
Title: Micromax Aisha A52 (Yellow) 
Title: Micromax A78 (Coffee) 
Price:Rs. 999
Price:Rs. 1910
Price:Rs. 999
Price:Rs. 1190
Price:Rs. 4999
Price:Rs. 6049
Price:Rs. 3130
Price:Rs. 2040
Price:Rs. 1735
Price:Rs. 3350
Price:Rs. 6199
Price:Rs. 1525
Price:Rs. 6299
Price:Rs. 1590
Price:Rs. 4850
Price:Rs. 3999
Price:Rs. 1099
Price:Rs. 1880
Price:Rs. 4699
Price:Rs. 6970

This works fine, but open this page in your browser http://www.flipkart.com/mobiles/micromax. There is ajax product load functionality.

So my script just getting initial loaded products only. I want to get all the products.
You can see “Showing 1-20 of 78”. How to get all 78 products details?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T03:05:49+00:00Added an answer on June 12, 2026 at 3:05 am

    You could read their number of products and divide by 20 as 20 are they display and use their AJAX script to get values. This way you can avoid simple_html_dom and decode json string:

    http://www.flipkart.com/mobiles/micromax?response-type=json&inf-start=0
    http://www.flipkart.com/mobiles/micromax?response-type=json&inf-start=20
    

    and so on.

    You just need to check what script it’s called during page scroll. In Google Chrome you can use Developer Tools, open with F12 and watch for Network section.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using PHP Simple HTML DOM Parser and I want to return all image
I've parsed a HTML document using Simple PHP HTML DOM Parser. In the parsed
I'm using the Simple php DOM Parser to parse an html table and count
I am using PHP Simple HTML DOM Parser to fetch urls, but i got
I'm using the PHP simple DOM parser for filling an HTML template; it seems
I'm using PHP simple html dom to edit some html files. The problem is
I'm using simple_html_dom.php to get all images from an url (like pinterest does) if($_POST['submit'])
I'm using a very simple Stylesheet Switch by php. It was fine all along
I'm using 'Simple HTML Dom' to scrape the HN Front Page (news.ycombinator.com), which works
Hoping this is possible with Simple Html Dom, I'm scraping a page that looks

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.