简体   繁体   中英

Rightmove realtime data feed

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

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:

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?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM