ȸ¿ø°¡ÀԡžÆÀ̵ð/ºñ¹øã±â
ȨÀ¸·Î


URL ó¸® °ü·Ã Á¤±Ô½Ä
10³â Àü
// url¿¡ http:// ¸¦ ºÙÀδÙ

    if (!preg_match("/^(http|https|ftp|telnet|news|mms)\:\/\//i", $url))

        $url = "http://" . $url;










<?php

$urls = Array();
$urls[] = 'http://apmusers.com/';
$urls[] = 'https://apmusers.com/';
$urls[] = 'HTTP://APMUSERS.COM/';
$urls[] = 'ahttp://apmusers.com/';//http:// ¾Õ¿¡ ´Ù¸¥ ¹®ÀÚ°¡ ÀÖ´Ù.
$urls[] = 'b http://apmusers.com/';//htpp:// ¾Õ¿¡ ´Ù¸¥ ¹®ÀÚ¿Í °ø¹éÀÌ ÀÖ´Ù.
$urls[] = 'http:/apmusers.com/'; //http:/ ´ÙÀ½¿¡ / Çϳª ¾ø´Ù

foreach($urls as $url){

    echo $url . ' ==> ';

    //url ÀÇ Á¦ÀÏ ¾Õ¿¡ ´ë¼Ò¹®ÀÚ ±¸ºÐ¾øÀÌ http:// ³ª https:// °¡ Á¸ÀçÇÏ´ÂÁö È®ÀÎ
    if (preg_match("`^https?://`i", $url)) {

        echo "<font color='blue'>Á¦ÀÏ ¾Õ¿¡ http(s):// °¡ ÀÖ´Â »ç¿ë °¡´ÉÇÑ URL ÀÔ´Ï´Ù.</font> <br />" . PHP_EOL;
    }
    else {

        echo "<font color='red'>Á¦ÀÏ ¾Õ¿¡ http(s):// °¡ ¾ø´Â »ç¿ë ºÒ°¡´ÉÇÑ URL ÀÔ´Ï´Ù.</font> <br />" . PHP_EOL;
    }
}

?>








<?

$domain="www.naum.kr";

preg_match('/[^\.]+\.([^\.]{4}|[^\.]{3}|(co|or|pe|ac)\.[^\.]{2}|[^\.]{2})$/i', $domain, $matches);

print_r($matches);

?>

ÃßõÃßõ : 336 Ãßõ ¸ñ·Ï
¹øÈ£ Á¦¸ñ
223
Á¤±Ô½Ä ÆÁ
222
±×´©º¸µå¿¡¼­ »ç¿ëµÈ XSS (Cross Site Script) ¸·±â
221
À¯Åõºê µ¿¿µÀå ÁÖ¼Ò ÃßÃâ PHP Á¤±Ô½Ä ¿¹ 2 (parse_str ¹æ½Ä)
220
À¯Åõºê µ¿¿µÀå ÁÖ¼Ò ÃßÃâ Á¤±Ô½Ä ¿¹ 1
219
YouTube shortcode fix for a blog imported from WordPress.com
218
PHP < ![CDATA[ 2 ]]> Á¦°Å Á¤±Ô½Ä
217
span, font ű׸¦ Á¦°ÅÇÏ´Â Á¤±Ô½Ä
216
º»¹®¿¡¼­ À̹ÌÁö ÃßÃâ, À̹ÌÁö Á¦°Å Á¤±Ô½Ä
215
¿©·¯°³ÀÇ ºóÄ­ , ÁÙÀ» °ø¹éÀ¸·Î º¯°æÇϱâ
URL ó¸® °ü·Ã Á¤±Ô½Ä
213
PHP Á¤±Ô½Ä À¯È¿¼º°Ë»ç ¿¹Á¦ (IDüũ, À̸ÞÀÏüũµî)
212
PHP¿¡¼­ Ư¼ö¹®ÀÚ ¾ø¾Ö´Â Á¤±ÔÇ¥Çö½Ä
211
php ¹®ÀÚ¿­ ÀÚ¸£±â, ºñ±³, ã±â ÇÔ¼ö, str_replace, substr ,strpos, explode µîµî Á¤¸®
210
¼¼¼Ç ¹× ÄíÅ°ÀÇ Á¤º¸¸¦ ¾ÏȣȭÇϱâ
209
GetImageSize À̹ÌÁöÆÄÀÏÀÇ »çÀÌÁ ¾Ë¾Æ³»´Â ÇÔ¼ö
208
¹®ÀÚ¿­ÀÇ °ø¹éÀ» À߶󳻴 chop, trim, ltrim ÇÔ¼ö
207
µÎ°³ÀÇ º¯¼ö¸¦ ºñ±³ÇÏ´Â strcmp ÇÔ¼ö
206
ű׸¦ ¾ø¾Ö°í Ãâ·ÂÇÏ´Â strip_tags ÇÔ¼ö
205
ű׸¦ ±×´ë·Î Ãâ·ÂÇÏ´Â htmlspecialchars ÇÔ¼ö
204
º¯¼ö³»¿¡ ¿ª½½·¡½Ã ³Ö±â¿Í »©±â
203
Á¦¾î ±¸Á¶ÀÇ ´ëü ¹®¹ý
202
elseif/else if
201
if..endif ±¸¹®
200
POST, GETÀ¸·Î º¯¼ö°ªÀÌ ³Ñ¾î°¡Áö ¾Ê´Â °æ¿ì - register_globals
199
PHP ÆÄÀÏ°ü·Ã ÇÔ¼ö
198
¿ø°ÝÁö ÆÄÀÏÀÇ Á¸Àç ¿©ºÎ¸¦ üũ »ç¿ëÀÚ ÇÔ¼ö
197
PHP ÆÄÀÏ ´Ù·ç±â
196
[PHP] ÆÄÀÏ ÇÔ¼ö
195
ÆÄÀÏ »ý¼º, ±â·Ï, Àбâ
194
´Ù¸¥ ¼­¹ö·Î °ªÀ» Àü¼ÛÈÄ °á°ú°ªÀ» ¹Þ´Â ¹æ¹ý
¸ñ·Ï
¹ÂÁ÷Æ®·ÎÆ® ºÎ»ê±¤¿ª½Ã ºÎ»êÁø±¸ °¡¾ßµ¿ ¤Ó °³ÀÎÁ¤º¸Ãë±Þ¹æħ
Copyright ¨Ï musictrot All rights reserved.