How to get all expired member list by custom code or any script or hook

How i can show all the members ,those membership expired.I want a lists of members whose membership expired.Please provide me code for that.