{"id":3258,"date":"2017-02-06T09:02:03","date_gmt":"2017-02-06T09:02:03","guid":{"rendered":"https:\/\/www.codebee.co.th\/labs\/?p=3258"},"modified":"2017-04-22T05:33:12","modified_gmt":"2017-04-22T05:33:12","slug":"%e0%b8%a7%e0%b8%b4%e0%b8%98%e0%b8%b5%e0%b8%95%e0%b8%a3%e0%b8%a7%e0%b8%88%e0%b8%aa%e0%b8%ad%e0%b8%9a-string-%e0%b8%a7%e0%b9%88%e0%b8%b2%e0%b9%80%e0%b8%9b%e0%b9%87%e0%b8%99%e0%b8%a5%e0%b8%b4%e0%b8%87","status":"publish","type":"post","link":"https:\/\/www.codebee.co.th\/labs\/%e0%b8%a7%e0%b8%b4%e0%b8%98%e0%b8%b5%e0%b8%95%e0%b8%a3%e0%b8%a7%e0%b8%88%e0%b8%aa%e0%b8%ad%e0%b8%9a-string-%e0%b8%a7%e0%b9%88%e0%b8%b2%e0%b9%80%e0%b8%9b%e0%b9%87%e0%b8%99%e0%b8%a5%e0%b8%b4%e0%b8%87\/","title":{"rendered":"\u0e2a\u0e2d\u0e19 php \u0e27\u0e34\u0e18\u0e35\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a string \u0e27\u0e48\u0e32\u0e40\u0e1b\u0e47\u0e19\u0e25\u0e34\u0e07\u0e04\u0e4c url \u0e2b\u0e23\u0e37\u0e2d\u0e44\u0e21\u0e48"},"content":{"rendered":"<h3>\u0e2a\u0e2d\u0e19 php \u0e27\u0e34\u0e18\u0e35\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a string \u0e27\u0e48\u0e32\u0e40\u0e1b\u0e47\u0e19\u0e25\u0e34\u0e07\u0e04\u0e4c url \u0e2b\u0e23\u0e37\u0e2d\u0e44\u0e21\u0e48<\/h3>\n<p><\/br><br \/>\n<strong>\u0e2a\u0e2d\u0e19 php \u0e27\u0e34\u0e18\u0e35\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a string \u0e27\u0e48\u0e32\u0e40\u0e1b\u0e47\u0e19\u0e25\u0e34\u0e07\u0e04\u0e4c url \u0e2b\u0e23\u0e37\u0e2d\u0e44\u0e21\u0e48<\/strong><br \/>\n\u0e43\u0e19\u0e01\u0e32\u0e23\u0e1e\u0e31\u0e12\u0e19\u0e32\u0e40\u0e27\u0e47\u0e1a\u0e44\u0e0b\u0e15\u0e4c \u0e04\u0e07\u0e21\u0e35\u0e2b\u0e25\u0e32\u0e22 input field \u0e17\u0e35\u0e48\u0e40\u0e23\u0e32\u0e08\u0e33\u0e40\u0e1b\u0e47\u0e19\u0e15\u0e49\u0e2d\u0e07\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a\u0e04\u0e48\u0e32\u0e27\u0e48\u0e32 \u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e17\u0e35\u0e48\u0e16\u0e39\u0e01\u0e2a\u0e48\u0e07\u0e21\u0e32\u0e40\u0e1b\u0e47\u0e19\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e17\u0e35\u0e48\u0e40\u0e1b\u0e47\u0e19 url \u0e2b\u0e23\u0e37\u0e2d \u0e25\u0e34\u0e07\u0e04\u0e4c\u0e40\u0e27\u0e47\u0e1a\u0e44\u0e0b\u0e15\u0e4c\u0e2b\u0e23\u0e37\u0e2d\u0e44\u0e21\u0e48 \u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e40\u0e0a\u0e48\u0e19 \u0e16\u0e49\u0e32\u0e01\u0e23\u0e13\u0e35\u0e17\u0e35\u0e48\u0e41\u0e1a\u0e1a\u0e1f\u0e2d\u0e23\u0e4c\u0e21\u0e08\u0e33\u0e40\u0e1b\u0e47\u0e19\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e23\u0e2d\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25 \u0e44\u0e2d\u0e14\u0e35\u0e44\u0e25\u0e19\u0e4c \u0e2b\u0e23\u0e37\u0e2d \u0e44\u0e2d\u0e14\u0e35\u0e40\u0e1f\u0e2a\u0e1a\u0e38\u0e49\u0e04 \u0e1a\u0e32\u0e07\u0e04\u0e19\u0e2d\u0e32\u0e08\u0e08\u0e30\u0e01\u0e23\u0e2d\u0e01\u0e40\u0e09\u0e1e\u0e32\u0e30\u0e44\u0e2d\u0e14\u0e35 \u0e1a\u0e32\u0e07\u0e04\u0e19\u0e2d\u0e32\u0e08\u0e08\u0e30\u0e01\u0e23\u0e2d\u0e01\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e17\u0e35\u0e48\u0e40\u0e1b\u0e47\u0e19 url \u0e40\u0e15\u0e47\u0e21 \u0e19\u0e31\u0e01\u0e1e\u0e31\u0e12\u0e19\u0e32\u0e08\u0e33\u0e40\u0e1b\u0e47\u0e19\u0e08\u0e30\u0e15\u0e49\u0e2d\u0e07\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e01\u0e48\u0e2d\u0e19\u0e1a\u0e31\u0e19\u0e17\u0e36\u0e01\u0e25\u0e07\u0e10\u0e32\u0e19\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25<!--more--><\/p>\n<p> \u0e27\u0e48\u0e32 string \u0e15\u0e31\u0e27\u0e19\u0e31\u0e49\u0e19\u0e16\u0e39\u0e01\u0e2a\u0e48\u0e07\u0e40\u0e02\u0e49\u0e32\u0e21\u0e32\u0e43\u0e19\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a\u0e02\u0e2d\u0e07\u0e44\u0e2d\u0e14\u0e35 \u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21 \u0e2b\u0e23\u0e37\u0e2d\u0e40\u0e1b\u0e47\u0e19\u0e25\u0e34\u0e07\u0e04\u0e4c \u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e43\u0e19 php \u0e40\u0e23\u0e32\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e43\u0e0a\u0e49\u0e04\u0e33\u0e2a\u0e31\u0e48\u0e07 <strong>filter_var<\/strong> \u0e43\u0e19\u0e01\u0e32\u0e23\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a\u0e15\u0e31\u0e27\u0e41\u0e1b\u0e23\u0e19\u0e31\u0e49\u0e19 \u0e46 \u0e44\u0e14\u0e49<br \/>\n<\/br><\/p>\n<h4>\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a\u0e15\u0e31\u0e27\u0e41\u0e1b\u0e23\u0e27\u0e48\u0e32\u0e40\u0e1b\u0e47\u0e19\u0e25\u0e34\u0e07\u0e04\u0e4c\u0e2b\u0e23\u0e37\u0e2d\u0e44\u0e21\u0e48<\/h4>\n<p>\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 filter_var \u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21 string \u0e27\u0e48\u0e32\u0e40\u0e1b\u0e47\u0e19\u0e25\u0e34\u0e07\u0e04\u0e4c\u0e2b\u0e23\u0e37\u0e2d\u0e44\u0e21\u0e48\u0e43\u0e19\u0e20\u0e32\u0e29\u0e32 php<\/p>\n<pre class=\"lang:default decode:true \" >function isURL($url){\r\n\t$url = filter_var($url, FILTER_SANITIZE_URL);\r\n\tif (!filter_var($url, FILTER_VALIDATE_URL) === false) {\r\n\t\techo(\"$url is a valid URL\");\r\n\t} else {\r\n\t\techo(\"$url is not a valid URL\");\r\n\t}\r\n}\r\nisURL('http:\/\/line.me\/ti\/p\/~');<\/pre>\n<p>\u0e08\u0e32\u0e01\u0e42\u0e04\u0e4a\u0e14\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e14\u0e49\u0e32\u0e19\u0e1a\u0e19\u0e40\u0e23\u0e32\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e19\u0e33\u0e1f\u0e31\u0e07\u0e01\u0e4c\u0e0a\u0e31\u0e48\u0e19 isURL \u0e44\u0e1b\u0e1b\u0e23\u0e30\u0e22\u0e38\u0e01\u0e15\u0e4c\u0e43\u0e0a\u0e49\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a string \u0e27\u0e48\u0e32\u0e2d\u0e22\u0e39\u0e48\u0e43\u0e19\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a\u0e02\u0e2d\u0e07\u0e25\u0e34\u0e07\u0e04\u0e4c\u0e2b\u0e23\u0e37\u0e2d\u0e44\u0e21\u0e48 \u0e42\u0e14\u0e22\u0e2d\u0e32\u0e08\u0e08\u0e30\u0e40\u0e1b\u0e25\u0e35\u0e48\u0e22\u0e19\u0e08\u0e32\u0e01\u0e01\u0e32\u0e23 echo \u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e40\u0e1b\u0e47\u0e19\u0e01\u0e32\u0e23 return boolean \u0e2d\u0e2d\u0e01\u0e44\u0e1b\u0e41\u0e17\u0e19<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0e2a\u0e2d\u0e19 php \u0e27\u0e34\u0e18\u0e35\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a string \u0e27\u0e48\u0e32\u0e40\u0e1b\u0e47\u0e19\u0e25\u0e34\u0e07\u0e04\u0e4c url \u0e2b\u0e23\u0e37\u0e2d\u0e44\u0e21\u0e48 \u0e2a\u0e2d\u0e19 php \u0e27\u0e34\u0e18\u0e35\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a string \u0e27\u0e48\u0e32\u0e40\u0e1b\u0e47\u0e19\u0e25\u0e34\u0e07\u0e04\u0e4c url \u0e2b\u0e23\u0e37\u0e2d\u0e44\u0e21\u0e48 \u0e43\u0e19\u0e01\u0e32\u0e23\u0e1e\u0e31\u0e12\u0e19\u0e32\u0e40\u0e27\u0e47\u0e1a\u0e44\u0e0b\u0e15\u0e4c \u0e04\u0e07\u0e21\u0e35\u0e2b\u0e25\u0e32\u0e22 input field \u0e17\u0e35\u0e48\u0e40\u0e23\u0e32\u0e08\u0e33\u0e40\u0e1b\u0e47\u0e19\u0e15\u0e49\u0e2d\u0e07\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a\u0e04\u0e48\u0e32\u0e27\u0e48\u0e32 \u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e17\u0e35\u0e48\u0e16\u0e39\u0e01\u0e2a\u0e48\u0e07\u0e21\u0e32\u0e40\u0e1b\u0e47\u0e19\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e17\u0e35\u0e48\u0e40\u0e1b\u0e47\u0e19&#8230;<\/p>\n","protected":false},"author":1,"featured_media":3266,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"video","meta":{"footnotes":""},"categories":[46],"tags":[1533,1205,1206,1204,1207,12],"class_list":["post-3258","post","type-post","status-publish","format-video","has-post-thumbnail","hentry","category-website-development-","tag-codebeeagency","tag-detect-string-is-link","tag-detect-string-is-url","tag-php-check-string-link","tag--string-","tag--php","post_format-post-format-video"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/posts\/3258","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/comments?post=3258"}],"version-history":[{"count":3,"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/posts\/3258\/revisions"}],"predecessor-version":[{"id":3262,"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/posts\/3258\/revisions\/3262"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/media\/3266"}],"wp:attachment":[{"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/media?parent=3258"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/categories?post=3258"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/tags?post=3258"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}