Hello, I am doing (well trying to do, anyway) a script where I need to follow a link, and through its source (file_get_contents) i need to to follow each "category" and into its "subcategory" (and sometimes even SUBsubcategory).
Lets say the first in the menu is called "Catfood", the second "Dogfood",
you click on "Catfood" and you get a submenu with for example "Whiskas", another one called "Purina Pro",
and you click "Whiskas" and you see a list of food called for example "Whiskas Junior Chicken" and "Whiskas Junior Fish".
then after i have followed "Whiskas", i need to go back and follow "Purina Pro".
then after "Purina Pro" i need to go back to "Dogfood" and do the same to its submenu + subsubmenu + food menu..
so yeah, thats pretty much it basically..
i have already used wget for windows to download the entire website to not put load on it all the time when trying stuff out..
i use RegEx to find categories, their products and price, and i got all that covered, it's just that the website isn't built very friendly for using Regex to tie lets say "Purina Pro" with being in the "Catfood" category, so i have to go through all categories and subcats to save the categories in maybe an array, and bind the subcategories to the main category ("Purina Pro" with "Catfood")
i hope this all doesn't sound too errr weird lol, any help is very much appreciated even enough to just get me started on my own! =)
****************** EDIT BELOW:
The menu looks a bit like this, though it's orinally not about cat or dogfood, they are just examples
Catfood
- Whiskas
- Purina Pro
Dogfood
- Royal Canin
- Puppy food
- Grown
- Senior
- Bozita Robur