title: What would be a good algorithm to show recommended items to users in PHP?
body: <p>On shopping sites users are given recommendations based on their purchasing habits, on dating sites users are recommended members based on their personality tests and/or locations.</p>
  
  <p>I have a need to display to my site's user's other members who are near them so they can make new friends etc.</p>
  
  <p>What would be a good way to go about this? </p>
  
  <p>In order to avoid displaying the same old people over and over I was thinking of doing something like this,</p>
  
  <p>at first displaying other members who are in the same zip code as the user. And having a "displayed" flag in the database which would be a timestamp that's updated each time a member is recommended. </p>
  
  <p>Before displaying I can check to see if the displayed timestamp is at least a week old, if so then I can show them, otherwise I will venture further and further and display other members who are in the same city, state, country, etc.</p>
  
  <p>This seems a bit complicated and will require a lot of database checks and processing time in general. So I was wondering, if there is an easier way. Are there any established way to do these sorts of recommended lists functionality?</p>