You are on page 1of 8
B.C.A. (Sem - VI) ee B.C.A. - 601 o Building Applicati sing PHP Ss stata Singh terials From This Link = mrpurusingh.blogspot.in BCA AND PGDCA COLLEGE, IDAR ‘email, Web Ser: EM Understanding, XML: PHP must be configured correctly in the phpanr tite email. Open php.ini file available in /etc/ directory and find the section headed [mail function | Windows users should ensure that twe directives are supplied. The first is called SMTP that defines your email server address. ‘The second is called sendmail_from which defines your ovin email address, The configuration fGF Windows should look something like this ~ [mait function} ; For Win32 only. SMTP = smtp.secureserver.net 5 For win32 only sendmail_from ee Linux users simply need to let PHP know the location of their sendmail application. The path and any desired switches should be specified to the sendmail_path directive. The configuration for Linux should look something like this - name@ispname.com [mail function} ; For Win32 only. SMTP } For win32 only sendmail_from = } For Unix only sendmail_path = /usr/sbin/sendmail -t -i PHP makes use of mail() function to send an email that specify the recipient's email address, the This functiofr Tequires three mandatory arguments subject of the the message and the actual message additionally there are other two optional parameters. . £ Sr.No Parameter & Description 1 To Specifies the receiver / receivers of the email 2 Subject Specifies the subject of the email. This parameter cannot contain any newline characters See 3 Message Defines the message to he sent. Each line should be separated with a LF (\n). Lines should not exceed 70 characters 4 Headers (Optional) Specifies additional headers, like From, Cc, and Bcc, The additional headers should be separated with a CRLF (\r\n) 5 Parameters (Optional) Specifies an additional parameter to the send mail program Page-45 ~~ SHRIKANT THAKAR -~- BCA AND PGDCA COLLEGE, IDAR Example: - shead> Sending HTML email using PHP This is HTML message. "; $message .= “

This is headline.

$header = "From:abc@somedomain.com \r\n"; header .= "Cc:afgh@somedomain.com \r\n Sheader .= "MIME-Version: 1.0\r\n"; Sheader .= "Content-type: text/htmi\r\n"; $retval = mail ($to, $subject, message, $header); if( Sretval == true ) ( echo "Message sent successfully..."; Jelse { echo "Message could not be sent. ? > attachments * To send an email with mixed content requires to set Content-type header to multipart/mixed. Then text and attachment sections can be specified within boundaries. + A boundary is started with two'byphens followed by a unique number which can not appear in the message part of the em: I + RPHP function mdS() is deed to create 3 32 di + Afinal boundary denoting tite, igit hexadecimal number to create unique number. emails final section must also end with two hyphens. og ¥ .
O° '300" border ca tes Se «
Your Name: from” type = “text” "30"> Your Email Address:
Attach File:
<{nput name “submit” Value = "Submit" onClick = “return CheckDataa5()">
>
BY: - SHRIKANT THAKAR - BCA AND PGDCA COLLEGE, IDAR PHP. The XMI language is a way to structure data for sharing across websites. NHLis easy to create, TeTooks a lof Tike HIRT, except that you make tp your own tags. XML was designed ‘both human- and machine-readable. XML plays an importaat role in maiiy differént Tsystems, XML is.aften used for distributing data over the internet. It is important (for all types of software developers!) to have a good understanding of XML. Example: - Gopal K Verma Sairamkrishna Project submission Please see clearly XML; a $xml=simplexml_load_string($note); print_r($xml); ML Document an + An XML document with correct syntax is called "Well Formed”. + An XML document validated against a QTD is both "Well Formed” and "Valid”. «A "Valid" XML document is a "Well-Formed" XML document, which also conforms to the rules of a DTD: Tove Reminder D@n't forget me this weekend! + The purpose of a DTD is to define the structure of an XML document. It defines the structure with a list of legal elements: ‘ > vices: Web Service: \6 intro‘ Introduction to SAX Web Services: - . The-tull form of SAX isIs: nple API for xMEy BY: - SHRIKANT THAKAR, BCA AND PGDCA COLLEGE, IDAR -- Pup + SAX (Simple API for XML) 15 an application program intertace (API) that allows a programmer to interpret a Web file that uses the Extensible Markup Language (XML) = that is, 9 Web file th describes a coliection of data + SAX is an alternative to usiny the{ Poeun Object Model (DOMYto interpret the XML file + AS Its nome suagests, i's a simpler hntertace-t Ta appropriate where many or very, Jorge fles.are to be processed, But Wt Coulains fewer Capatililies fOr mopinulating the data content + SAX is an event-driven interface. The programmer specifies git event thot may happen and, if oes, SAX gets control and handles the siturtion, SAX works directly with an KML parser. + The benchts of tie event driven parsing method include: ~ Easy readability, of RSS feeds (or any other XML documents that you wish to see in a particular format). + Selective parsing of the XML document. Extremely light en memory usage, especially compored to the DOM model. ee te Services have thie Dac plavrm elements: SOAP, WSDL and UDDL 6 SOAP:- SOAP is a simple XML-based protocol to let applications exchange information over HTTP. SOAP stands fortSimple Object Access Protacol,) ‘SOAP is a communication protocol SOAP is a format for sending messages. - SOAP is designed to communicate via Internet. SOa® is platform independent SOAP is language independent. SOAP is based on XML SOAP is simple and extensible SOAP allows you to get around firewalls. 1 2 3 4 6 7 8. 9, u WSDL is an XML-based language for describing Web services and how to acess them. WSOL stands for Web Services Description Language, WSDL is based on XML, WSDL is used to describe Web services. WSOL is also used to locate Web servicés UDDI is a directory service where businesses can register and search for Web services. UDI stands for Universal Description, Discovery and Integration. UDI is a directéry for storing information about web Servic UDDI is a directory of web service interfaces described by WSDL. UDI communicates via SOAP. UDI is built into the Microsoft .NET platform. or sene . Define vo 1 | DTD Documents mye Define Mom p - Rehan the number ef cMPected orysal OPES an : 3 een dotyhose COME: © eiffected Pea c>". easali eae eee Pree ex Bdevi ouse) fy Areysal clesecd *~ 7 cannes Comecion fe She asa): \b conweck CO! ae ae 3 “ ae “Ree Pea Parcs Me quer — jotabuse Yeucilr Ae Coe ji : joel connect 340 a0! fo, AMECL EAB cD) | BY: - SHRIKANT THAKAR -- Page-50 cnusql_avcry(Qcon , 8 Qucax) -erysal'y_ comnect Cea aeple.ce a, Ava" * alcras) »

You might also like