<RETS_SCRIPT>

  <ACCOUNT Enabled="true">

    <Comment>National Association of REALTORS (NAR), Center for REALTOR Technology (CRT)</Comment>

    <BATCH_LIMIT>2500</BATCH_LIMIT>

    <LOGIN>
      <Host>http://nom.rets.interealty.com/Login.asmx/Login</Host>
      <User>PALAZZOV</User>
      <Password>11374</Password>
      <User_Agent>PHPdev/1.0</User_Agent>
      <User_Agent_Password>021910</User_Agent_Password>
      <User_Agent_Auth>false</User_Agent_Auth>
      <RETS_Version>RETS/1.5</RETS_Version>
      <Standard_Names>false</Standard_Names>
      <Post_Requests>true</Post_Requests>
    </LOGIN>

    <LOGGING Enabled='true'>
      <File>http.log</File>
    </LOGGING>


    <SEARCH Enabled='false'>
      <Type>Property</Type>
      <Class>1</Class>
      <Query>((146=100-1000000))</Query>
      <Output
        LinesTerimatedBy="\r\n"
        FieldsTerminatedBy=","
        FieldsEnclosedBy='"'
        FieldsEscaped="true"
        ColumnNames="false"
      >NAR_ResidentialPropert1.txt</Output>
    </SEARCH>

    <SEARCH Enabled='false'>
      <Type>Property</Type>
      <Class>1</Class>
      <Format>COMPACT</Format>
      <Select>*</Select>
      <Query>((1597=|POOR,AVG),(40=|1,2,3,4,5,6,7,8,11,12,13,14,15,16,17,18,19,21,22,24,25,26,27,31,32,33,34,35,36,37,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,99,111,114,115,116,117,118,119,120,121,122,201,202,203,204,205,206,207,208,209,210,212,213,223,301,302,303,304,305,306,307,308,309,408,409,421,424,425,426,427,500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,530,611,612,613,621,622,631,641,642,643,650,651,652,653,660,661,662,670,673,674,680,681,682,690,691,692,693,694,695,699),(265=|A))</Query>
      <QueryType>DMQL2</QueryType>
      <Count>1</Count>
      <Limit>NONE</Limit>
      <Offset></Offset>
      <Output FieldsEscaped="true" ColumnNames="false"  >NAR_ResidentialPropert1.txt</Output>
      <Index>LN</Index>
    </SEARCH>
	
    <GET_OBJECT Enabled='true'>
      <Comment>Get Photos</Comment>
      <Type>Property</Type>
      <ObjectType>Photo</ObjectType>
      <RecordID>12972645:*, 13100425:*</RecordID>
      <Path>./%k-%i.jpg</Path>
    </GET_OBJECT>
	
    <SEARCH Enabled='false'>
        <Type>Property</Type>
        <Class>ResidentialProperty</Class>
        <Format>COMPACT-DECODED</Format>
        <Select>
            LN, LD, LP, AGENTID, BATHS, BEDROOMS, LS, STNUM, STREETDIRECTION, STNAME, CITY, COUNTY, STATE, ZIPCODE,
            YearBuilt, Garage, LivingArea, TotalRooms
        </Select>
        <Query>
            (
                ( LS = Active )
               ,( LP = 250000-450000 )
               ,( BEDROOMS = 3-5 )
               ,( CITY = "Buffalo Grove" )
            )
        </Query>
        <QueryType>DMQL2</QueryType>
        <Count>1</Count>
        <Limit>NONE</Limit>
        <Offset></Offset>
        <Output
            LinesTerimatedBy="\r\n"
            FieldsTerminatedBy="|"
            FieldsEnclosedBy='"'
            FieldsEscaped="true"
            ColumnNames="true" >NAR_ResidentialPropert2.txt</Output>
    </SEARCH>

    <GET_METADATA Enabled='false'>
      <Comment>Get all Metadata</Comment>
      <Type>METADATA-SYSTEM</Type>
      <Format>COMPACT</Format>
      <ID>*</ID>
      <Output>NAR_Metadata-System.txt</Output>
    </GET_METADATA>

    <GET_METADATA Enabled='false'>
      <Comment>Get System Metadata</Comment>
      <Type>METADATA-SYSTEM</Type>
      <Format>COMPACT</Format>
      <ID>0</ID>
      <Output>NAR_Metadata-System2.txt</Output>
    </GET_METADATA>

    <GET_METADATA Enabled='false'>
      <Comment>Get all Resources Metadata</Comment>
      <Type>METADATA-RESOURCE</Type>
      <Format>COMPACT</Format>
      <ID>0</ID>
      <Output>NAR_Metadata-Resource.txt</Output>
    </GET_METADATA>

    <GET_METADATA Enabled='false'>
      <Comment>Get all Classes Metadata</Comment>
      <Type>METADATA-CLASS</Type>
      <Format>COMPACT</Format>
      <ID>*</ID>
      <Output>NAR_Metadata-Class.txt</Output>
    </GET_METADATA>

    <GET_METADATA Enabled='false'>
      <Comment>Get all ResidentialProperty Metadata Fields</Comment>
      <Type>METADATA-TABLE</Type>
      <Format>COMPACT</Format>
      <ID>Property:ResidentialProperty</ID>
      <Output>NAR_Metadata-Table.txt</Output>
    </GET_METADATA>

  </ACCOUNT>

</RETS_SCRIPT>

