12
votes
4answers
815 views

PHP and Javascript work together to create a DRY mess!

Consider the following. It's a simple list of items in a list, which allow the user to dynamically generate that list of events. Then a controller action does the work of serializing that into the ...
5
votes
2answers
130 views

First Wordpress plugin

This is my first Wordpress plugin. I would love some input from the WP/PHP/javascript guru's out there. It's a simple plugin that saves a post using ctrl-q and opens a preview in a new or current ...
5
votes
0answers
165 views

My PHP AJAX bridge to jQuery library

I've been working on this library for 2 years now and using on many websites with great success. And I decided to make it public, I can assure this is the best jQuery <=> PHP bridge library there ...
4
votes
1answer
84 views

Is my PHP script/embed remover robust?

The goal of this question: Your goal here is to find a security hole in my code which allows a user to create input that contains a script doing anything they want, without that script being stopped ...
4
votes
1answer
139 views

Loading Javascript Libraries with PHP API

First question on this site so please take it easy on me and let me know if I infringe the common etiquette :-) I have written the following script which simply: Loops through javascript files ...
3
votes
2answers
146 views

Better way to return data via AJAX?

Let's say I have three files: a page that is used for searching data called search, a file that handles requests called controller, and a file that has functions which the controller calls based on ...
3
votes
1answer
199 views

Populating form contents from GET - especially radio buttons

So, I have a form written in the usual way. After submit, if there are errors in the form, the form page itself is the target of the redirect, with a query string appended. The query string contains ...
3
votes
1answer
58 views

JavaScript object to JSON

Since I didn't find a way to properly transform JavaScript object to JSON with PHP, I wrote a snippet. Lets assume the following excerpt from Google Fonts JavaScript API: WebFontConfig = { ...
2
votes
2answers
433 views

Is this spaghetti code already?

I post the following code writen all by hand. Why I have the feeling that it is a western spaghetti on its own. Second, could that be written better? <div id="form-board" class="notice" ...
2
votes
1answer
46 views

Optimize Clock Update Code To Prevent Bottleneck Resulting In Time Lost

I use the following PHP Code to output the user's local time and the servers time (office time). $local_time and $remote_time are the corresponding UNIX timestamps: <span class='icon-time' ...
2
votes
2answers
281 views

Review My Custom Streaming Application - AJAX / TwitchTV

So I created this custom application and ported it into a few websites. It uses the TwitchTV API and pulls in active streams and the viewer count. The problem I run into is when the list gets so big ...
2
votes
3answers
158 views

Would a plugin for calling PHP functions within JavaScript prove useful?

So basically jqueryphp is a jQuery plugin that allows you to call any PHP function within client-side JavaScript: jqueryphp@github I wrote it as a response to projects such as PHP.JS and other ...
2
votes
3answers
225 views

How can I improve this?

-I removed the link- At the moment I am trying to create a japanese rehearsal system, and its working perfectly. However, I am not pleased with the code. Basically I had a .txt file called ...
2
votes
2answers
88 views

Filtered log reader

I've developed a log reader which can filter it's output following a few criteria: errorlevel, product, category, id. It is functioning, but when the log file is really big, it becomes very slow, to ...
2
votes
1answer
439 views

Polling script to determine the continuous time a user has been connected

I've been asked to keep track of how long a user has been connected to a site without interruption. So far the solution I've come up with is to use ajax to poll the site every now and then to check ...

1 2 3
15 30 50 per page