Upload jQuery, Flash & PHP

I've found one website shows Upload jQuery, flash & PHP.

http://www.uploadify.com/demo/

Image Captcha PHP

In these days, one of my clients complaint me that he received a lot of spams from reservation form which I created without preventing spams. That's why I need to put image captcha on it with PHP. For this, I don't want to use complicated coding, and want to use simple way. That's why I got suitable solutions from this website.

http://www.phpjabbers.com/captcha-image-verification-php19.html

view plain print about
1<?php
2session_start();
3$text = rand(10000,99999);
4$_SESSION["vercode"] = $text;
5$height = 25;
6$width = 65;
7
8$image_p = imagecreate($width, $height);
9$black = imagecolorallocate($image_p, 0, 0, 0);
10$white = imagecolorallocate($image_p, 255, 255, 255);
11$font_size = 14;
12
13imagestring($image_p, $font_size, 5, 5, $text, $white);
14imagejpeg($image_p, 80);
15?>

Save this code in a file called captcha.php. Next we need to create our web form like register.html or reservation.html.

[More]

Limit tag in MsSQL 2005

Hope everybody knows about limit tag MsSql 2005. I feel that's cool and can reduce the load of SQL query just like mySQL. It's kinda simple to use this tag.

view plain print about
1SELECT * FROM myTable limit 1,10

If we write so, the sql will return starting from the first record, and plus 10 record in the recordset of myTable.

view plain print about
1SELECT * FROM myTable limit 20,40

If we write so, the sql will return starting from the 20th and plus 10 record of myTable. How.? It's easy, isn't it?

IIS status Code

If you're being web-developer using Microsoft platform, you must know the status code of IIS. Here you go.

HTTP

1xx - Informational

These status codes indicate a provisional response. The client should be prepared to receive one or more 1xx responses before receiving a regular response.

  • 100 - Continue.
  • 101 - Switching protocols.

2xx - Success

This class of status codes indicates that the server successfully accepted the client request.

  • 200 - OK. The client request has succeeded.
  • 201 - Created.
  • 202 - Accepted.
  • 203 - Non-authoritative information.
  • 204 - No content.
  • 205 - Reset content.
  • 206 - Partial content.
  • 207 - Multi-Status (WebDav).

3xx - Redirection

The client browser must take more action to fulfill the request. For example, the browser may have to request a different page on the server or repeat the request by using a proxy server.

  • 301 - Moved Permanently
  • 302 - Object moved.
  • 304 - Not modified.
  • 307 - Temporary redirect.

4xx - Client Error

An error occurs, and the client appears to be at fault. For example, the client may request a page that does not exist, or the client may not provide valid authentication information.

  • 400 - Bad request.
  • 401 - Access denied. IIS defines several different 401 errors that indicate a more specific cause of the error. These specific error codes are displayed in the browser but are not displayed in the IIS log:
    • 401.1 - Logon failed.
    • 401.2 - Logon failed due to server configuration.
    • 401.3 - Unauthorized due to ACL on resource.
    • 401.4 - Authorization failed by filter.
    • 401.5 - Authorization failed by ISAPI/CGI application.
    • 401.7 – Access denied by URL authorization policy on the Web server. This error code is specific to IIS 6.0.
  • 403 - Forbidden. IIS defines several different 403 errors that indicate a more specific cause of the error:
    • 403.1 - Execute access forbidden.
    • 403.2 - Read access forbidden.
    • 403.3 - Write access forbidden.
    • 403.4 - SSL required.
    • 403.5 - SSL 128 required.
    • 403.6 - IP address rejected.
    • 403.7 - Client certificate required.
    • 403.8 - Site access denied.
    • 403.9 - Too many users.
    • 403.10 - Invalid configuration.
    • 403.11 - Password change.
    • 403.12 - Mapper denied access.
    • 403.13 - Client certificate revoked.
    • 403.14 - Directory listing denied.
    • 403.15 - Client Access Licenses exceeded.
    • 403.16 - Client certificate is untrusted or invalid.
    • 403.17 - Client certificate has expired or is not yet valid.
    • 403.18 - Cannot execute requested URL in the current application pool. This error code is specific to IIS 6.0.
    • 403.19 - Cannot execute CGIs for the client in this application pool. This error code is specific to IIS 6.0.
    • 403.20 - Passport logon failed. This error code is specific to IIS 6.0.
  • 404 - Not found.
    • 404.0 - (None) – File or directory not found.
    • 404.1 - Web site not accessible on the requested port.
    • 404.2 - Web service extension lockdown policy prevents this request.
    • 404.3 - MIME map policy prevents this request.
  • 405 - HTTP verb used to access this page is not allowed (method not allowed.)
  • 406 - Client browser does not accept the MIME type of the requested page.
  • 407 - Proxy authentication required.
  • 412 - Precondition failed.
  • 413 – Request entity too large.
  • 414 - Request-URI too long.
  • 415 – Unsupported media type.
  • 416 – Requested range not satisfiable.
  • 417 – Execution failed.
  • 423 – Locked error.

5xx - Server Error

The server cannot complete the request because it encounters an error.

  • 500 - Internal server error.
    • 500.12 - Application is busy restarting on the Web server.
    • 500.13 - Web server is too busy.
    • 500.15 - Direct requests for Global.asa are not allowed.
    • 500.16 – UNC authorization credentials incorrect. This error code is specific to IIS 6.0.
    • 500.18 – URL authorization store cannot be opened. This error code is specific to IIS 6.0.
    • 500.19 - Data for this file is configured improperly in the metabase.
    • 500.100 - Internal ASP error.
  • 501 - Header values specify a configuration that is not implemented.
  • 502 - Web server received an invalid response while acting as a gateway or proxy.
    • 502.1 - CGI application timeout.
    • 502.2 - Error in CGI application.
  • 503 - Service unavailable. This error code is specific to IIS 6.0.
  • 504 - Gateway timeout.
  • 505 - HTTP version not supported.

http://support.microsoft.com/kb/318380/

press enter key to form submit

I'm now writing Dictionary program, based on Web2.0 with Asp.net. In asp.net, we gotta use these asp.net control which support us more performance to SQL and performance. But, to control these are really complicated and it gives serveral times to manage to control.

In our project, there is only one input textbox in welcome page. At first, whenever user type one word in this and press Enter Key, I want to run click even of "search" button. But, whenever I type word and press enter, it cannot run click event of search button. So, I was out of shape of this one day. Today, I keep on searching and then I got it now. Here is solution for this problem.

Coding for welcome.aspx

view plain print about
1<form defaultbutton="button1" runat="server">
2<asp:textbox id="textbox1" runat="server"/>
3<asp:button id="button1" text="Button1" runat="server"/>
4</form>

Coding for welcome.aspx.cs

view plain print about
1TextBox1.Attributes.Add("onkeydown", "if(event.which || event.keyCode){
2    if ((event.which == 13) || (event.keyCode == 13)) {
3        document.getElementById('"+Button1.UniqueID+"').click();
4        return false;
5        }}
6    else {
7        return true
8        };
9    ");

Best Credit to : http://www.beansoftware.com/asp.net-tutorials/accept-enter-key.aspx

How to create gtalk bot?

I'm cool today that I can create my own gtalk bot with Coldfusion and PHP. It's kinda easy that you don't effort to do much of coding and.

Go this site: http://www.imified.com/

And create one account and following the steps they mention.

Want to make fake website for fun?

In these days, I got free spare time to surf websites. That's why I was surfing here and there. Oddly, I've found one website support us to make fake website for fun.

  • Open the website what you want to fake (ex: http://www.google.com)
  • copy this message, javascript:document.body.contentEditable='true'; document.designMode='on'; void 0 into address bar (URL) and press Enter.
  • So, you can see this website as in rich-text editor.

ASP.NET ajaxtoolkit control

I thought, asp.net is complicated to implement for web feature with ajax technology. When I visited one website showing about ASP.NET ajax control, what I thought is quite funny. Because we can implement all what we want in Web development with ASP.NET AjaxToolKit.

You can learn how to use this toolkit in this website.

http://www.asp.net/AJAX/AjaxControlToolkit/Samples/

jQuery

I'm now learning jQuery, which is powerful toolkit for Developer. It's easy to use, and don't need to write long javascript statement in our coding. You can also learn about jQuery there.

jQuery

jQuery

I start learning jQuery which is kinda popular among Web Developer, cos of which is easy to implement, less of coding and more secure than ordinary javascript. But, the style of programming, it's always updated by programmers and you gotta catch which has been changed in it.

If you wanna learn more, http://docs.jquery.com.

Top of Page