Splitting a Log into a 3D array
5
Well after searching the internet for something similar to this, I didn't come up with anything...so I made my own! This simple script will track your members' time spent on your website. Please feel free to give comments/suggestions/feedback.
5
function that builds select boxes for the month,day,and year. It will default to mmddyyyy, current date, or specified date depending on the parameters.
5
Open a text file and format it (word wrap).
5
This detects screen resolution using javascript and makes it available to php by way of cookies.
5
Random String
6
This is a quick set of overrides for Javascript so that any variable can be passed to PHP in a GET/POST activity. Just call myVar.toPHP();
I use this little set of functions extensively in a little Javascript/PHP RPC handler I wrote. I don't have the reverse function, as I pass JSON back to the browser for the return value.
Note: This lib is not safe for binaries or HTML Elements. The former will come out similar to FTP ASCII breaks, and the latter will cause infinite recursion. If you want to make a speical case for HTML Elements, do so; you could probably just test for parentNode and create a 'safe' object from that. I didn't need it, so I didn't code it.
As for binary safety, at some point between toPHP/escape/post/urldecode/unserialize, the object breaks. Rather than create a huge fix for something I didn't need to do, I put in a quick match/hack. Don't like it? Write the fix yourself.
I use this little set of functions extensively in a little Javascript/PHP RPC handler I wrote. I don't have the reverse function, as I pass JSON back to the browser for the return value.
Note: This lib is not safe for binaries or HTML Elements. The former will come out similar to FTP ASCII breaks, and the latter will cause infinite recursion. If you want to make a speical case for HTML Elements, do so; you could probably just test for parentNode and create a 'safe' object from that. I didn't need it, so I didn't code it.
As for binary safety, at some point between toPHP/escape/post/urldecode/unserialize, the object breaks. Rather than create a huge fix for something I didn't need to do, I put in a quick match/hack. Don't like it? Write the fix yourself.
6
A simple page hits counter that uses a single cookie to tell the user how many times they have visited the page.
6
Pull items from a mysql db table and display in the following format-
item1, item2, item3
In the example code, the query will return all items that have the color "red" specified in the db.
item1, item2, item3
In the example code, the query will return all items that have the color "red" specified in the db.
6
This is a state list I made for a website. I kept it just in case i ever needed it again, which i have. I figured it would probably help someone else out.
It includes all states in the U.S.
It includes all states in the U.S.
6
Simple file upload script.









