<?php
$page_num = 1;
$txtString = "";
while ($page_num <= 2 )
{
$host = "
http://search.twitter.com/search.atom?q=japan&max_id=1529989226&rpp=100&page=$page_num
";
$result = file_get_contents($host);
$xml = new SimpleXMLElement($result);
foreach ($xml->entry as $entry)
{
$statusUpdate[] = $entry->title;
}
$page_num++;
}
foreach($statusUpdate as $su)
{
$txtString .= $su;
}
$myFile = "myTextFile.txt";
$fh = fopen($myFile, 'w') or die("can't open file");
fwrite($fh, $stringData);
$stringData = $txtString;
fwrite($fh, $stringData);
fclose($fh);
?>
On Wed, Apr 15, 2009 at 6:11 PM, Bill <[email protected]> wrote:
>
> Hi. Thanks again. I see:
>
> <link type="application/atom+xml" rel="next" href="http://
> search.twitter.com/search.atom?
> max_id=1529989226&page=2&q=japan<http://search.twitter.com/search.atom?%0Amax_id=1529989226&page=2&q=japan>
> "/>
>
>
> but how do I change that and what do I change it to in the url:
>
> http://search.twitter.com/search.atom?q=japan
>
> is there some part of the url that I can adjust to get more results?
>
> Bill
>
> On Apr 15, 11:39 pm, Matt Sanford <[email protected]> wrote:
> > You could usehttp://search.twitter.com/search.atom?q=japanand a
> > small bit of scripting. Look in those results for a link rel="next"
> > for the next page. That will let you page your way back to ~1500 tweets.
> >
> > Thanks;
> > — Matt Sanford / @mzsanford
> >
> > On Apr 15, 2009, at 06:14 AM, Bill wrote:
> >
> >
> >
> > > Hi Thanks very much. Actually though it seems that they only can make
> > > a pdf with my own tweets. I was hoping to get just tweets that contain
> > > the word 'japan' but thanks anyway.
> >
> > > On Apr 15, 9:58 pm, Abraham Williams <[email protected]> wrote:
> > >> Not quite what you are looking buthttp://tweetbook.in/oauthletsyou
> > >> export
> > >> to pdf.
> >
> > >> On Wed, Apr 15, 2009 at 07:14, Bill <[email protected]> wrote:
> >
> > >>> Hi. Can any suggest the easiest way to get a text file of say 2000
> > >>> tweets that contain the word 'Japan' in them?
> > >>> Thanks.
> >
> > >> --
> > >> Abraham Williams |http://the.hackerconundrum.com
> > >> Hacker |http://abrah.am|http://twitter.com/abraham
> > >> Web608 | Community Evangelist |http://web608.org
> > >> This email is: [ ] blogable [x] ask first [ ] private.
> > >> Sent from Madison, Wisconsin, United States
>
--
Peter M. Denton
www.twibs.com
[email protected]
Twibs makes Top 20 apps on Twitter - http://tinyurl.com/bopu6c