욕 필터링(이모티콘 필터링)

PHPSCHOOL 두기두바

기존에 있는 필터링들은..
욕을쓰면.. 무조건 글을 못남기고..
다시 쓰게 하도록 되어있는데요..
전 그런방법을 쓰지 안고..
그냥 욕을 바꿔버리는 방법을 썻습니다. ^^;;

-주의 허접하니까.. 욕은 하지마세요 ^^;;-

bad.cgi(욕들->바뀔단어)——————–
죽을래->사랑해
씨발->이런
개새끼->강아지
새끼->아기
빙신->천재
바보->천재
병신아->친구야
놈->님
년->님
——————————————–
bad.cgi는 “욕->바뀔단어”로 한줄씩
구성되며 제일 중요한것은 욕과 바뀔단어를 구분하는”->”입니다. ^^;
bad.php————————————-
$memo = “죽을래? 빙신아 개새끼 같은놈아”;
//욕입니다. ^^;
$file = file(“bad.cgi”);
for($i=0;$i<=count($file);$i++){
$bad = explode(“->”,$file[$i]);
if(@eregi($bad[0],$memo)){
//내용중에.. 등록되어 있는 욕이 있는가 검사합니다.
//있다면.. 등록되어 있는 욕이 바뀔단어로 바꿈니다.
$badc=chop($bad[1]);
$memo = ereg_replace($bad[0],$badc,$memo);
}
}
echo$memo;
//출력결과는 “사랑해? 천재아 강아지 같은님아”입니다 ^^;
?>

———————————————
이럿습니다.
허접하죠? ^^;;
아참.. 이걸이용하면..
여러가지를 할수도 있습니다.
예를 들면.. msn아이콘같은것을 따라 할수도 있죠..
bad.cgi에..
^^->
위식으로 저장해노으면..
^^ <-이 이모티콘은 아이콘으로 바껴서 나오겠죠.. ^^

다중셀렉트

phpschool 박상국

기존에 올라온 다중 세렉트들이 많기는 하지만 실제 웹페이지에 적용하려면
소스를 수정해야 하는 경우가 많았습니다.
다중 폼이 적용된 페이지 이거나 폼이름이 다른경우, 각 Element의 이름을
달리 하려도 소스수정은 불가피 한거 같더군요..
그래서 이러한 환경에 독립적으로 동작할 수 있게끔 만들어 봤습니다.

특징 :
1. 다중폼, 폼네임을 변경하여도 소스의 수정이 필요없다.
2. Element의 이름 정정이 용이하다.
3. 수정없이 어느 페이지나 바로 사용이 가능하다.

소스 :

사업자번호 체크 (자바스크립트)

/*******************************************************************************
* 사업자번호 검사
******************************************************************************/
function RegiNum2($reginum) {
$weight = ‘137137135’; // 자리수 weight 지정
$len = strlen($reginum);
$sum = 0;

if ($len <> 10) { return false; }

for ($i = 0; $i < 9; $i++) {
$sum = $sum + (substr($reginum,$i,1)*substr($weight,$i,1));
}
$sum = $sum + ((substr($reginum,8,1)*5)/10);
$rst = $sum%10;

if ($rst == 0) {$result = 0;}
else {$result = 10 – $rst;}

$saub = substr($reginum,9,1);

if ($result <> $saub) {return false;}
return true;
}

테이블 태그 없이 css로 작업하기

출처 : PHPSCHOOL
작성자 : 우수한
http://webmasterbase.com/article.php?pid=0&aid=379

postnuke 같은 사이트 빌더를 만들면서,
아무래도 가장 고민이 되는 부분은 화면 레이아웃 문제였습니다.
postnuke 나 My Yahoo 에서 쓰는 방식으로도 만들어보고
이것을 개조해 화면 전체를 블럭으로 만들면서 각각의 옵션을 저장하는 방식으로도 만들어봤습니다만…
사용자의 다양한 요구에 모두 부응하기란… 골치아픈 문제더군요.
(쉽게 말해 postnuke 같은거 쓰면서 헤더,왼쪽,가운데,오른쪽,풋터 이런 식으로 구분하지 않고 제 각기 원하는대로 테이블을 구성하게 한다는 얘깁니다.)

그런데, 아예 TABLE 태그를 사용하지 않으면서,
화면 출력시에 CSS 를 사용해서 table 흉내를 내는 방법이 있습니다.

다음 예제를 보시죠.
테이블 모양으로 꾸며진 페이지: http://sitepoint.com/cssdesign/index.php
페이지 소스 (테이블 태그 없음): http://sitepoint.com/cssdesign/source.html
여기에 사용된 스타일시트 : http://sitepoint.com/cssdesign/styles.html
스타일시트가 없다면 이렇게 출력되겠죠 : http://sitepoint.com/cssdesign/nostyle.php

잘 보시면,

왼쪽칼럼 가운데칼럼 오른쪽칼럼

이렇게 되어있던 것이

왼쪽칼럼

가운데칼럼

오른쪽칼럼

으로 바뀌어있습니다.
그리고 “왼쪽”, “오른쪽” 등의 CSS에 float 와 Absolute Positioning 등을 적용합니다.
웹페이지 마다 길이가 다르기 때문에
footer 의 위치를 잡는게 어려운데, 이건 각 칼럼에

 

를 넣어서 해결합니다.
상세한 그림이 http://webmasterbase.com/article/379/90 에 나와있습니다.

테이블 태그 없이 css로 작업하기 – html소스



SP No Tables

SitePoint is proud to support The WaSP Browser Upgrade initiative.

Our site has been redesigned to take full advantage of Current Web Standards. The browser you are currently using does not meet the WC3 standards of HTML 4.01, CSS-1 or ECMA Script.

Click here to upgrade to a current browser that supports web standards such as the new versions of Netscape, Internet Explorer, and Opera.

If you do not wish to upgrade, please enjoy the SitePoint content without the formatting.

Thanks, The SitePoint Team.

Send Feedback
Print Article
Email Article

Author

Publishing an Ezine

by Merle

Probably the most valuable form of online marketing there is. Ezines can put you in the perfect postion in a one to one marketing environment. The ability to get to know your customers and create online loyalty is a position every business should be striving for.

  1. Establishes Trust: When people visit your website, they have no idea who you are. As far as they’re concerned you might be some evil person lying in wait, just trying to get your hands on their credit card number so you can run up the national debt. The media is partially to blame for this unfounded fear, but you need to be aware it exists and get those visitors to trust you in order to turn them into paying customers. Publishing an ezine helps to establish you as a reputable business dealer and over time, inspires trust.

  2. Brings Visitors Back: Statistics show a customer needs to see your advertising message six or seven times before making a purchase. But how do you get a casual browser to come back? When someone signs up for your ezine, the mailing itself will serve as a reminder to revisit again and again, eventually turning your subscribers into paying customers.

  3. Establishes You as an Expert and Builds Brand Loyalty: Just because you’re in business on the web, does that really mean you know what you’re talking about? By publishing a newsletter and writing your own articles, subscribers will come to see you as an expert in your field. This and the familiarity they feel from reading your newsletter will reinforce brand loyalty to your site, turning many of your current subscribers into future customers.

  4. Keeps Current & Potential Customers Up to Date on New Products & Services: We all add on to our current list of products and services on a regular basis. Pricing may change, we may add new sections of interest to our websites, etc. Your publications allow you to share this important information with current and potential customers keeping them up to date and possibly bringing them back for a new sale. Nothing is worse than having a client tell you he went to one of your competitors because he didn’t know you offered that same service or product.

  5. Builds Relationships: Let’s face it — Building a relationship takes time. Ezine publishing is one avenue towards doing so. I can’t tell you how often I get an email from someone who feels she knows me after subscribing to my ezine for the past year or so. Relationship marketing is important on the Web and publishing your own newsletter will help you do just that. The truth is, we’d rather spend our money with someone we like than someone we don’t know.

  6. Allows You to Build an Opt-In Email Marketing List: Repeat after me: Spam is bad, opt-in is good. You can’t buy a list of names and start blasting out your marketing message to people you don’t know without getting yourself into a lot of trouble. But if those people have opted in to your ezine they have given you “permission” to send them email. They’re an attentive audience who has already said they want to hear from you on a regular basis. You never want to abuse this right, but if you send out helpful information you’ll be able to plug your company in between the lines without making anyone angry.

  7. Keeps Your Website Fresh in Visitors’ Minds: Have you ever gone to a website and really liked it, only to forget about it later? Sure, you may have bookmarked the site, but maybe you haven’t gone through your bookmarks in a long time. I love when I get an ezine from one of my favorite sites, which serves as a trigger to “pop in” for a re-visit. This technique of “reminding” someone about your site is important; it really helps to keep a constant flow of traffic returning to your website.

Ezine publishing is one of the most effective marketing tools online today. Not only is it powerful it’s probably one of the most cost-effective tools you can use in promoting your website. If you haven’t tried it, it’s never too late to start. Publishing your own newsletter can be one of the most rewarding tasks you perform….not just financially, but also personally. You’ll get a warm and fuzzy feeling from all of the people you’ll be helping…..and that, my friend, is a reward in itself.

Send Feedback
Print Article
Email Article


Written by Merle. www.ezineadauction.com “Where the Best Deals in Ezine Advertising are Made” Subscribe to Ezine Ad Auction Authority and be kept up to date on new auctions as they’re added and much more.

Rate this article:
Poor










Excellent

What others say: No votes yet. Be the first!

Related Articles

Related Forum

As seen in: The Standard, eCompany Now, ZDTV, Lockergnome, PC Pro (UK), IT Graphics (Australia).

Subscribe To our Newsletters


The Tribune

The Tech Times


More Info

The SitePoint Network