I'm creating a function that passes a URL over and gets the content of the page. If this page contains "Next>", I would like to grab the url of that and continue onto the page next under the page doesn't contain next anymore.
How would this be done? a while loop?
check_url("http://site.com");
-> url contains 'next', href is http://site.com/ggkdoe
-> does http://site.com/ggkdoe contain next? if so, hit it again and check if that contains 'next' then get that url etc etc
Understand? How can this be done?
Thank you in advance