1. Question:Define DNS. 

    Answer
    The Domain Name System (DNS) allows to use domain names (e.g. yahoo.com) in place of the corresponding IP address, such as 192.0.32.166.

    1. Report
  2. Question:What is domain name server? 

    Answer
    The domain names and their complementary IP addresses are stroed on domain name servers, which are interspersed across the globe.

    1. Report
  3. Question:What are the five  configuration directives that pertinent to PHP mail() function? 

    Answer
    1. SMTP=string, Scope:PHP_INI_ALL
    2. sendmail_from=stirng, Scope:PHP_INI_ALL
    3. sendmail_path=string, Scope:PHP_INI_SYSTEM
    4. smtp_port=integer, Scope:PHP_INI_ALL
    5. mail.force_extra_parameters=string, Scope:PHP_INI_SYSTEM

    1. Report
  4. Question:Explain the parameters of PHP’s mail function. 

    Answer

    The PHP mail() function is used to send emails from inside a script.

    Prototype:

    boolean mail(string to, string subject, string message [, string addl_headers [, string addl_params]])

    ParameterDescription
    toRequired. Specifies the receiver / receivers of the email
    subjectRequired. Specifies the subject of the email. Note: This parameter cannot contain any newline characters
    messageRequired. Defines the message to be sent. Each line should be separated with a LF (\n). Lines should not exceed 70 characters
    headersOptional. Specifies additional headers, like From, Cc, and Bcc. The additional headers should be separated with a CRLF (\r\n)
    parametersOptional. Specifies an additional parameter to the sendmail program


    Example:

    <?php
      
        mail("client@example.com","This is a subject","This is the mail body","from:admin@example.com\r\n");

    ?>

    1. Report
  5. Question:Name five internet services that commonly operates on a particular communications port. 

    Answer
    1. HTTP - Hyper Text Transfer Protocol
    2. FTP - File Transfer Protocol
    3. POP3 - Post Office Protocol
    4. IMAP - Internet Message Access Protocol
    5. SSH - Secure SHell

    1. Report
  6. Question:How do you retrive internet service port number in php? 

    Answer
    The getservbyname() function returns the port number of a specified service.

    Prototype:

    int getservbyname(string service, string protocol)

    Example:

    <?php
       echo "HTTP's default port number is: ".getservbyname("http","tcp");

    ?>

    1. Report
  7. Question:How do you get a socket connection in php? 

    Answer
    The fsocketopen() function establishes a connection to the resource designated by target on port.

    Prototype:

    resource fsockopen( string target, int port [, int erron [, string errsting [, float timeout]]])

    Example:

    <?php
       $http=fsockopen("www.example.com",80);
     
       $req="GET / HTTP/1.1\r\n";
       $req.="Host: www.example.com\r\n";
       $req.="Connection: Close\r\n\r\n";

      fputs($http,$req);
     
      while(!feof($http)){

          echo fgets($http,1024);

       }
    fclose($http);
     
    ?>

    1. Report
  8. Question:What do you mean by directory service? 

    Answer
    Directory Service: It offers system administrators, developers, and end users alike a consistent, efficient, and secure means for viewing and managing resources such as people, fles, printers, and applications.

    1. Report
  9. Question:How do you connect to an LDAP server? 

    Answer
    The ldap_connect() function establishes a connection to an LDAP server identified by a specific host name and optionally a port number.

    Prototype:

    resource ldap_connect([stiring hostname[, int port]])

    Example:

    <?php
       $host="ldap.wjgilmore.com";
       $post="389";
       $connection=ldap_connect($host,$port) ro die("Can't establish LDAP connection");
    ?>

    1. Report
  10. Question:What do you mean by web service? 

    Answer
    Web service: Web services are typically application programming interfaces (APIs) or web APIs that are accessed via Hypertext Transfer Protocol (HTTP) and executed on a remote system hosting the requested services.

    1. Report
Copyright © 2024. Powered by Intellect Software Ltd