Category: HTML

How to Protect CodeIgniter Forms with CSRF Tokens

Edit Config.php file $config[‘csrf_protection’] = FALSE; $config[‘csrf_token_name’] = ‘csrf_test_name’; $config[‘csrf_cookie_name’] = ‘csrf_cookie_name’; $config[‘csrf_expire’] = 7200; $config[‘csrf_regenerate’] = TRUE; $config[‘csrf_exclude_uris’] = array(); Replace the above code with : $config[‘csrf_protection’] = TRUE; $config[‘csrf_token_name’] = ‘csrf_test_name’; $config[‘csrf_cookie_name’] = ‘csrf_cookie_name’; $config[‘csrf_expire’] = 7200; $config[‘csrf_regenerate’] = TRUE; $config[‘csrf_exclude_uris’] = array();   <form action=” ” method=” “> </form> Replace the form […]

Track location using Ip Address in Php

Track location using Ip Address in Php track location by ip address in php <?php $ip = getenv(“REMOTE_ADDR”) ; $url = “https://ipinfo.io/”.$ip.”/json”; $userInfo = file_get_contents($url); $result = json_decode($userInfo,true); echo “<b>IP Address : </b>”.$result[‘ip’].”<br>”; echo “<b>City : </b>”.$result[‘city’].”<br>”; echo “<b>State : </b>”.$result[‘region’].”<br>”; echo “<b>Country Code : </b>”.$result[‘country’].”<br>”; echo “<b>Latitude & Longitude : </b>”.$result[‘loc’].”<br>”; echo “<b>Timezone : […]

Hoverable Dropdown in Html Css

File Name : Index.php <!DOCTYPE html> <html> <head> <style> .dropdown { position: relative; display: inline-block; } .dropdown-content { display: none; position: absolute; background-color: #f9f9f9; min-width: 160px; box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); padding: 12px 16px; z-index: 1; } .dropdown:hover .dropdown-content { display: block; } </style> </head> <body> <h2>Hoverable Dropdown</h2> <p>Hover the mouse on below text […]

Back To Top