The latest update of the Access_user Class was focussed on a better security especially while usage on shared web hosts. Philp Olson noticed me about the problem of session storage on most of the shared hosting platforms.
I added to the class an external object which is based on a Zend tutorial, this way it was possible to solve this problem very quick. Further the password strings are encoded after the user has entered his password and submitted the string to the database. Also the password stored in the cookie is md5-encoded now.
I created for the existing user a list of all code updates in as special thread of the Access_user support forum.
While testing some code to find a different way to upload files with PHP, I checked a lot of websites to get the information I need to understand cURL better. Today I found this article: Using the CURL library in PHP
With only a few examples it was clear for what usage I need cURL and where it’s better to use PHP functions. The following sentence has some important information:
“Next up is the CURLOPT_POST option. This is a very useful function, as it allows you to do POST requests, instead of GET requests, which actually means you can submit forms to other pages without having to actually fill in the form.”
That will say a web form is not posted to cCURL but to the remote server but can be posted by cURL to the next server or different location.
For the upload of files via forms is cURL not the best option, but you can upload the form to the remote server and post the uploaded data with cURL to the next location. This is useful if this location is password protected or only accepts connection from one IP address…
For the most of the PHP developer which are using preg_match or preg_replace frequently is the function preg_match_all a smaller advantage, but for all others it’s maybe hard to understand. The biggest difference between preg_match_all and the regular preg_match is that all matched values are stored inside a multi-dimensional array to store an unlimited number of matches. With the following example I will try to make clear how its possible to store the image paths inside a web page: (more…)
Outdated links on 3rd party websites or search engines are bad for the webmaster and visitor. Most of the time these error’s are handled by some default error page or by some custom code provided via the hosting control panel. Today we discussed at Webdigity the use of a custom error page script with some additional features:
This way it’s possible to know about dead links and the visitor is getting some good looking and clear error page while he is following an outdated link.
The whole script can be downloaded from the tutorial section at Webdigity