Eigen twitter class

Gestart doorMaartenl23 reacties20 weergaven

24 berichten · pagina 1 van 2

Maartenl

Lid · Topicstarter

Berichten
5.897
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hallo,

Ik ben bezig met classes te bestuderen en had nu dit gemaakt :

[COLOR= #0000BB]<?[/COLOR]
[URL="http://www.php.net/class"]class[/URL] twitter
[COLOR= #007700]{[/COLOR]
    [URL="http://www.php.net/public"]public[/URL] [COLOR= #0000BB]$naam[/COLOR][COLOR= #007700];[/COLOR]
    [URL="http://www.php.net/public"]public[/URL] [COLOR= #0000BB]$tweet[/COLOR][COLOR= #007700];[/COLOR]
    [URL="http://www.php.net/public"]public[/URL] [COLOR= #0000BB]$datum[/COLOR][COLOR= #007700];[/COLOR]
    [URL="http://www.php.net/public"]public[/URL] [COLOR= #007700]function[/COLOR] set_naam[COLOR= #007700]([/COLOR][COLOR= #0000BB]$naam[/COLOR][COLOR= #007700])
    {[/COLOR]
        [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]naam [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$naam[/COLOR][COLOR= #007700];
    }[/COLOR]
    [URL="http://www.php.net/public"]public[/URL] [COLOR= #007700]function[/COLOR] laad_tweets[COLOR= #007700]()
    {[/COLOR]
        [COLOR= #0000BB]$twitterFeed[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/file_get_contents"]file_get_contents[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]http://twitter.com/statuses/user_timeline.rss?screen_name=[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]naam[COLOR= #007700]);[/COLOR]
        [COLOR= #0000BB]$tweets[/COLOR] [COLOR= #007700]= new[/COLOR] SimpleXMLElement[COLOR= #007700]([/COLOR][COLOR= #0000BB]$twitterFeed[/COLOR][COLOR= #007700]);[/COLOR]
        [COLOR= #0000BB]$tweet[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$tweets[/COLOR][COLOR= #007700]->[/COLOR]channel[COLOR= #007700]->[/COLOR]item[COLOR= #007700];[/COLOR]
        [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]tweet [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$tweet[/COLOR][COLOR= #007700]->[/COLOR]title[COLOR= #007700];[/COLOR]
        [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]datum [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$tweet[/COLOR][COLOR= #007700]->[/COLOR]pubDate[COLOR= #007700];
    }[/COLOR]
    [URL="http://www.php.net/public"]public[/URL] [COLOR= #007700]function[/COLOR] verwerk[COLOR= #007700]()
    {[/COLOR]
        [COLOR= #0000BB]$text[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]tweet[COLOR= #007700];[/COLOR]
        [COLOR= #0000BB]$text[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/preg_replace"]preg_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"#(^|[
 ])([w]+?://[w]+[^ "
	< ]*)#"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"\1<a href="\2" target="_blank">\2</a>"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$text[/COLOR][COLOR= #007700]);[/COLOR]
        [COLOR= #0000BB]$text[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/preg_replace"]preg_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"#(^|[
 ])((www|ftp).[^ "	
< ]*)#"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"\1<a href="http://\2" target="_blank">\2</a>"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$text[/COLOR][COLOR= #007700]);[/COLOR]
        [COLOR= #0000BB]$text[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/preg_replace"]preg_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"/@(w+)/"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"<a href="http://www.twitter.com/\1" target="_blank">@\1</a>"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$text[/COLOR][COLOR= #007700]);[/COLOR]
        [COLOR= #0000BB]$text[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/preg_replace"]preg_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"/#(w+)/"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"<a href="http://search.twitter.com/search?q=\1" target="_blank">#\1</a>"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$text[/COLOR][COLOR= #007700]);[/COLOR]
        [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]tweet [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$text[/COLOR][COLOR= #007700];
    }[/COLOR]
    [URL="http://www.php.net/public"]public[/URL] [COLOR= #007700]function[/COLOR] tweet[COLOR= #007700]()
    {[/COLOR]
        [URL="http://www.php.net/return"]return[/URL] [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]tweet[COLOR= #007700];
    }[/COLOR]
    [URL="http://www.php.net/public"]public[/URL] [COLOR= #007700]function[/COLOR] datum[COLOR= #007700]()
    {[/COLOR]
        [URL="http://www.php.net/return"]return[/URL] [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]datum[COLOR= #007700];
    }
}[/COLOR]
[COLOR= #0000BB]$twitter[/COLOR] [COLOR= #007700]= new[/COLOR] Twitter[COLOR= #007700]();[/COLOR]
[COLOR= #0000BB]$twitter[/COLOR][COLOR= #007700]->[/COLOR]set_naam[COLOR= #007700]([/COLOR][COLOR= #DD0000]maartenlefever[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$twitter[/COLOR][COLOR= #007700]->[/COLOR]laad_tweets[COLOR= #007700]();[/COLOR]
[COLOR= #0000BB]$twitter[/COLOR][COLOR= #007700]->[/COLOR]verwerk[COLOR= #007700]();[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$twitter[/COLOR][COLOR= #007700]->[/COLOR]tweet[COLOR= #007700]().[/COLOR][COLOR= #DD0000] op [/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$twitter[/COLOR][COLOR= #007700]->[/COLOR]datum[COLOR= #007700]();[/COLOR]
?>


Nu wil ik dat niet enkel de laatste tweet maar ook de voorlaatste wordt opgehaald. Hoe doe ik dit ?

Groetjes, Maarten
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
$twitterFeed = file_get_contents(http://twitter.com/statuses/user_timeline.rss?screen_name=.$this->naam.&count=2);


?

toevoeging op 12 april 2012, 14:06:14:
en dan iets van

foreach($twitter->tweet() AS $tweet)
{
echo $tweet op $twitter->datum();
}

?
0
Maartenl

Lid · Topicstarter

Berichten
5.897
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Xjessex schreef:
$twitterFeed = file_get_contents(http://twitter.com/statuses/user_timeline.rss?screen_name=.$this->naam.&count=2);


?
toevoeging op 12 april 2012, 14:06:14:
en dan iets van

foreach($twitter->tweet() AS $tweet)
{
echo $tweet op $twitter->datum();
}

?

Warning: Invalid argument supplied for foreach() in C:xampphtdocspaginaup.php on line 41 sadley
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/class"]class[/URL] twitter
[COLOR= #007700]{[/COLOR]
    [URL="http://www.php.net/public"]public[/URL] [COLOR= #0000BB]$naam[/COLOR][COLOR= #007700];[/COLOR]
    [URL="http://www.php.net/public"]public[/URL] [COLOR= #0000BB]$tweet[/COLOR][COLOR= #007700];[/COLOR]
    [URL="http://www.php.net/public"]public[/URL] [COLOR= #0000BB]$datum[/COLOR][COLOR= #007700];[/COLOR]
    [URL="http://www.php.net/public"]public[/URL] [COLOR= #007700]function[/COLOR] set_naam[COLOR= #007700]([/COLOR][COLOR= #0000BB]$naam[/COLOR][COLOR= #007700])
    {[/COLOR]
        [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]naam [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$naam[/COLOR][COLOR= #007700];
    }[/COLOR]
    [URL="http://www.php.net/public"]public[/URL] [COLOR= #007700]function[/COLOR] laad_tweets[COLOR= #007700]()
    {[/COLOR]
        [COLOR= #0000BB]$twitterFeed[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/file_get_contents"]file_get_contents[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]http://twitter.com/statuses/user_timeline.rss?screen_name=[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]naam[COLOR= #007700]);[/COLOR]
        [COLOR= #0000BB]$tweets[/COLOR] [COLOR= #007700]= new[/COLOR] SimpleXMLElement[COLOR= #007700]([/COLOR][COLOR= #0000BB]$twitterFeed[/COLOR][COLOR= #007700]);[/COLOR]
        [URL="http://www.php.net/foreach"]foreach[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$tweets[/COLOR] [COLOR= #007700]as[/COLOR] [COLOR= #0000BB]$tweet[/COLOR][COLOR= #007700])
        {[/COLOR]
                [COLOR= #0000BB]$tweet[/COLOR][COLOR= #007700][] =[/COLOR] [COLOR= #0000BB]$tweets[/COLOR][COLOR= #007700]->[/COLOR]channel[COLOR= #007700]->[/COLOR]item[COLOR= #007700];[/COLOR]
                [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]tweet [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$tweet[/COLOR][COLOR= #007700][]->[/COLOR]title[COLOR= #007700];[/COLOR]
                [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]datum [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$tweet[/COLOR][COLOR= #007700][]->[/COLOR]pubDate[COLOR= #007700];
        }
    }[/COLOR]
    [URL="http://www.php.net/public"]public[/URL] [COLOR= #007700]function[/COLOR] verwerk[COLOR= #007700]()
    {[/COLOR]
        [COLOR= #0000BB]$text[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]tweet[COLOR= #007700];[/COLOR]
        [COLOR= #0000BB]$text[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/preg_replace"]preg_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"#(^|[n ])([w]+?://[w]+[^ "nrt< ]*)#"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"1<a href="2" target="_blank">2</a>"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$text[/COLOR][COLOR= #007700]);[/COLOR]
        [COLOR= #0000BB]$text[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/preg_replace"]preg_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"#(^|[n ])((www|ftp).[^ "tnr< ]*)#"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"1<a href="http://2" target="_blank">2</a>"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$text[/COLOR][COLOR= #007700]);[/COLOR]
        [COLOR= #0000BB]$text[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/preg_replace"]preg_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"/@(w+)/"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"<a href="http://www.twitter.com/1" target="_blank">@1</a>"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$text[/COLOR][COLOR= #007700]);[/COLOR]
        [COLOR= #0000BB]$text[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/preg_replace"]preg_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"/#(w+)/"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"<a href="http://search.twitter.com/search?q=1" target="_blank">#1</a>"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$text[/COLOR][COLOR= #007700]);[/COLOR]
        [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]tweet [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$text[/COLOR][COLOR= #007700];
    }[/COLOR]
    [URL="http://www.php.net/public"]public[/URL] [COLOR= #007700]function[/COLOR] tweet[COLOR= #007700]()
    {[/COLOR]
        [URL="http://www.php.net/return"]return[/URL] [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]tweet[COLOR= #007700];
    }[/COLOR]
    [URL="http://www.php.net/public"]public[/URL] [COLOR= #007700]function[/COLOR] datum[COLOR= #007700]()
    {[/COLOR]
        [URL="http://www.php.net/return"]return[/URL] [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]datum[COLOR= #007700];
    }
}[/COLOR]
[COLOR= #0000BB]$twitter[/COLOR] [COLOR= #007700]= new[/COLOR] Twitter[COLOR= #007700]();[/COLOR]
[COLOR= #0000BB]$twitter[/COLOR][COLOR= #007700]->[/COLOR]set_naam[COLOR= #007700]([/COLOR][COLOR= #DD0000]maartenlefever[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$twitter[/COLOR][COLOR= #007700]->[/COLOR]verwerk[COLOR= #007700]();[/COLOR]
[URL="http://www.php.net/foreach"]foreach[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$twitter[/COLOR][COLOR= #007700]->[/COLOR]laad_tweets[COLOR= #007700]() as[/COLOR] [COLOR= #0000BB]$tweet123[/COLOR][COLOR= #007700])
{[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$tweet123[/COLOR][COLOR= #007700];
}[/COLOR]
?>


Werkt zeker ook niet? sadley emo.
0
Maartenl

Lid · Topicstarter

Berichten
5.897
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Xjessex schreef:
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/class"]class[/URL] twitter
[COLOR= #007700]{[/COLOR]
    [URL="http://www.php.net/public"]public[/URL] [COLOR= #0000BB]$naam[/COLOR][COLOR= #007700];[/COLOR]
    [URL="http://www.php.net/public"]public[/URL] [COLOR= #0000BB]$tweet[/COLOR][COLOR= #007700];[/COLOR]
    [URL="http://www.php.net/public"]public[/URL] [COLOR= #0000BB]$datum[/COLOR][COLOR= #007700];[/COLOR]
    [URL="http://www.php.net/public"]public[/URL] [COLOR= #007700]function[/COLOR] set_naam[COLOR= #007700]([/COLOR][COLOR= #0000BB]$naam[/COLOR][COLOR= #007700])
    {[/COLOR]
        [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]naam [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$naam[/COLOR][COLOR= #007700];
    }[/COLOR]
    [URL="http://www.php.net/public"]public[/URL] [COLOR= #007700]function[/COLOR] laad_tweets[COLOR= #007700]()
    {[/COLOR]
        [COLOR= #0000BB]$twitterFeed[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/file_get_contents"]file_get_contents[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]http://twitter.com/statuses/user_timeline.rss?screen_name=[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]naam[COLOR= #007700]);[/COLOR]
        [COLOR= #0000BB]$tweets[/COLOR] [COLOR= #007700]= new[/COLOR] SimpleXMLElement[COLOR= #007700]([/COLOR][COLOR= #0000BB]$twitterFeed[/COLOR][COLOR= #007700]);[/COLOR]
        [URL="http://www.php.net/foreach"]foreach[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$tweets[/COLOR] [COLOR= #007700]as[/COLOR] [COLOR= #0000BB]$tweet[/COLOR][COLOR= #007700])
        {[/COLOR]
                [COLOR= #0000BB]$tweet[/COLOR][COLOR= #007700][] =[/COLOR] [COLOR= #0000BB]$tweets[/COLOR][COLOR= #007700]->[/COLOR]channel[COLOR= #007700]->[/COLOR]item[COLOR= #007700];[/COLOR]
                [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]tweet [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$tweet[/COLOR][COLOR= #007700][]->[/COLOR]title[COLOR= #007700];[/COLOR]
                [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]datum [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$tweet[/COLOR][COLOR= #007700][]->[/COLOR]pubDate[COLOR= #007700];
        }
    }[/COLOR]
    [URL="http://www.php.net/public"]public[/URL] [COLOR= #007700]function[/COLOR] verwerk[COLOR= #007700]()
    {[/COLOR]
        [COLOR= #0000BB]$text[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]tweet[COLOR= #007700];[/COLOR]
        [COLOR= #0000BB]$text[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/preg_replace"]preg_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"#(^|[n ])([w]+?://[w]+[^ "nrt< ]*)#"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"1<a href="2" target="_blank">2</a>"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$text[/COLOR][COLOR= #007700]);[/COLOR]
        [COLOR= #0000BB]$text[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/preg_replace"]preg_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"#(^|[n ])((www|ftp).[^ "tnr< ]*)#"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"1<a href="http://2" target="_blank">2</a>"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$text[/COLOR][COLOR= #007700]);[/COLOR]
        [COLOR= #0000BB]$text[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/preg_replace"]preg_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"/@(w+)/"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"<a href="http://www.twitter.com/1" target="_blank">@1</a>"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$text[/COLOR][COLOR= #007700]);[/COLOR]
        [COLOR= #0000BB]$text[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/preg_replace"]preg_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"/#(w+)/"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"<a href="http://search.twitter.com/search?q=1" target="_blank">#1</a>"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$text[/COLOR][COLOR= #007700]);[/COLOR]
        [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]tweet [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$text[/COLOR][COLOR= #007700];
    }[/COLOR]
    [URL="http://www.php.net/public"]public[/URL] [COLOR= #007700]function[/COLOR] tweet[COLOR= #007700]()
    {[/COLOR]
        [URL="http://www.php.net/return"]return[/URL] [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]tweet[COLOR= #007700];
    }[/COLOR]
    [URL="http://www.php.net/public"]public[/URL] [COLOR= #007700]function[/COLOR] datum[COLOR= #007700]()
    {[/COLOR]
        [URL="http://www.php.net/return"]return[/URL] [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]datum[COLOR= #007700];
    }
}[/COLOR]
[COLOR= #0000BB]$twitter[/COLOR] [COLOR= #007700]= new[/COLOR] Twitter[COLOR= #007700]();[/COLOR]
[COLOR= #0000BB]$twitter[/COLOR][COLOR= #007700]->[/COLOR]set_naam[COLOR= #007700]([/COLOR][COLOR= #DD0000]maartenlefever[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$twitter[/COLOR][COLOR= #007700]->[/COLOR]verwerk[COLOR= #007700]();[/COLOR]
[URL="http://www.php.net/foreach"]foreach[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$twitter[/COLOR][COLOR= #007700]->[/COLOR]laad_tweets[COLOR= #007700]() as[/COLOR] [COLOR= #0000BB]$tweet123[/COLOR][COLOR= #007700])
{[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$tweet123[/COLOR][COLOR= #007700];
}[/COLOR]
?>
Werkt zeker ook niet? sadley emo.

Ik test het zo yummie
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Wat als je 100000000 tweets hebt, word het dan niet een beetje traag denk je? emo
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Vriendje schreef:
Wat als je 100000000 tweets hebt, word het dan niet een beetje traag denk je? emo
Denk je nou echt dat de RSS onbeperkt zal zijn vanuit Twitter?
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Aarclay schreef:
Eerdere citaten tonen
Vriendje schreef:
Wat als je 100000000 tweets hebt, word het dan niet een beetje traag denk je? emo
Denk je nou echt dat de RSS onbeperkt zal zijn vanuit Twitter?
Neen yummieMaar je kan nog steeds beter een maximum aantal opgeven.
0
Berichten
3.314
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Trouwens, even geheel offtopic maar

twitter = new Twitter();
$twitter->set_naam(maartenlefever);


is nogal overbodig, maak liever

twitter = new Twitter("maartenlefever");


en dan in je class een __construct, is OOP gezien iets beter
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Kyron schreef:
Trouwens, even geheel offtopic maar
twitter = new Twitter();
$twitter->set_naam(maartenlefever);


is nogal overbodig, maak liever

twitter = new Twitter("maartenlefever");


en dan in je class een __construct, is OOP gezien iets beter

Je vergeet $ geloof ik.
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Vriendje schreef:
Eerdere citaten tonen
Aarclay schreef:
Eerdere citaten tonen
Vriendje schreef:
Wat als je 100000000 tweets hebt, word het dan niet een beetje traag denk je? emo
Denk je nou echt dat de RSS onbeperkt zal zijn vanuit Twitter?
Neen yummieMaar je kan nog steeds beter een maximum aantal opgeven.
Tweets blijven ALTIJD bestaan, als je de directe link hebt, die van /statusses/ID

Zoiets geloof ik.

Maar als je via de API, of via search je eerste tweet probeerd op te zoeken, lukt dat niet.. Althans, als je account oud genoeg is en je genoeg tweets hebt.
0
Maartenl

Lid · Topicstarter

Berichten
5.897
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Kyron schreef:
Trouwens, even geheel offtopic maar
twitter = new Twitter();
$twitter->set_naam(maartenlefever);


is nogal overbodig, maak liever

twitter = new Twitter("maartenlefever");


en dan in je class een __construct, is OOP gezien iets beter

Dit is één van mn eerste classes, en ik bestudeer ze nog.
De RSS bied iets van een 20 tweets aan wink
0
Berichten
3.314
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Maartenl schreef:
Dit is één van mn eerste classes, en ik bestudeer ze nog.
Weet ik yummie Wilde je dat ff als tip meegeven, misschien heb er er wat aan yummie
0
Maartenl

Lid · Topicstarter

Berichten
5.897
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Kyron schreef:
Eerdere citaten tonen
Maartenl schreef:
Dit is één van mn eerste classes, en ik bestudeer ze nog.
Weet ik yummie Wilde je dat ff als tip meegeven, misschien heb er er wat aan yummie
Dat snap ik yummie
0
Fass

Lid

Berichten
3.771
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
doe eens var_dump($tweets);?
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren