Re: [PHP] Best ajax library
I have chosen jquery at last. because: • jQuery has a huge number of plugins available for everything you could imagine wanting to do online • The information on the jQuery site is extremely well documented, with many examples • jQuery does not extend the elements that it works on, which means that JavaScript such as 'for(i in el){...}' will still work • jQuery's CSS selector engine, Sizzle, is arguably the most complete and the quickest available reffer to jquery with php by Kae Verens thanks for your helps frinds On Tue, Dec 15, 2009 at 6:49 PM, Philip Thompson philthath...@gmail.comwrote: On Dec 15, 2009, at 3:12 AM, Joseph Masoud wrote: On 15 Dec 2009, at 08:50, Ali Asghar Toraby Parizy aliasghar.tor...@gmail.com wrote: Which one is more active than others? I mean which project extends faster and better, in future? On Tue, Dec 15, 2009 at 1:37 AM, Philip Thompson philthath...@gmail.com wrote: On Dec 14, 2009, at 4:27 AM, Ali Asghar Toraby Parizy wrote: Hi I think the best choice is jquery until now. But, is it reasonable to combine jquery and other library to client side and server side scripting respectively? By the way, where i can find good lessons about jquery and php? I really like this js library. http://mootools.net/ It's based off of jquery or prototype... I can't remember. ~Philip JQuery and Mootools are two very different approaches of creating a JavaScript framework. Both shine in different ways. I use JQuery when I want to get things done quickly (using the Yii framework or on custom projects). I use mootols when I develop Joomla! Extensions and it's amazing. Which is more suitable boils down to what your project needs. I'm messing around with Ext at the moment and it's really nice too! The ultimate answer to your question is; it depends. Along those lines of it depends... to my knowledge, most of the larger/more popular js frameworks consider other libraries when being developed. Meaning, the chances of a naming conflict are lowered. Not that I recommend it, but it does allow for using multiple libraries for a single project - that's another thread. I can't speak for the other libraries, but I know that MooTools is constantly being updated and improved. I doubt that it will be leaving anytime soon. Check out some extended functionality of MooTools... Clientcide. It's created by the same author of MooTools to work with it. http://www.clientcide.com/ ~Philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Checking for internet connection.
Hi all. I'w writing a PHP app that is designed to run over a LAN, so internet connection for the server is not really essential. Some users may deliberately not connect it to the internet as a security precaution. But I'd like the app to make use of an internet connection if it exists to check for an update, and notify the user. Is there a simple way for a PHP script to check if it has an internet connection? I thought of this : if(fsockopen(www.google.com, 80)){ // we are connected } Is this OK or is there something better for the purpose? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Checking for internet connection.
On Sun, 2009-12-20 at 10:13 +1000, Angus Mann wrote: Hi all. I'w writing a PHP app that is designed to run over a LAN, so internet connection for the server is not really essential. Some users may deliberately not connect it to the internet as a security precaution. But I'd like the app to make use of an internet connection if it exists to check for an update, and notify the user. Is there a simple way for a PHP script to check if it has an internet connection? I thought of this : if(fsockopen(www.google.com, 80)){ // we are connected } Is this OK or is there something better for the purpose? Why can't you put the update on the same LAN server that the app resides? If that is not possible, what about using CURL, and update if it can connect successfully, but don't if it cannot? Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] Checking for internet connection.
Why can't you put the update on the same LAN server that the app resides? If that is not possible, what about using CURL, and update if it can connect successfully, but don't if it cannot? Thanks, Ash http://www.ashleysheridan.co.uk Since the LAN is remote (many hundreds of miles away) from the source of the update, the only practical way to deliver an update every month or week to multiple users is to make it available for download from a central update server. I'm just trying to maximize efficiency by checking if an internet connection exists, and abandoning further attempts to check for update availability if it does not. The idea to use CURL seems valid, but it pre-supposes that I know the answer to my own question. To use your suggestion, I'd have to have some mechanism to detect if it can connect successfully. I'm asking what that mechanism should be, and if the one I've suggested is good, or flawed in some way.
Re: [PHP] Checking for internet connection.
On Sun, 2009-12-20 at 10:36 +1000, Angus Mann wrote: Why can't you put the update on the same LAN server that the app resides? If that is not possible, what about using CURL, and update if it can connect successfully, but don't if it cannot? Thanks, Ash http://www.ashleysheridan.co.uk Since the LAN is remote (many hundreds of miles away) from the source of the update, the only practical way to deliver an update every month or week to multiple users is to make it available for download from a central update server. I'm just trying to maximize efficiency by checking if an internet connection exists, and abandoning further attempts to check for update availability if it does not. The idea to use CURL seems valid, but it pre-supposes that I know the answer to my own question. To use your suggestion, I'd have to have some mechanism to detect if it can connect successfully. I'm asking what that mechanism should be, and if the one I've suggested is good, or flawed in some way. I think the only way to detect if it can connect to the Internet is to see if you can grab a file from somewhere on the Internet. I'd hazard a guess that when operating systems are able to tell you they can connect to the Internet they are actually saying they can ping a predetermined remote host. I think checking if PHP can grab a remote file with Curl would be sufficient in this case. Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] Checking for internet connection.
Curl_init() will return a resource or false if it fails, like it would if no Internet connection were present. J Corry Sent from my iPhone On Dec 19, 2009, at 5:36 PM, Angus Mann angusm...@pobox.com wrote: Why can't you put the update on the same LAN server that the app resides? If that is not possible, what about using CURL, and update if it can connect successfully, but don't if it cannot? Thanks, Ash http://www.ashleysheridan.co.uk Since the LAN is remote (many hundreds of miles away) from the source of the update, the only practical way to deliver an update every month or week to multiple users is to make it available for download from a central update server. I'm just trying to maximize efficiency by checking if an internet connection exists, and abandoning further attempts to check for update availability if it does not. The idea to use CURL seems valid, but it pre-supposes that I know the answer to my own question. To use your suggestion, I'd have to have some mechanism to detect if it can connect successfully. I'm asking what that mechanism should be, and if the one I've suggested is good, or flawed in some way. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Checking for internet connection.
The next way to handle this might be to code an AIR app. Then it's a simple js trap to see if connectivity exists. Bastien Sent from my iPod On Dec 19, 2009, at 7:13 PM, Angus Mann angusm...@pobox.com wrote: Hi all. I'w writing a PHP app that is designed to run over a LAN, so internet connection for the server is not really essential. Some users may deliberately not connect it to the internet as a security precaution. But I'd like the app to make use of an internet connection if it exists to check for an update, and notify the user. Is there a simple way for a PHP script to check if it has an internet connection? I thought of this : if(fsockopen(www.google.com, 80)){ // we are connected } Is this OK or is there something better for the purpose? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php