Guldstrand Posted February 2 Share Posted February 2 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! 🌹 Quote Link to comment https://forums.phpfreaks.com/topic/317677-scrape-one-or-more-external-pages/ Share on other sites More sharing options...
ginerjm Posted February 2 Share Posted February 2 How do you define a page? What are these pages? How will you read them? Adding what to what when you find something? So many questions that you could have provided answers to as part of your opening. Quote Link to comment https://forums.phpfreaks.com/topic/317677-scrape-one-or-more-external-pages/#findComment-1614648 Share on other sites More sharing options...
Andou Posted February 2 Share Posted February 2 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? Quote Link to comment https://forums.phpfreaks.com/topic/317677-scrape-one-or-more-external-pages/#findComment-1614653 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.