Jump to content

Recommended Posts

Can any kind person help with a sample code for the following scenario:

I need to search/retrieve price from one (or several external pages) and display the lowest price BEFORE adding the same product to our non-profit webshop.

 

Thanks in avance! 🌹

Link to comment
https://forums.phpfreaks.com/topic/317677-scrape-one-or-more-external-pages/
Share on other sites

6 hours ago, Guldstrand said:

I need to search/retrieve price from one (or several external pages) and display the lowest price BEFORE adding the same product to our non-profit webshop.

What's a page (in this context)? Is it a webpage or something else?

Is it one page or several? If it's one page, it should be easy enough to whip up a one-off. If it's several, how are you planning on storing the links to the pages? Database, array, or something else?

How do you want to find the lowest price? Do you want to save a copy of the entire HTML and sort through it until you find the price? Or do you want to find the right element and pinpoint it from there? Both options work.

How are you "adding the product"? Are you inserting the details into a database or saving the HTML to copy it over?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.