Loading...

Category: PHP

Mail

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 [ … ]

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 [ … ]

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 [ … ]

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 [ … ]