Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Ad icon
ZTE MF283U 4G Unlocked Router (Used)
ayanthamaxi
Updated:
Sunday at 8:26 PM
ලංකාවේ හොඳම උපකාරක පන්ති සහ ගුරුවරුන් එකම තැනකින් - TopTuition.lk
dulithapathum
Updated:
Saturday at 8:07 AM
Colombo
RidhMathraa ’26 🎶✨
Tmadhusanka
Updated:
Jul 15, 2026
Ad icon
Colombo
PXN V10 Pro Direct Drive Racing Wheel (Under Warranty)
Abdur Rahman
Updated:
Jul 15, 2026
Ad icon
USDT ණය සේවාව - USDT Loan Service
පුරවැසියා
Updated:
Jul 15, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
Education
Cookie
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="Megatrone" data-source="post: 8521356" data-attributes="member: 183526"><p style="text-align: center"><span style="font-size: 15px"><span style="font-size: 18px"><u><strong>Cookie</strong></u></span></span></p> <p style="text-align: center"></p><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px"> ඔය ගොල්ලෝ හුග දෙනෙක් දන්න දෙයක් තමා Cookie කියන්නෙ. නමුත් සමහර අය මේක ගැන අහල තිබුනට හරියට දන්නේ නෑ. ඉතින් මම හිතුවා ඒ කට්ටියට Cookie ගැන කියලා දෙන්න. </span></p><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px"><em><u><strong>මොකක්ද මේ Cookie එකක් කියන්නේ</strong></u></em></span></p><p><span style="font-size: 15px"> </span></p><p><span style="font-size: 15px"> Cookie එකක් කියන්නේ පොඩි TXT file එකක්. ඒකේ අතුලේ server side useful data තියෙන්නේ. Cookie එකක් txt file එකක් නිසා පොඩි ඉඩක් තමා වෙන්නේ. එක හදන්නේ server side එකෙන්, client side computer එකේ. ඒ කියන්නේ ඔයා web page එකක් request කලාම ඒ request එකට ආදාල web page එක client computer එකට sever එකෙන් send කරනවා. එතකොට තමා මේ cookie කියන එක හැදෙන්නේ. </span></p><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px"><em><u><strong>cookie එකෙන් මොකක්ද වෙන්නේ</strong></u></em></span></p><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px"> Cookie එක read කලාම client ගැන server එකට දැනගන්න පුලුවන්. </span></p><p><span style="font-size: 15px"><span style="font-family: 'Comic Sans MS'"><strong>Example:</strong></span></span></p><p><span style="font-size: 15px"> ඔයා Ebay site එකෙන් Computer පොතක් buy කලා කියමු. එතකොට server එකෙන් ඔයාගේ computer එකේ ගත්ත පොත ගැන විස්තර දාලා cookie එකක් හදනවා. එතකොට ඔයා next time Ebay site එකට ගියාම, sever එක ඔයාගේ computer එකේ හදපු cookie එක read කරලා දැන ගන්නවා ඔයා computer book එකක් කලින් buy කරලා කියලා. දැන් ඒ ගොල්ලන්ට පුලුවන් ඔයාට අලුතින් ඒ ගොල්ලො sell කරන computer books ගැන ඔයාට කියන්න. ඒ වගේම පුලුවන් computer books වල offers තියනවානම් ඒවත් කියන්න.</span></p><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px"><u><strong>මෙහි ඇති මුලික වාසි නම්,</strong></u></span></p><p><span style="font-size: 15px"></span></p><ol> <li data-xf-list-type="ol"><span style="font-size: 15px">special offers පෙන්වීමට ඇති server එකට එන සියලුම usersලාගේ අදාල විස්තර sever එකේ save කර තිබුනා නම් ඒ සදහා server එකේ වෙනම capacity එකක් වෙන් කිරිමට සිදුවිම.නමුත් cookie එක client side එකේ නිසා capacity එක ඉතුරු වෙනවා. </span></li> <li data-xf-list-type="ol"><span style="font-size: 15px">Server එකේ data තිබුනා නම් register usersලාට පමනක් special offers පෙන්වීමට හැකි වීම. නමුත් cookie එකක් මගින් ඔනම user(register or unregistered) කෙනෙකුට ඔහුගේ interest එක අනුව හැකියාව.</span></li> </ol><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px"><em><u><strong>කොහොමද මේ cookie එකක් හදන්නේ</strong></u></em></span></p><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px"> cookie එක අපි create කරන්නෙ php(computer language) වලින්.....php වල 'setcookie()'function එක තමා අපි use කරන්නේ cookie එකක් හදන්න. Notepad එකක පහත සදහන් code ලියන්න. code එක Save කරන විට "නම.php"කියල දෙන්න. file extension එක '.php' විය යුතුමයි.</span></p><p><span style="font-size: 15px"></span><p style="text-align: center"><em><span style="font-size: 15px"><?php</span></em></p> <p style="text-align: center"><em><span style="font-size: 15px"><span style="color: Red">setcookie</span>("<strong><span style="color: SeaGreen">නම</span></strong>","<strong><span style="color: SeaGreen">අන්තර්ගතය</span></strong>",<strong><span style="color: SeaGreen">කාලය</span></strong>);</span></em></p> <p style="text-align: center"><em><span style="font-size: 15px">?></span></em></p> <p style="text-align: center"><em><span style="font-size: 15px"><html></span></em></p> <p style="text-align: center"><em><span style="font-size: 15px"><body></span></em></p> <p style="text-align: center"><em><span style="font-size: 15px"><h3>Cookie created</h3></span></em></p> <p style="text-align: center"><em><span style="font-size: 15px"></body></span></em></p> <p style="text-align: center"><em><span style="font-size: 15px"></html></span></em></p> <p style="text-align: center"></p><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px"><u><span style="font-family: 'Fixedsys'"><strong>පැහැදිලි කිරිම</strong></span></u></span></p><p><span style="font-size: 15px"></span></p><ul> <li data-xf-list-type="ul"><span style="font-size: 15px"><span style="color: SeaGreen"><strong>නම</strong></span> - සෑම cookie එකකටම නමක් දිය යුතුය. දෙන නම තමන් කමැති නමක් දිය හැක.</span></li> <li data-xf-list-type="ul"><span style="font-size: 15px"><strong><span style="color: SeaGreen">අ</span><span style="color: SeaGreen">න්තර්ගතය</span></strong> - එක අතූලේ තිබිය යුතු විස්තර(content of the cookie).</span></li> <li data-xf-list-type="ul"><span style="font-size: 15px"><span style="color: SeaGreen"><strong>කාලය</strong></span> - සෑම cookie එකක්ම පවතින්නේ කිසියම් කාල සිමාවක් තුල පමනි. එය තිරනය කරනු ලබන්නේ ඔබ(creater) විසිනි. කාලයක් නුදුන්නහොත් cookie එක web browser එක open කල විට create වි web browser එක close කල විට expire වේ.</span></li> </ul> <p style="text-align: center"><em><u><span style="font-size: 15px">කාලය දෙන ආකාර</span></u></em></p> <p style="text-align: center"></p> <p style="text-align: center"><span style="color: Red"><strong><span style="font-size: 15px">time()+සිටිය යුතු කාලය විනාඩි වලින්</span></strong></span></p> <p style="text-align: center"></p><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px"><u><strong>පැහැදිලි කිරිම.</strong></u></span></p><p><span style="font-size: 15px"><span style="color: Blue">time()</span> යන්නේන් සිදු වන්නේ, cookie එක හදන වෙලාවේ client computer එකේ කාලය[time] එක ලබා ගැන්මයි.</span></p><p><span style="font-size: 15px"><span style="font-family: 'Comic Sans MS'"></span></span></p><p><span style="font-size: 15px"><span style="font-family: 'Comic Sans MS'">example</span></span></p><p><span style="font-size: 15px"></span></p><ul> <li data-xf-list-type="ul"><span style="font-size: 15px">cookie හදන වෙලාවේ සිට 1hour වලින් expire වන එකක් සෑදිමට නම්</span></li> </ul><p><span style="font-size: 15px"><span style="color: Blue"> time()+3600</span></span></p><p><span style="font-size: 15px"></span></p><ul> <li data-xf-list-type="ul"><span style="font-size: 15px">cookie හදන වෙලාවේ සිට 1day වලින් expire වන එකක් සෑදිමට නම්</span></li> </ul><p><span style="font-size: 15px"><span style="color: Blue"> time()+3600*24</span></span></p><p><span style="font-size: 15px"></span></p><ul> <li data-xf-list-type="ul"><span style="font-size: 15px">cookie හදන වෙලාවේ සිට 30days වලින් expire වන එකක් සෑදිමට නම්</span></li> </ul><p><span style="font-size: 15px"><span style="color: Blue"> time()+3600*24*30</span></span></p><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px"><u><em><strong>කොහොමද මේ cookie එකක් කියවන්නේ</strong></em></u></span></p><p><span style="font-size: 15px"><u><em><strong></strong></em></u></span></p><p><span style="font-size: 15px"><u><em><strong></strong></em></u> php වල '$_COOKIE[]'function එක තමා අපි use කරන්නේ cookie එකක් කියවන්න. Notepad එකක පහත සදහන් code ලියන්න.code එක Save කරන විට "නම.php"කියල දෙන්න.</span></p><p><span style="font-size: 15px"></span><p style="text-align: center"><span style="font-size: 15px"><html></span></p> <p style="text-align: center"><span style="font-size: 15px"><body></span></p> <p style="text-align: center"><span style="font-size: 15px"><h3>cookie content</h3></span></p> <p style="text-align: center"><span style="font-size: 15px"><br/></span></p> <p style="text-align: center"><span style="font-size: 15px"><hr/></span></p> <p style="text-align: center"><span style="font-size: 15px"><?php</span></p> <p style="text-align: center"><span style="font-size: 15px">$val=<span style="color: Red">$_COOKIE</span>["<span style="color: SeaGreen"><strong>cookie න</strong>ම</span>"];</span></p> <p style="text-align: center"><span style="font-size: 15px">echo "content is $val";</span></p> <p style="text-align: center"><span style="font-size: 15px">?></span></p> <p style="text-align: center"><span style="font-size: 15px"></body></span></p> <p style="text-align: center"><span style="font-size: 15px"></html></span></p> <p style="text-align: center"></p><p><span style="font-size: 15px">මෙහිදි නමට අදාල cookie එකේ content එක display වේ.</span></p><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px"><u><em><strong>වැදගත් </strong></em></u></span></p><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px"> අපගේ web browser වලට කියවිය හැක්කේ html පමනි. නමුත් server එකක් language ගොඩකින්(php,asp,DBMS) වැඩ කරනවා. එහිදි අපි server එකෙන් page එකක් request කල විට වෙන lanuage වලින් ඒ page එක තිබේ නම්,එම page එක html වලට convert කර අපට send කරයි. ඉහත codes සදහා මම php use කර තිබේ. එම නිසා එය අපගේ පරිගනක වල ක්රියා නොකරයි. තාවකාලික ලෙස අපගේ පරිගනකය sever එකක් බවට පත් කිරිමට ඔබට software එකක් බාවිතා කල හැක.</span></p><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px">Example: WAMP sever</span></p><p><span style="font-size: 15px"></span><a href="http://www.wampserver.com/" target="_blank">http://www.wampserver.com/</a></p></blockquote><p></p>
[QUOTE="Megatrone, post: 8521356, member: 183526"] [CENTER][SIZE=4][SIZE=5][U][B]Cookie[/B][/U][/SIZE][/SIZE] [/CENTER] [SIZE=4] ඔය ගොල්ලෝ හුග දෙනෙක් දන්න දෙයක් තමා Cookie කියන්නෙ. නමුත් සමහර අය මේක ගැන අහල තිබුනට හරියට දන්නේ නෑ. ඉතින් මම හිතුවා ඒ කට්ටියට Cookie ගැන කියලා දෙන්න. [/SIZE] [SIZE=4][I][U][B]මොකක්ද මේ Cookie එකක් කියන්නේ[/B][/U][/I][/SIZE] [SIZE=4] Cookie එකක් කියන්නේ පොඩි TXT file එකක්. ඒකේ අතුලේ server side useful data තියෙන්නේ. Cookie එකක් txt file එකක් නිසා පොඩි ඉඩක් තමා වෙන්නේ. එක හදන්නේ server side එකෙන්, client side computer එකේ. ඒ කියන්නේ ඔයා web page එකක් request කලාම ඒ request එකට ආදාල web page එක client computer එකට sever එකෙන් send කරනවා. එතකොට තමා මේ cookie කියන එක හැදෙන්නේ. [I][U][B]cookie එකෙන් මොකක්ද වෙන්නේ[/B][/U][/I] Cookie එක read කලාම client ගැන server එකට දැනගන්න පුලුවන්. [FONT=Comic Sans MS][B]Example:[/B][/FONT] ඔයා Ebay site එකෙන් Computer පොතක් buy කලා කියමු. එතකොට server එකෙන් ඔයාගේ computer එකේ ගත්ත පොත ගැන විස්තර දාලා cookie එකක් හදනවා. එතකොට ඔයා next time Ebay site එකට ගියාම, sever එක ඔයාගේ computer එකේ හදපු cookie එක read කරලා දැන ගන්නවා ඔයා computer book එකක් කලින් buy කරලා කියලා. දැන් ඒ ගොල්ලන්ට පුලුවන් ඔයාට අලුතින් ඒ ගොල්ලො sell කරන computer books ගැන ඔයාට කියන්න. ඒ වගේම පුලුවන් computer books වල offers තියනවානම් ඒවත් කියන්න. [U][B]මෙහි ඇති මුලික වාසි නම්,[/B][/U] [/SIZE] [LIST=1] [*][SIZE=4]special offers පෙන්වීමට ඇති server එකට එන සියලුම usersලාගේ අදාල විස්තර sever එකේ save කර තිබුනා නම් ඒ සදහා server එකේ වෙනම capacity එකක් වෙන් කිරිමට සිදුවිම.නමුත් cookie එක client side එකේ නිසා capacity එක ඉතුරු වෙනවා. [/SIZE] [*][SIZE=4]Server එකේ data තිබුනා නම් register usersලාට පමනක් special offers පෙන්වීමට හැකි වීම. නමුත් cookie එකක් මගින් ඔනම user(register or unregistered) කෙනෙකුට ඔහුගේ interest එක අනුව හැකියාව.[/SIZE] [/LIST] [SIZE=4] [I][U][B]කොහොමද මේ cookie එකක් හදන්නේ[/B][/U][/I] cookie එක අපි create කරන්නෙ php(computer language) වලින්.....php වල 'setcookie()'function එක තමා අපි use කරන්නේ cookie එකක් හදන්න. Notepad එකක පහත සදහන් code ලියන්න. code එක Save කරන විට "නම.php"කියල දෙන්න. file extension එක '.php' විය යුතුමයි. [/SIZE][CENTER][I][SIZE=4]<?php[/SIZE] [SIZE=4][COLOR=Red]setcookie[/COLOR]("[B][COLOR=SeaGreen]නම[/COLOR][/B]","[B][COLOR=SeaGreen]අන්තර්ගතය[/COLOR][/B]",[B][COLOR=SeaGreen]කාලය[/COLOR][/B]);[/SIZE] [SIZE=4]?>[/SIZE] [SIZE=4]<html>[/SIZE] [SIZE=4]<body>[/SIZE] [SIZE=4]<h3>Cookie created</h3>[/SIZE] [SIZE=4]</body>[/SIZE] [SIZE=4]</html>[/SIZE][/I] [/CENTER] [SIZE=4] [U][FONT=Fixedsys][B]පැහැදිලි කිරිම[/B][/FONT][/U] [/SIZE] [LIST] [*][SIZE=4][COLOR=SeaGreen][B]නම[/B][/COLOR] - සෑම cookie එකකටම නමක් දිය යුතුය. දෙන නම තමන් කමැති නමක් දිය හැක.[/SIZE] [*][SIZE=4][B][COLOR=SeaGreen]අ[/COLOR][COLOR=SeaGreen]න්තර්ගතය[/COLOR][/B] - එක අතූලේ තිබිය යුතු විස්තර(content of the cookie).[/SIZE] [*][SIZE=4][COLOR=SeaGreen][B]කාලය[/B][/COLOR] - සෑම cookie එකක්ම පවතින්නේ කිසියම් කාල සිමාවක් තුල පමනි. එය තිරනය කරනු ලබන්නේ ඔබ(creater) විසිනි. කාලයක් නුදුන්නහොත් cookie එක web browser එක open කල විට create වි web browser එක close කල විට expire වේ.[/SIZE] [/LIST] [CENTER][I][U][SIZE=4]කාලය දෙන ආකාර[/SIZE][/U][/I] [COLOR=Red][B][SIZE=4]time()+සිටිය යුතු කාලය විනාඩි වලින්[/SIZE][/B][/COLOR] [/CENTER] [SIZE=4] [U][B]පැහැදිලි කිරිම.[/B][/U] [COLOR=Blue]time()[/COLOR] යන්නේන් සිදු වන්නේ, cookie එක හදන වෙලාවේ client computer එකේ කාලය[time] එක ලබා ගැන්මයි. [FONT=Comic Sans MS] example[/FONT] [/SIZE] [LIST] [*][SIZE=4]cookie හදන වෙලාවේ සිට 1hour වලින් expire වන එකක් සෑදිමට නම්[/SIZE] [/LIST] [SIZE=4][COLOR=Blue] time()+3600[/COLOR] [/SIZE] [LIST] [*][SIZE=4]cookie හදන වෙලාවේ සිට 1day වලින් expire වන එකක් සෑදිමට නම්[/SIZE] [/LIST] [SIZE=4][COLOR=Blue] time()+3600*24[/COLOR] [/SIZE] [LIST] [*][SIZE=4]cookie හදන වෙලාවේ සිට 30days වලින් expire වන එකක් සෑදිමට නම්[/SIZE] [/LIST] [SIZE=4][COLOR=Blue] time()+3600*24*30[/COLOR] [U][I][B]කොහොමද මේ cookie එකක් කියවන්නේ [/B][/I][/U] php වල '$_COOKIE[]'function එක තමා අපි use කරන්නේ cookie එකක් කියවන්න. Notepad එකක පහත සදහන් code ලියන්න.code එක Save කරන විට "නම.php"කියල දෙන්න. [/SIZE][CENTER][SIZE=4]<html>[/SIZE] [SIZE=4]<body>[/SIZE] [SIZE=4]<h3>cookie content</h3>[/SIZE] [SIZE=4]<br/>[/SIZE] [SIZE=4]<hr/>[/SIZE] [SIZE=4]<?php[/SIZE] [SIZE=4]$val=[COLOR=Red]$_COOKIE[/COLOR]["[COLOR=SeaGreen][B]cookie න[/B]ම[/COLOR]"];[/SIZE] [SIZE=4]echo "content is $val";[/SIZE] [SIZE=4]?>[/SIZE] [SIZE=4]</body>[/SIZE] [SIZE=4]</html>[/SIZE] [/CENTER] [SIZE=4]මෙහිදි නමට අදාල cookie එකේ content එක display වේ. [U][I][B]වැදගත් [/B][/I][/U] අපගේ web browser වලට කියවිය හැක්කේ html පමනි. නමුත් server එකක් language ගොඩකින්(php,asp,DBMS) වැඩ කරනවා. එහිදි අපි server එකෙන් page එකක් request කල විට වෙන lanuage වලින් ඒ page එක තිබේ නම්,එම page එක html වලට convert කර අපට send කරයි. ඉහත codes සදහා මම php use කර තිබේ. එම නිසා එය අපගේ පරිගනක වල ක්රියා නොකරයි. තාවකාලික ලෙස අපගේ පරිගනකය sever එකක් බවට පත් කිරිමට ඔබට software එකක් බාවිතා කල හැක. Example: WAMP sever [/SIZE][URL]http://www.wampserver.com/[/URL] [/QUOTE]
Insert quotes…
Verification
Hata thunen beduwama keeyada? (60 bedeema thuna)
Post reply
Top
Bottom