 |
|
| Sometimes it happens to me that I really would like to use a PHP function in JavaScript. Instead of making unnecessary AJAX calls to accomplish this it would be nice if you could use the same functionality in JavaScript.
Now, this happens to be possible in an easy way thanks to , which is an open source project in which PHP functions are ported to JavaScript functions.
To use PHP.JS you just download it (for free), include it and call the functions. Very easy and useful.
Developer started this when working on a project and decided to keep on working on it afterwards with the goal to provide a php.js file available as open source.
Great work! |  |
| | Comments:
|
| | Comment posted 2009-08-27 08:26:08 by
very useful post great man the project is all about porting PHP functions into Javascript. Yes, many of those are there, but under a different name or one step away – like PHP’s sin and JS’ Math.sin. Some others however, are not that easy to obtain in Javascript .thanks.
|
|
| | Comment posted 2009-08-28 08:50:29 by
great post PHP’s sin and JS’ Math.sin. Some others however, are not that easy to obtain in Javascript .thanks.
|
|
| | Comment posted 2009-08-29 10:32:08 by
it would be nice if you could use the same functionality in JavaScript.very informative post.thanks.
|
|
| | Comment posted 2009-09-01 12:26:33 by
Put an invisible text box on your form. Have your JavaScript change the value of that text box to the data you got back from the other site. When you submit the form, the data in that text box.
|
|
| | Comment posted 2009-09-01 12:29:44 by
I am making a PHP script to send an email with information on the visitor. In order to convert the IP address to the city/ country it is put through some other sites, but the only free ones do it via JavaScript.
|
|
| | Comment posted 2009-09-03 07:31:19 by
Have your JavaScript change the value of that text box to the data you got back from the other site.thanks a lot.
|
|
| | Comment posted 2009-09-11 09:00:22 by
Have your JavaScript change the value of that text box to the data you got back from the other site.
|
|
| | Comment posted 2009-09-11 09:46:18 by
It is nice to get comments. However it seems that most of them are completely irrelevant to this post. I am going to remove any such comments in the future .
For example the Skin surgery company above writing about a text box. This has nothing to do with my post.
Please pay respect to that this is not a free market place for links to your web pages. If you want links, send a request or pay us for a banner.
Links will be removed if this continues.
// Niklas
|
|