Archive

Archive for September, 2008

Prevent spontaneously attempted login attack

September 30, 2008 ppshein Leave a comment

Sometimes, most of our websites have been attacked by spontaneously attempted login attack by bots. That’s why we gotta prevent anyone cannot do like that in our web application. Fortunately, it’s very simple to do in ColdFusion. Here is coding…

<cfif session.FailedLogin GT 3>

<cfabort message=”Sorry.! Please contact website administrator to get your password.”>

</cfif>
<cfif loginsuccessfully ….>

Write your code here

<cfelse>

<cfparam name=”session.FailedLogin” default=”0″>
<cfset session.FailedLogin = session.FailedLogin+1>
<cfabort message=”Invalid Username and password”>

</cfif>

Categories: coldfusion Tags: , ,

Make simple DOS attach with ASP.NET

September 30, 2008 ppshein Leave a comment

I’ve describe how to make simple DOS attack with Asp.Net. My purpose of writing this thread isn’t to annoy web administrator. My point is how to prevent Dos attack and how to abort Dos attack for our website.

for( int i = 0; i < 100000; i ++ )
{
WebClient client = new WebClient();
client.DownloadString(“http://www.mysite.com”);
}

Categories: ASP.NET #C Tags: , ,

Vertical Marquee Banner

September 27, 2008 ppshein Leave a comment

I was supposed to create randomize rotated ads banner with javascript. But it’s not quite alright and not have enough performance to all browsers. That’s why I considered to do this small function with old-fashioned coding which is <marquee> tag. Because we shouldn’t stick in attemption for serveral times when we’re solving and finding bugs. That’s why I decided to do with marquee tag and save my time. It’s quite easy and flexiable to all browser but it’s awful that before page is completely loaded by browser if banners images are more than 10 images.

<marquee direction=”up” onmouseover=”this.stop()” onmouseout=”this.start()” scrollDelay=”200″ width=”200″>
<a href=”http://www.planet.com.mm/advfile.cfm/adv/flexanew” target=”_blank”><img src=”misspeople_sponsors/platinum_1.jpg” id=”adBanner1″ border=”0″ alt=”ad banner” /></a>
<a href=”http://www.planet.com.mm/advfile.cfm/adv/alpine” target=”_blank”><img src=”misspeople_sponsors/platinum_2.jpg” id=”adBanner2″ border=”0″ alt=”ad banner” /></a>
<a href=”http://www.planet.com.mm/advfile.cfm/adv/silk-n-shine” target=”_blank”><img src=”misspeople_sponsors/platinum_3.jpg” id=”adBanner3″ border=”0″ alt=”ad banner” /></a>
<a href=”http://www.planet.com.mm/advfile.cfm/adv/perfectil” target=”_blank”><img src=”misspeople_sponsors/platinum_4.jpg” id=”adBanner4″ border=”0″ alt=”ad banner” /></a>
<a href=”http://www.planet.com.mm/advfile.cfm/adv/smooth-e” target=”_blank”><img src=”misspeople_sponsors/platinum_5.jpg” id=”adBanner1″ border=”0″ alt=”ad banner” /></a>
<a href=”http://www.planet.com.mm/advfile.cfm/adv/lily” target=”_blank”><img src=”misspeople_sponsors/platinum_6.jpg” id=”adBanner2″ border=”0″ alt=”ad banner” /></a>
<a href=”http://www.planet.com.mm/advfile.cfm/adv/ogawa” target=”_blank”><img src=”misspeople_sponsors/platinum_7.jpg” id=”adBanner3″ border=”0″ alt=”ad banner” /></a>
<a href=”http://www.planet.com.mm/advfile.cfm/adv/dodokoko” target=”_blank”><img src=”misspeople_sponsors/platinum_8.jpg” id=”adBanner4″ border=”0″ alt=”ad banner” /></a>
<a href=”http://www.planet.com.mm/advfile.cfm/adv/vista” target=”_blank”><img src=”misspeople_sponsors/platinum_9.jpg” id=”adBanner1″ border=”0″ alt=”ad banner” /></a>
<a href=”http://www.planet.com.mm/advfile.cfm/adv/tri” target=”_blank”><img src=”misspeople_sponsors/platinum_10.jpg” id=”adBanner2″ border=”0″ alt=”ad banner” /></a>
</marquee>

Categories: Javascript, html Tags: , ,

The facts of Google Chrome I don’t like

September 24, 2008 ppshein Leave a comment

I use and find any bugs Since Google launched their Browser called Chrome. Meanwhile, I’ve found some facts I don’t like, especially it’s not convenient for me only.

  • the properties box cannot appear promptly whenever I wanna download images by the way of clicking on it.
  • I cannot check the properties of images whenever I click on it. (in firefox, whenever I do right-click on each images, properties box appear and show attributes of it.)

I’ve found these two facts yet.

Categories: Informations Tags: , ,

MissPeople2008 is launched

September 20, 2008 ppshein Leave a comment

We have launched misspeople2008. In this page, I’ve created it with database less, except Forum. For this page, I’ve tried my best and added new features even thought these are not included in Planet.com.mm. These are Image Captcha, to generate randomize words and so on.

 

Miss People 2008

Miss People 2008

 

Go and visit MissPeople2008 official site http://www.people.com.mm/misspeople2008/

Categories: Informations Tags:

ppshein is on Connect Tech Fashion Journal

September 18, 2008 ppshein Leave a comment

Last week, one of the editor of Connect journal request me to interview me about how to create web development and feeling of being web developer for awhile. In this interview, I’ve answered about the current IT situation in Myanmar, Web development and web developers. 

  • Which kinda of websites are popular in Myanmar.
  • Which kinda of web based languages are popular in Myanmar.
  • And how to prevent our websites not to be attacked by SQL injection and so on.

Random Image Rotator

September 18, 2008 ppshein Leave a comment

I was kinda busy in these days about creating misspeople page of myanmar people magazine. In this page, we need to show our client adversitements as rotator. Do you know how to rotate ADS?

<SCRIPT LANGUAGE=”JavaScript”>
var interval = 2.5; // delay between rotating images (in seconds)
var random_display = 1; // 0 = no, 1 = yes
interval *= 1000;

 var image_index = 0;
image_list = new Array();
image_list[image_index++] = new imageItem(“01.jpg”);
image_list[image_index++] = new imageItem(“02.jpg”);
var number_of_image = image_list.length;
function imageItem(image_location) {
this.image_item = new Image();
this.image_item.src = image_location;
}

function get_ImageItemLocation(imageObj) {
return(imageObj.image_item.src)
}

function generate(x, y) {
var range = y – x + 1;
return Math.floor(Math.random() * range) + x;
}

function getNextImage() {
if (random_display) {
image_index = generate(0, number_of_image-1);
}
else {
image_index = (image_index+1) % number_of_image;
}

var new_image = get_ImageItemLocation(image_list[image_index]);
return(new_image);
}

function rotateImage(place) {
var new_image = getNextImage();
document[place].src = new_image;
var recur_call = “rotateImage(‘”+place+”‘)”;
setTimeout(recur_call, interval);
}
//  End –>

</script>
</HEAD>

<center>
<img name=”rImage” src=”01.jpg” width=120 height=90>
</center>

<script>
<!– 
rotateImage(‘rImage’)?
 –>
</script>

Categories: Javascript Tags: , ,

Google Page Creator is no longer accepting new sign-ups

September 16, 2008 ppshein Leave a comment

We are no longer accepting new sign-ups for Page Creator because we have shifted our focus to developing Google Sites, which offers many of the capabilities of Page Creator along with new features like site-level navigation, site-level headers, control over who can see and edit your site, and rich embeddings like calendars, videos, and Google docs.

If you are currently a Page Creator user, you can continue to use Page Creator and your pages will automatically be transitioned to Google Sites later this year. We are committed to making this transition as smooth and easy as possible, and we will post more details as we get closer to the transition time. You can also manually move your web pages from Page Creator to Google Sites or other service providers at any time.

Categories: Informations Tags: , ,

How to create Captcha in ASP.NET

September 12, 2008 ppshein Leave a comment

Image Captcha

 

In these days, our programmers need to create a simple customer feedback form for our client. As we all know, it’s quite simple to do. But, to have good security for our site, we should prevent any spam in advance. That’s why how to put Image Captcha in our site. I found following site.

Big Credit to : http://johnadonline.com/?tag=how-to-create-captcha-in-aspnet-c

Categories: ASP.NET #C Tags: , , , , ,

Printable version with CSS Stylesheet

September 11, 2008 ppshein Leave a comment

Our new project is to output data with table grid view. In this project, users can view how their data will be output in printable version by clicking Print View button of our browser without reloading current page. I was in dilemma because of this problem and solving how to fulfill our customers’ demand. Fortunately, I can solve this problem in short time. Here is coding:

 
<link rel=”stylesheet” type=”text/css” media=”screen” href=”styles/screen.css” /> (for screen)

<link rel=”stylesheet” type=”text/css” media=”print” href=”styles/print.css” /> (for print)

 

If you want to do like that, you must have 2 seperate stylesheet like screen.css and print.css. Ok, write into them what you want to create your stylesheet design.