My JavaScript book is out! Don't miss the opportunity to upgrade your beginner or average dev skills.

Sunday, April 27, 2008

Phomet changes name, so welcome Phico project

This is both an update and a news about my little Phomet project.

I am sorry because I have not found time to write better examples or to explain possibilities as well, but I am sure you would like to know that now the project is called Phico (click there to download them)

See you as soon as possible to talk again about Phico :geek:

10 comments:

vertical-align said...

The url is missing the http://. Thank you for sharing your (great) work. Going to test it now.

{Michael : iSkitz} said...

Hey Andrea,
Just letting you know that your Phico download link is broken.

I think you meant:

http://www.3site.eu/phico.php

Right now it links to:

http://webreflection.blogspot.com/2008/04/www.3site.eu/phico.php

Question: Is Comet really feasible with today's infrastructure and browser implementations?

As usual, great work experimenting and sharing ;-)

Anonymous said...

Dear Andrea,

I have tried your new upload and it seems to work very nice too.

My problem was the max_execution_time of the server, because in your code you try to overwrite the actual time but in firebug this outputs an "error" of "missing ; before statement - ... headers already sent by (output startet at ...)...". So I have commented out the line "set_time_limit(0);" in the __construct-function in Phico PHP-code. Also I place a .htaccess-file to my Phico directory with some informations to overwrite the max_execution_time here.

Also you added function to disconnect from Phico after xx seconds in the index.php, so the output-data (time) isn't updated after this countdown. So I tried to comment this out too and so your script is running without an end here ;-)

Maybe the settings of a .htaccess-file can make it possible to overwrite the max_execution_time on web pages where users have not enough rights to change the settings in php.ini file!? Maybe we can contact to discuss a bit more on this problem in email.

Best regards,
Ronny

PS: Great work. Hope you will continue working on this very interesting project!!!

Andrea Giammarchi said...

Ronny, I have uploaded new version right now that suppress errors if some function is not usable, and uses Pear JSON file if json_encode is not available.

PHP 5.2 should not be a requirement, now, just PHP ... but of course version 5 (4 is death) :geek:

Michael, thanks to spot that typo :D

Anonymous said...

Hey Andrea,

thank you for working on it. The version (0.1.5) is running without an error when loading, but there isn't any output. PHP Version is 5.1.6 as I wrote in email yesterday. Here on my local installation with PHP 5.2.3 there is output of time like it should be.

Kind regards,
Ronny

PS: Maybe we can talk about it when you're back from travel!

Andrea Giammarchi said...

Ronny, I have successfully tested Phico with JSON Pear file, and it's working perfectly. Could you give me more details about your configuration?

Tadas said...

Hello,

Nice work! I like it. The first comet that works to me. Simple and powerful :) I was thinking about a multiplayer game and if I will make it I will do it with Phico.

Keep up a good work.

Ellis said...

Any thoughts about converting the JS to a jQuery plugin?

Steffen said...

Hey Andrea,

Phico ist really neat, and I am using it to test a new application. However, I am experiencing problems when I send more than a certain number of bytes in a message (around 2500). I get the following error:

illegal character
http://www/js/phico.js
Line 80
script type="text/javascript">parent.Phico.onData(0,"{\"1214581921-07404\":{\"C...

Do you have an idea how to solve this?

Also, Phico doesn't work in IE for me. Some of the site's content disappears, and the feed php URL is shown in the status bar. The app stalls.

If you have any ideas, please let me know.

Thanks,

Steffen

Rakesh Jain said...

Hello Andrea,

this tiny script is really great. but when i am running it on server it does not work. let me explain you this manner. i have an in-house server with static ip. We set up a firewall and with the help of this firewall it treat all internal requests as local request.

I deployed your script here at this location http://202.131.106.133/websites/phico/index.php (which is my internal server), and when i am requesting this URL while connected with my local network it works fine. but when i am requesting it from outside my local network it does not work.

can you please put some light on it. i really tried my best to find out the problem but not able to find out any issue.

look forward for your support

thanks
Rakesh Jain