Read… and study it!
http://us2.php.net/manual/en/function.flock.php
Read… and study it!
http://us2.php.net/manual/en/function.flock.php
When you start creating advanced applications that require different types of data that may be defined by a developer using your system you come across a very interesting issue.
Dynamic Variables...
They are quite easy to master, just look at the below example.
Learn more by going here:
http://www.php.net/manual/en/language.variables.variable.php
http://www.phpdoc.org/
Easy, Fast, and Efficient.
Just make sure your code is developed within a standard and you comment very well.
How do you show errors for a single php script when the entire server has the enviorment variable "display_errors" set to 0?
Simple - place the below code at the top of your script.
ini_set - allows you to mess with your php.ini file.
error_reporting - sets what kind of errors you wish to show.
My current employer is in need of a very simple advertisement plugin to be created for their WordPress system - so of course I have decided to use this as an opportunity to create a custom plugin for experimental reasons.
Plugin Title: Make Me Money
Lets see if it does haha.
Hey all,
So how can you read a user who just logged in with htacess?
Make sure you have it right by checking phpinfo().
My problem - when a user logged into my website and then went to my "blog" area (which did not require any logging in) Wordpress would removed all the sessions I had set.
Why did it do this?
If we open wp-settings.php the first few lines of code completely remove all session information (as well as other).
To fix this issue I did the following:
This is quite a unique little function. It came in handy when I had to check a "global" array holding all key elements already loaded.
Very simple example above - for more information check php.net: http://www.php.net/manual/en/function.array-key-exists.php
Well, here I was again doing a fast freelance job for a friend - He wanted a full functioning forum up and ready to go as fast as possible. I of course thought of the very nice free system - phpbb(http://phpbb.com). To make things interesting we had already put in place a custom made membership system, the phpbb forum would now have to integrate into our Registration and Login process seamlessly.
My first instinct was to go to the boards on PHPBB and do a quick search to find my solution - It turns out the solution is not fully laid out... Or atleast to me it didn't seem to be layed out.
So after about 30-45 minutes looking over threads and replies I decided to just look at how PHPBB initiated its sessions and cookies and go for it myself.
Here are my easy steps to accomplish this login / registration task (I have no error checking/hack prevention in place for my example, I don't want to do everything for you now
)
STEP 1 - REGISTRATION
STEP 2 - LOGIN
While checking for the username/password within your own system (and succeeding) enter these few lines of code.
The above peace of code will use PHPBB's own session handler to create the cookies / sessions needed to log the user into the forum - as well as your own system.
Enjoy!
Well - LJ has returned from Vacation and has finally launched the new "Flash" version of BuzzPlay.com.
Check it out here: http://www.buzzplay.com
Now, why am I posting about this? Simple - I did all the programming for the site. This was my first major Flash (ActionScript) job. I used it as a test to see how effective I am in ActionScript. I was able to developed the whole system within a couple days, it wasn't all that hard.
What was the hardest aspect of the site?
What a great question Aaron
That hardest part was when he wanted the user to "stay" logged into their account while moving to completly seperate pages on the site (which where all in flash). I figured this out useing loadVars.
When the user logged into their account I sent their information to a php script and created a session, on every other page I used AS to pull that session information and allowed me to pull their account on every page. Pretty nifty I think.
Heres the code I used - very basic and simple(HINT: Put in error checks and variable validation)
Here is the PHP Code:
You can place the AS script in the first frame of all your files... works very well
Support Our Sponsors!