Posts tagged with ‘php’

Just getting my feet wet in Open Laszlo

here’s my shoutBox written in openLaszlo frontend and PHP backend.
Try closing the shoutBox, it is animated :)


Click here if you do not see the flash embeded

So the idea of writing this simple application is just to get my feet wet in Open Laszlo. As we are moving to web 2.0, writing RIAs will be the future for web programmers. Many frameworks now have ajax plugin. I wrote my first ajax chat script in 2005 without any libraries. I’m sure it’s much easier to write one with plugins. But it was still nice to write one from scratch. You then truly understand how it works. Competing with adobe’s flex, google’s GWT (ajax framework), possibly Microsoft’s new silverlight there is an open source project called open laszlo. If you look at their demo applications, it seems to be pretty powerful. I think it’s a very interesting alternative to ajax so I gave it a shot.
(more…)

Simple PHP URL rewrite

One thing I did for dmb is making dodosmb.com/profile/username work with my profile.php script. Normally without the help of .htaccess, you can use the value of the path info from the global variable
$_SERVER['PATH_INFO']

For example, create a php file named profile.php and in there put:
<?php echo $_SERVER['PATH_INFO']; ?>

Then upload the file and load it with yourServerPath/profile.php/dodo. The script will print out
/dodo

In my profile.php, I get the user by doing a simple sub string command like:
$user = substr($_SERVER['PATH_INFO'], 1); // this will get rid of the leading slash

This allows me to feed users to my profile.php by using the url dodosmb.com/profile.php/username

That’s still not pretty enough; it’s better if I can do dodosmb.com/profile/username. This is where .htaccess rewrite comes in. Here’s a great tutorial for .htaccess rewrite rules. To accomplish my goal, I used the following rewrite rules in my .htaccess:
RewriteEngine on RewriteRule ^profile/([A-Za-z0-9]+)/$ /profile.php/$1 RewriteRule ^profile/([A-Za-z0-9]+)$ /profile.php/$1

Thoughts Aside

Some hosting service providers offer their services to the potential customers by having accessibility to the powerful server hosting. E-commerce hosting tools are very beneficial for the promotion of internet marketing in the most manipulated manner. The web host is accountable of fulfilling all the necessary requirements of the webmaster in accordance with the policies of the transaction. The powerful and latest servers are very helpful in restoring all kinds of backup files authentically. There is a need of modem for dial up connection which is really very easiest and cheapest way of internet accessibility.