0

We've been asked to provide a rightmove realtime datafeed for a local eastate agent website

We have the specs and examples from Rightmove for this and having looked at these we have a couple of questions

1) Rightmoves requires Mutual SSL authentication - is this possible with php/javascript? If so any pointers would be gratefully received

2) Does anybody know of some sample php scripts we could look at to get us started?

Thanx

bob
  • 107
  • 3
  • 12
  • 1
    Welcome to SO. Please read [What topics can I ask about](http://stackoverflow.com/help/on-topic) and [How to ask a good question](http://stackoverflow.com/help/how-to-ask) And [the perfect question](http://codeblog.jonskeet.uk/2010/08/29/writing-the-perfect-question/) – RiggsFolly Jan 08 '16 at 09:39

2 Answers2

1

1) Yes, the SSL communication with Rightmove service can be achieved using PHP cURL library. Contact Rightmove ADFT Team and request necessary credentials for client authentication. Extract .pem key and certificate from .p12 file. On Linux:

openssl pkcs12 -in file.p12 -out file.key.pem -nocerts -nodes
openssl pkcs12 -in file.p12 -out file.crt.pem -clcerts -nokeys

Issue following request to Rightmove service along with your data, for more details see Rightmove Real Time Datafeed Specifications.

        $url = 'https://adfapi.adftest.rightmove.com/v1/YOUR METHOD';

    $curl = curl_init();
    $headers = ["Content-type: application/json;charset=\"utf-8\""];   


    curl_setopt_array($curl, 
            [

                CURLOPT_URL                 => $url,
                CURLOPT_HTTPHEADER          => $headers, 

                CURLOPT_POST                => true,
                CURLOPT_POSTFIELDS          => json_encode($data, JSON_UNESCAPED_SLASHES),                    

                CURLOPT_RETURNTRANSFER      => true,
                CURLOPT_SSL_VERIFYPEER      => true,
                CURLOPT_SSL_VERIFYHOST      => false,
                CURLOPT_VERBOSE             => true,
                CURLOPT_SSLVERSION          => 6,


                CURLOPT_SSLCERT             => 'RIGHTMOVE SECRETE',
                CURLOPT_SSLKEY              => 'RIGHTMOVE SSL KEY',
                CURLOPT_SSLCERTPASSWD       => 'RIGHTMOVE PASS',
                CURLOPT_SSLKEYPASSWD        => 'RIGHTMOVE SSL PASS',                    

            );


    $request = curl_exec($curl);

    if (empty($request)) {

        throw new \RuntimeException('cURL request returned following error: '.curl_error($curl) );
    }
    curl_close($curl);

    return $request;

2) Here is sample PHP script RightmoveADF on GitHub. Alternatively use other services that offers Real-time data feed integration with Rightmove, there are many others available, here a few results from Google search:

Alexanderp
  • 341
  • 1
  • 9
-2

Most estate agents use a crm like dezrez / expert agent etc. They are all geared up to feed to rightmove , zoopla on auto pilot. Your agent should consider using this just for data storage features and easy access to property data they may require in the future.

The Crm's will also send you an xml feed which you can then parse and display on your website using filter() functions in php , jquery or Xquery .

Did you decide on a solution after?

Glen
  • 39
  • 1
  • 2
  • 14