Ah, no I hadn't considered it, I was under the misapprehension that
you needed to register with Twitter to use their API.

Following your suggestion I just checked and find that it exactly
answers my question.  Looks like I can even get it in JSON & feed it
into json_decode

Many thanks Simon

Bruce

On Wed, Mar 3, 2010 at 7:36 PM, Simon J Welsh <[email protected]> wrote:
> Have you considered using the Twitter API? 
> http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-users%C2%A0show is all 
> about getting a user's information in a nice XML format.
>
> On 3/03/2010, at 7:31 PM, Bruce Clement wrote:
>
>> 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]
>
> ---
> Simon Welsh
> Admin of http://simon.geek.nz/
>
> Who said Microsoft never created a bug-free program? The blue screen never, 
> ever crashes!
>
> http://www.thinkgeek.com/brain/gimme.cgi?wid=81d520e5e
>
>
>
>
> --
> NZ PHP Users Group: http://groups.google.com/group/nzphpug
> To post, send email to [email protected]
> To unsubscribe, send email to
> [email protected]
>



-- 
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