Typically bread crumb scripts are not written to display the pages you just came from, but the directory structure of the site... so you can dig into a certain area for instance, but then jump back out to various levels from the home page. Like Codingforums.com.
If I wanted to create a script that tracked (and listed as links) the previous three or so pages visited, I would pass the page urls through the query string and adjust that data at each new page. Is that what you want to do? Or is it the former?