php - need advice for dynamic processing sentiment analysis - php

this is screenshoot for my sentiment analysis task.i wanted some advice from you guys.
This program is built with PHP and running static. The result tweets displayed when all input is processed.
my hope is tweet continued to be produced (continuous), and then result of sentiment mapped to the live line graphic.
1. in your opinion, what the most effective way?
(I think maybe jquery is the tools.but i havent found a continuous processing jquery/javascript) .
2. do you know the sample/project of dynamic/continuous processing with jquery/javascript ?
Any help would be greatly appreciated. Thanks

You can expose the data with JSON and then fetch them periodically with jQuery getJSON().

Related

Syncing a YouTube Video for viewers in PHP

I'm working on something that my friends and I can use to sync up YouTune videos based on a URL. I'd like to do this myself instead of using another site just because it's a lot more fun!
So I've been looking around and I've found nothing that can help me with the issue I'm having (Syncing the videos), and help?
Thanks in advance
good starting point is start here using javascript you need to store the position of the current playing vedio ajax would be good choice for string the position and return it back from back end storage (db)

RSA : Encrypt in Javascript and Decrypt in Php

I've found many websites with something related to the subject line (few are in stackoverflow.com itself). However, unfortunately I couldnt get what I want.
What I want is - I've a public-private key pair ready with me. (something like this - http://andytson.com/blog/2009/07/php-public-key-cryptography-using-openssl/)
Now, I want a javascript page which will use this public key. And encrypt some data. This data is then passed on to the php page. And the php page decrypts the data.
So far, I've found few JS pages which does this stuff right from the scratch (i.e. from generating the key pair). Same story for php. But thats not of help to me.
Any help is highly appreciated.
Cheers
Does http://area51.phpbb.com/phpBB/viewtopic.php?f=84&t=33024&start=0 do what you're wanting? Here's the stand-alone demo:
http://www.frostjedi.com/terra/dev/rsa/index.php
The source:
http://www.frostjedi.com/terra/dev/rsa/index.txt

Pull facebook data xml

http://developers.facebook.com/docs/reference/rest/links.getStats/
Okay I have looked at the site above. but im still having some trouble.
I have formated what I need like this
http://api.facebook.com/restserver.php?method=links.getStats&urls=dogtags.com.com,http://www.petsmart.com
My only issue is I need this data to be picked by the zip code another words I only want to see how many likes are on the url http://www.petsmart.com in the zip code 66614. How can I add that variable to the xml data displaying
Thank you all help is greatly appreciated
You are using an outdated facebook API. I would recommend implementing:
http://developers.facebook.com/docs/reference/api/insights/
However, I do not believe there is any way to to look at data from a specific zip-code using the facebook insight API

Grabbing reddit comments and archiving them in a database with php

so I know basic PHP, I coded a basic mysql/php inventory system awhile ago. I want to get more experience. My idea is to grab reddit comments, display them on a page, and then save them in a database. My problem is I don't know how to grab and make sense of JSON data.
For example, here is a JSON link to a reddit thread: http://www.reddit.com/r/blog/comments/117ckb/introducing_three_new_hires/.json
Goal:
INPUT BOX -> reddit unique thread id in input box (http://www.reddit.com/r/blog/comments/<6 digit unique ID>) -> loads reddit comments on the page
That's my current goal, would really appreciate a nudge in the right direction with processing JSON. I know I COULD just Google it, but I'm posting in hopes of someone having experience with the above and offering their expertise on the topic.
Here's a starting point:
$download=json_decode(file_get_contents('http://www.reddit.com/r/blog/comments/117ckb/introducing_three_new_hires/.json'));
foreach ($download as $articles){
foreach ($articles->data->children as $article){
print_r($article);
}
}
Please note: I recommend using Curl instead of get_file_contents() - it's a lot faster!

Can anyone suggest a jQuery shoutbox plugin that writes to an SQL database?

I need a sort of chatbox for a project I'm working on and I don't fancy getting into the nitty-gritty of it myself. Can anyone recommend a good plugin?
My requirements are...
Auto-update with jQuery for anyone viewing the page, not just the user.
Writes to an SQL database, not a text file.
Written in the most recent jQuery.
I looked at one from Code Forest and one from AjaxDaddy but the former did not update for everyone and the latter was written in dated jQuery and wrote to a text file.
Any other suggestions? Thanks very much.
On the first link you tried, everybody get updated but the refresh happens every 15 seconds.
That could easily be changed inside refresh_shoutbox function in this line:
// recurring refresh every 15 seconds
setInterval("refresh_shoutbox()", 15000);
where 15000 is a number of miliseconds.
This one is more up-to-date: http://yensdesign.com/2009/01/create-a-shoutbox-using-php-and-ajax-jquery/
Edit: This one is payed, but also working: http://codecanyon.net/item/shoutcloud-flexible-phpajax-shoutboxchat/full_screen_preview/125018 (no affiliate, no connection or what so ever!)
I've used QShout a few times in the past. It works fine, is somewhat modern (jq 1.4) and is fairly easy to extend.
http://plugins.jquery.com/project/QShout

Categories