Extracting Google+ posts and writing them to a database
Quick nibblette of PHP code to demonstrate the extraction of Google+ posts. This little script will pull 100 posts and insert them into a database for you to do what you want with. Posts aren't written to the database more than once, which means you can use the script with a cronjob to periodically record posts.
Posts with attachments are ignored, but this data (and a lot more) can be included too. Another point to note too is that the ID column has no correlation to the order of which posts were published, so if you're just printing out rows don't expect them to automatically be in the correct order; order by datetime.
There are 2 config files to edit.
includes/config.php
Includes database information and your Google+ ID, which can be found in the URL when viewing your profile.
includes/src/config.php
All you really need to set here is 'developer_key', which is your API key, found at
https://code.google.com/apis/console
Download18
th Sep 11 • 0 comment(s) •
Add commentNattr
Soon to release my latest project -
Nattr
Chat rooms and forums are excellent, but they both have their own major flaws. Without a huge amount of activity a chat application on your website will never be used and can even have a detrimental affect on the website itself. Forums solved this problem by making chat 'non-instant', meaning users could discuss a topic over a period of days. But in the creation of forums, instant chat was lost. Posters are encouraged to write articles, instead of a simple 'yes' or 'no'.
Nattr is an attempt at combining the two, being both instant and non-instant, long posts and short posts.
It wasn't actually a conscious effort to solve any problem though, I just wanted to learn CakePHP.
24
th Jul 11 • 0 comment(s) •
Add commentNattr
Soon to release my latest project -
Nattr
Chat rooms and forums are excellent, but they both have their own major flaws. Without a huge amount of activity a chat application on your website will never be used and can even have a detrimental affect on the website itself. Forums solved this problem by making chat 'non-instant', meaning users could discuss a topic over a period of days. But in the creation of forums, instant chat was lost. Posters are encouraged to write articles, instead of a simple 'yes' or 'no'.
Nattr is an attempt at combining the two, being both instant and non-instant, long posts and short posts.
It wasn't actually a conscious effort to solve any problem though, I just wanted to learn CakePHP.
24
th Jul 11 • 0 comment(s) •
Add comment