Thread

Posted on Sat Feb 18 23:34:09 2006 by offbeat
by zip code
Hey,

What would be the easiest way to message/comment people based on their zip code? I know you can browse users by zip code and get the friend ID's a page at a time...is there a function built in for this? If not, I'd like to help create one, although my perl isn't at its best...

Josh
Direct Responses: 1822 | Write a response
Posted on Sun Feb 19 22:45:44 2006 by grantg in response to 1821
Re: by zip code
Hi Josh,

There isn't a function that scans myspace's "Browse" pages, which is basically what you're talking about. If you'd like to start writing a "browse" method, it'd be a great Perl exercise. :)

The method should probably take a hash or hash reference for its arguments, so that it can be expanded upon (and so you don't have to implement the entire advanced search at once :).

So for example we'd call:

@local_friends = $myspace->browse( { 'zip_code' => 90032 } ); And when we get more advanced we'd be able to: @friends = $myspace->browse( { 'zip_code' => 90032, 'raduis' => 20, 'min_age' => 18, 'max_age' => 45 } ); and so on.

(Note that I currently send people who want this functionality to myspacebot.com).

Write a response