We've just added RSS feeds for all our listings on reallyo.com so that they show up on the following sites:

Syndic8
Google Base
Oodle
Edgeio
Backpage
Local.com
Lycos
Realty Feeds
RealtyFeedSearch.com
Trulia
Propsmart
Vast
Livedeal
HotPads
realestateadvisor.com

So when you submit your listing to reallyo.com we list it on all those sites for you for free - giving your listings maximum exposure to hundreds of thousands of real estate buyers.

If you already have a website with your listings on them and they are being pulled from a database then you achieve the same in a few simple steps.

This example is going to use PHP but you can use any other language.

First you need to connect to the database which has all your listings in it:

<?php
$connection = @mysql_connect (mysql_host,database_user, user_password) or die ("Cannot make the connection");
$database = @mysql_select_db (database_name,$connection) or die ("Cannot connect to database");
?>

mysql_host = the host your database is running on - usually 'localhost'
database_user = username for the database
user_password = password for the database
database_name = name of the database

You will then need to run a mysql query on this database to pull all your listings details from it. Since all databases are different and the queries will be different I'm not going to go into this but you can ask any web developer to do this for you.

In this example I'm only going to pull id, price, and bedrooms of the each listing:

<?php       
$sql_query = "SELECT *
FROM listings
ORDER BY datesubmitted DESC";

$result = mysql_query($sql_query);
if(mysql_num_rows($result))
{

//output as long as there are still available fields
while($row = mysql_fetch_array($result))
    {
    $id = $row[id];
    $price = $row[price];
    $bedrooms = $row[bedrooms];
    }

}
?>


We are going to be outputting the RSS feed as a standard XML file. Since we are using PHP we have to ensure that we state the right content type for the file to be valid XML and we do this by using this line at the top of the PHP file:

<?php
header("Content-Type: application/xml");
?>


We then need to output the headers of the XML files:

<?php
echo '
<?xml version="1.0" encoding="UTF-8" ?>
<rss version ="2.0" xmlns:g="http://base.google.com/ns/1.0">
<channel>
<title>Your Website Title</title>
<description>Your Website Description</description>
<link>Your Website Link</link>';
?>


We output each listing or item in our XML file to comply with the way Google Base wants it formatted (http://base.google.com/base/housing.html). In our example we need to format id, price, and bedrooms. This is the way Google Base wants it:

<item>
<g:id>id</g:id>
<g:price>price</g:price>
<g:bedrooms>bedrooms</g:bedrooms>
</item>

Putting this into PHP we get:

<?php
echo '
<item>
<g:id>$id</g:id>
<g:price>$price</g:price>
<g:bedrooms>$bedrooms</g:bedrooms>
</item>';
?>


Finally we need output the footer of the XML file:

<?php
echo '
</channel>
</rss>'; ?>


Bringing this all together we get:

<?php
$connection = @mysql_connect (mysql_host,database_user, user_password) or die ("Cannot make the connection");
$database = @mysql_select_db (database_name,$connection) or die ("Cannot connect to database");

echo '
<?xml version="1.0" encoding="UTF-8" ?>
<rss version ="2.0" xmlns:g="http://base.google.com/ns/1.0">
<channel>
<title>Your Website Title</title>
<description>Your Website Description</description>
<link>Your Website Link</link>';
       
$sql_query = "SELECT *
FROM listings
ORDER BY datesubmitted DESC";

$result = mysql_query($sql_query);
if(mysql_num_rows($result))
{

//output as long as there are still available fields
while($row = mysql_fetch_array($result))
    {
    $id = $row[id];
    $price = $row[price];
    $bedrooms = $row[bedrooms];

echo '
<item>
<g:id>$id</g:id>
<g:price>$price</g:price>
<g:bedrooms>$bedrooms</g:bedrooms>
</item>';

    }

}

echo '
</channel>
</rss>';
?>


And there you have it, a PHP file which pulls data from your listings database and outputs it as an Google Base-friendly XML file. You will need to sign up for a Google Base account before you can upload your XML file.

To create XML feeds for all the other site you will have to consult each site's requirements and create and submit a feed accordingly.

If you need any help with getting your listings output in an XML friendly way then feel free to drop me an email at rob@reallyo.com.

 


 

111 111

Albany, NH

More about me…

111

Address: 1111, 1111, az, 1111

Office Phone: (111) 111-1111

Cell Phone: (111) 111-1111

Email Me



Links

Archives

RSS 2.0 Feed for this blog

Find NH real estate agents and Albany real estate on ActiveRain.