<HTML ><HEAD ><TITLE >yp_get_default_domain</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.44"><LINK REL="HOME" TITLE="PHP Manual" HREF="manual.html"><LINK REL="UP" TITLE="NIS functions" HREF="ref.nis.html"><LINK REL="PREVIOUS" TITLE="NIS functions" HREF="ref.nis.html"><LINK REL="NEXT" TITLE="yp_order" HREF="function.yp-order.html"></HEAD ><BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >PHP Manual</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="ref.nis.html" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.yp-order.html" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="function.yp-get-default-domain" >yp_get_default_domain</A ></H1 ><DIV CLASS="refnamediv" ><A NAME="AEN19536" ></A >yp_get_default_domain -- Fetches the machine's default NIS domain.</DIV ><DIV CLASS="refsect1" ><A NAME="AEN19539" ></A ><H2 >Description</H2 ><DIV CLASS="funcsynopsis" ><P ></P ><CODE CLASS="FUNCDEF" >int yp_get_default_domain</CODE >(void );<P ></P ></DIV ><P > <B CLASS="function" >yp_get_default_domain()</B > returns the default domain of the node or FALSE. Can be used as the domain parameter for successive NIS calls. </P ><P > A NIS domain can be described a group of NIS maps. Every host that needs to look up information binds itself to a certain domain. Refer to the documents mentioned at the beginning for more detailed information. </P ><P > <TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" CLASS="EXAMPLE" ><TR ><TD ><DIV CLASS="example" ><P ><B >Example 1. Example for the default domain</B ></P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><PRE CLASS="programlisting" > 1 2 <?php 3 $domain = yp_get_default_domain(); 4 echo "Default NIS domain is: " . $domain; 5 ?> 6 </PRE ></TD ></TR ></TABLE ></DIV ></TD ></TR ></TABLE > </P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="ref.nis.html" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="manual.html" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.yp-order.html" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >NIS functions</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="ref.nis.html" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >yp_order</TD ></TR ></TABLE ></DIV ></BODY ></HTML >