I've hacked up a quick and dirty that gathers up my daily twitter
"tweets" (postings) from the RSS feed (using Magpie), formats and
sends them as 1 post on one of my blogspot blogs. I have a list of
people I refer to at the bottom with links to their twitter homepage.

I'm interested in doing two things to improve it in the short term,
one is when I refer to another twitter member, expand out their info
(It's all on their twitter profile page) so instead of just saying
@Bruce_Clement it says
    @Bruce_Clement Bruce Clement,  Auckland New Zealand
                                 Website www.clement.co.nz
                                 Software developer, Internet
branding. Linux user.
                                 No I can't fix your computer.
                                 Can't design decent looking websites either.

If I go to the profile page, all the info I need is embedded in the html:

<address>
   <ul class="about vcard entry-author">
       <li><span class="label">Name</span> <span class="fn">Bruce
Clement</span></li>
       <li><span class="label">Location</span> <span
class="adr">Auckland, New Zealand</span></li>
       <li><span class="label">Web</span> <a
href="http://www.clement.co.nz"; class="url" rel="me nofollow"
target="_blank">http://www.clemen...</a></li>
       <li id="bio"><span class="label">Bio</span> <span
class="bio">Software developer. Internet branding. Linux user. No I
can't fix your computer. Can't design decent looking websites
either.</span></li>
   </ul>
</address>

What's the best way to retrieve the page and extract the data? I've
considered my old friends raw sockets and preg_replace_callback but I
know there has to be a better way.

Oh, and the other thing. I'd like to expand out short urls to the
target url by following the relevant 301/302 redirects and using the
result. Is there anything in the standard library that beats raw
sockets?

This is low volume (maybe 20 tweets a day & 10 people referred to) so
coding time is much more important than run-time.

Thanks

Bruce

-- 
Bruce Clement

Home:   http://www.clement.co.nz/
Twitter:        http://twitter.com/Bruce_Clement
Google Buzz: http://www.google.com/profiles/aotearoanz

"Before attempting to create something new, it is vital to have a good
appreciation of everything that already exists in this field." Mikhail
Kalashnikov

-- 
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]

Reply via email to