Hey Guys,
I have no idea HOW to do this, or whether or not it's even possible...
On the right hand side of a twitter account page, there are the current trends: ie: Mick Jagger, Kobe Bryant, Lebron James etc... They are all enclosed in name=" " tags. I want to be able to randomly extract one of the names (randomly every time is different) to a php script that I can later echo.
Anyone know how I can go about doing this?
Twitter Scraping
Moderator: General Moderators
- Jonah Bron
- DevNet Master
- Posts: 2764
- Joined: Thu Mar 15, 2007 6:28 pm
- Location: Redding, California
Re: Twitter Scraping
Regex or DOM. Probably regex. Look at the source and make a pattern. Use preg_match_all(), and randomly pick one of the results with array_rand().
Are you sure the Twitter API doesn't provide something for this?
Are you sure the Twitter API doesn't provide something for this?