Global Arrays

I am writing a script that follows links from a page and need to keep track of the links that have already been visited so i dont visit them again. I tried using a global array but am having trouble using my recursive method. For example: will have links to

and these links may themselves contain as a link which i dont want to follow as it has already been traversed.

Any ideas would be greatly appreciated.

store the “Followed” links in a session/cookie. When loading the page and displaying the links, check the session/cookies first. If it’s in there… then don’t display it.

Sponsor our Newsletter | Privacy Policy | Terms of Service