Undercrank

Scripting

January 22, 2004

Storing the PHP session ID in a form

If you've chosen not to use cookies for PHP sessions, you can append the SID of the session to a URL link in order to keep track of it.

If you want to keep track of SID on page that's accessed by a form submission, the little code snippet below will strip out the PHPSESSID= from the variable for use as a hidden form value:

$sid = substr(SID, (strpos(SID, "=") + 1), strlen(SID));

And then to use it in your form, add the code below somewhere:

<input type="hidden" name="PHPSESSID" value="<?= $sid ?>" />

More of the same RSS

Yahoo! Web Services news over Atom

aka: "When you realise Yahoo! already serve their news over RSS..."

Yahoo! Web Services news over RSS

I've put together a small project that will create an dynamic RSS 2.0 feed based on the Yahoo! News Search hooks.

Despamming Shortstat (Part 2)

Further to my earlier post about Despamming Shortstat, I've made a small update to the code that has a few improvements on the original.

Importing CSV files to SQLite

"SQLite is different from most other SQL database engines in that its primary design goal is to be simple". Which isn't strictly true...

Trackbacks

Trackback URL for this entry is:

Post a comment

Remember personal info?