Posts

Setting up and understanding the Codeigniter framework

Image
Now download the codeigniter framework from it's official website and place that in the root directory of server configured with PHP. Look into the directory structure of codeigniter framwork files. Now i'm going to discuss about the folders and files included in its directory . This is directory structure of codeigniter Framework given in the adjacent picture and the shown folders and files are included  in the structure of codeigniter framework. Here also a folder in the above directory named as "system" in which library class functions of Codeigniter framework are included. By using the system library of CI, one can easily make a good app rapidly .All one has to do is just follow the rules of working in CI framework.  Lets talk about its working and directory Structure-  first we would discuss about each folder included in its application folder because it is most essential and will help to understand it's working. 1.cache:  At first...

Working with Frameworks of PHP- The MVC structure

Image
To work with frameworks of PHP first we have to learn what exactly is the MVC structure and how it works.. MVC is the acronym of Model View Controller.its means it has three main parts .. 1.Model             2.View              3.Controller       Lets see working flowchart of  MVC Structure . MODEL : Models are the place where main logic and codes for manipulating the database are kept ... thus its the main part of any MVC application VIEW : view is place or directory where codes or templates to interact with users are put..     CONTROLLER : controllers are the place or directory where codes to control over data given by user, are put.. Many frameworks of php are available in the market in paid or free of cost.. But now I am starting with CodeIgniter  because it is easy for beginners and you will laern it with no efforts just in first attempt.. First you need to download ...

Creating a mini-file-manager in PHP

Lets have a look on codes that i have written in php , html and styled in css combindly just in one file. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 2...

RSA encryption algorithm and it's methematical background and it's application in php

Image
          Mathematics Behind RSA Encryption Algorithm  rsa cryptography uses properties of   humongous numbers as large power of bigger numbers we can't calculate this mathematics directly when numbers are so huge. so here we use tricky mathematics called Modular Airthmathics. we uses Modular Airthmathic because we we don't have to work with large numbers in Modular Airthmatic.      For example: 5  module  3 is 2 because: 5 = 1 * 3 + 2. example: 40mod10=30mod10=0. because:40=4*10+0.              30=3*10+0. Modular multiplication of many numbers- X = 36 * 53 * 91 * 17 * 22 (mod 29) . now 36(mod29)=7.       53(mod29)=24.        91(mod29)=4.        17(mod29)=17.        22(mod29)=22. hence X=7*24*4*17*22(mod29).          X=14. Modular Powers- compute 11 43 ...

vegerne cipher decryption and its application in php

         vegerne cipher encryption and its application in php              now i will make a function in php that will do this job for you.              lets have a look on that function     //function for vegerne cipher decryption function vegerne_decipher($str,$str_passwd) { if(preg_match("/[^a-zA-Z]/", $str_passwd)) { return null; } else { $str_password=strtolower($str_passwd); $pass_arr=array(); $pass_arr_num=array(); $alpha=array('a'=>'1','b'=>'2','c'=>'3','d'=>'4','e'=>'5','f'=>'6','g'=>'7','h'=>'8','i'=>'9','j'=>'10','k'=>'11','l'=>'12','m'=>'13','n'=>'14','o'=>'15','p'=>'16','q'=>'17','r'=>'18...

ciphers continued--Vegerne Cipher and its application in php

Image
> 2.Vegerne Cipher- The Vigenère cipher is a method of encrypting alphabetic text by using a series of different Caesar ciphers based on the letters of a keyword. It is a simple form of polyalphabetic substitution. The Vigenère cipher has been reinvented many times. lets look at the image for vegerne ciphers  logic now i will make a function for encription by logic of vegerne cipher function vegerne_cipher($str,$str_passwd) { if(preg_match("/[^a-zA-Z]/", $str_passwd)) { return null; } else { $str_password=strtolower($str_passwd); $pass_arr=array(); $pass_arr_num=array(); $alpha=array('a'=>'1','b'=>'2','c'=>'3','d'=>'4','e'=>'5','f'=>'6','g'=>'7','h'=>'8','i'=>'9','j'=>'10','k'=>'11','l'=>'12','m'=...

Ancient Cryptography-ciphars

Image
                            Ancient cryptography-ciphars                 1. caesar ciphars -In cryptography caesar ciphar are also known as shift ciphers, caesar's ciphar etc.. this technique of encryption is thousands of years old.In this technique we shift a character with shift value, suppose we have a character class[a-z](means a to z characters) that is situated from 0 to 25. now with a shift value i shift a position of character.like i have a message 'hs' . with shift 5. this message will become 'mx'. thus we encrypt a message by caesar ciphars. this is very weak technique of encryption. because there is 25 values that you can give to shift.  although  you do not know the value of shift, you can break the encryptoin by knowing the occurance frequencies of particular characters.      alogrithm seen in picture is used by ca...