By using this function we can send mail from client to destination mail id, it contains four arguments To address, Subject, body and collection of headers. Number of mail related [ … ]
Category: PHP
To Create Username And PWD Authentication
<?php $auth=0; if(isset($_SERVER[‘PHP_AUTH_USER’])) { $uname= $_SERVER[‘PHP_AUTH_USER’]; $pwd= $_SERVER[‘PHP_AUTH_PW’]; $fp= fopen(“users.txt”, “r”); while($line= fgets($fp)) { $arr= Explode(“:” $line); if($uname= $arr[0] and $pwd= trim($arr[1])) { $auth=1; break; } } } if($auth==0) header(“www_Authenticate: [ … ]
WWW- Authentication
By using this header we can display Authentication dialog box on browser, every browser contains authentication dialog box by using this header we can display the dialog box Basic Realm: By [ … ]
Header
It is a small amount of data packet used to transfer some data between browser and server. Along with form data if you want to send extra information between browser [ … ]
Directory Function Supported By PHP
mkdir: By using this function we can create directory <?php mkdir(“abc”); ?> rmdir: To remove the existing directory. <?php rmdir(“abc”); ?> opendir: To open contents of directory. readdir: To read the files of [ … ]
File Ending Concepts Part 2
fseek: By using this function we can locate the file pointer on specified location<?php$fp= fopen(“myfile.txt”, “w+);fwrite($fp, “Scott”);fseek($fp, 3);echo fread($fp, file size(“myfile.txt”));?> fgetc: To get a character from a file.<?php$fp= fopen(“myfile.txt”, “r”);echo fgetc($fp);echo [ … ]
File Ending Concept Part 1
This concept is used to read and write the content in the file. If we want to read and write the file content first we should open that file with [ … ]
Get, Post and Request
$_GET: By using super global variable we can get the posted values of method it is array variable the total number of elements are equal to the total number of [ … ]
Difference Between COOKIES and SESSIONS
COOKIES SESSIONS Cookie stores data in client server Sessions store data in client server Cookie stores only limited amount of data It can store huge amount of data It is [ … ]
Differences between GET and POST
GET POST Get transfers Limited Amount of data Post transfers More Amount of data It is unsecured Compare with Get Post is secured It transfers only specific type of data [ … ]