Constituents of a particular index by year

Does anyone know of a way to gather the symbols that make up an index, e.g., SP500, over time? Any pointers would be appreciated.

I have the same question

Take a look at this post: