Skip to main content

Posts

Showing posts from September, 2008

Simple File Uploading Script in PHP

PHP is undoubtedly the best programming language when it comes to web programming. It gives us so many features and capabilities, a few of which we’ve discussed already. So continuing with that, today we’ll see how we can use a few lines of code to create a script that’d allow file uploading right from the web browser. File upload feature is definitely useful kinds of website but at the same time very much vulnerable to malicious attacks as well. So use it with a LOT of precautions! For this example, we’ll need a front-end web page that’ll accept the file from the user and a backend script to process and store the file. Let’s look at the codes of each: upload.html: <html> <body> <form action= "upload_file.php" method= "post" enctype= "multipart/form-data" > <label for = "file" >Filename:</label> <input type= "file" name= "file" id= "file"

Finally a Blogging Platform for the Mobile Web (WAP)

Most of the time I browse internet for reading blogs, checking emails etc. I do it on my cell phone. One day I thought why not create a mobile website or better yet blog, and started searching around. What did I find? Well, nothing much useful. In this big world and yet bigger web, to my disappointment, I couldn’t find any website offering free blogs like we do on the normal (desktop) web. Moreover, those that offered mobile websites, I just didn’t like their service. You just have to spend so much time to just have a single page up! What I had in my mind was a service that’d offer free blogs, let me register it from the mobile phone, let me post from the mobile phone, in other words a service that’d let me operate the whole thing right from the mobile phone itself. Days passed and then, rather than me wanting these services I thought of offering them to others instead, of course for FREE. Therefore I took a nearly a month off and created what I wanted

Designing a Simple HTML Code & Preview Tool (Online)

With online CMSs everywhere and craze of blogging like never before, we see some sort of online HTML editors everywhere. Ever blogged or posted in some forum? Most of them have it! These editors let you write, format, preview and tinker with the HTML code before publishing anything. Most of them have a nice UI to format everything much like the desktop applications like NVu, Dreamweaver etc. these online editors also let you manually change or write HTML code that can be previewed without leaving the page. Well what we are going to design today is a scaled down version (say simple) of these kinds of editors. It’d let you write (or paste) HTML code and preview how it’d look. What it wouldn’t let you do is to format or change anything while in the preview mode. We will be using HTML, JavaScript and a little inline CSS. Basic Theory If you look at the HTML editors used by Blogger and Wordpress, they have two modes, Code and Compose. In code mode HTML c