giwrgos88 / rightmove-adf

PHP library for the Rightmove Real Time Property Datafeed (ADF).
MIT License
3 stars 2 forks source link

Does this still work? #1

Open jamoir opened 7 years ago

jamoir commented 7 years ago

Hi,

I'm running this on a mac with php 5.6 in a terminal.

I'm trying a basic example to get a list. I get the first print_r response containing the object. But nothing returns from send call. No errors either.

Thanks, Jamie

giwrgos88 commented 7 years ago

@jamoir can you show me a sample of your code?

jamoir commented 7 years ago

<?php require_once(DIR.'/vendor/autoload.php'); use Frozensheep\RightmoveADF\RightmoveADF; //include the config file require("config.php");

//GET LIST REQUEST

//create the RightmoveADF object $objRightmoveADF = new RightmoveADF(CERT_FILE, CERT_PASS, RightmoveADF::TEST); //create a request $objRequest = $objRightmoveADF->createRequest(RightmoveADF::GetBranchPropertyList); //set the details for the request $objRequest->network->network_id = NETWORK_ID; $objRequest->branch->branch_id = BRANCH_ID; //$objRequest->branch->channel = Frozensheep\RightmoveADF\Values\Channels::Lettings; print_r(json_encode($objRequest)); //send the request $objResponse = $objRightmoveADF->send($objRequest); print_r($objResponse); ?>

This outputs the json object fine, but not the

config is this

//full path to the PEM certificate define('CERT_FILE', '~/Desktop/Work/GIT/emp/portal_uploader/source/certificates/estatemagictest.pem');

//the password define('CERT_PASS', 'Bfsdsdsdy');

//the network ID define('NETWORK_ID', 10175);

//the brand ID define('BRAND_ID', 1234);

//the branch ID define('BRANCH_ID', 176435);

//the a property REF define('PROPERTY_REF', 'PROP_1’);

Thanks, Jamie

On 7 Nov 2017, at 19:15, Georgios Panayi notifications@github.com<mailto:notifications@github.com> wrote:

@jamoirhttps://github.com/jamoir can you show me a sample of your code?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/giwrgos88/rightmove-adf/issues/1#issuecomment-342590658, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AC05rYPBRDMTxkCYMJfLslTTQcbgdWRHks5s0KxFgaJpZM4QVSN_.

jamoir commented 7 years ago

I've just tried this on my live ubuntu server. And it worked! So not sure what is going wrong locally on my mac.

Are there any other requirements I should know about?

jamoir commented 7 years ago

Hi,

I've resolved this now.

First off I enabled verbose debugging. Something that should probably be mentioned in the test example and initial docs. Very useful!

$objResponse = $objRightmoveADF->send($objRequest, '', true);

This then told me the cert wasn't the right one.

On the mac you need to use the P12 cert and on linux the .pem one works.

Also to make matters harder, the right move test server had crashed so it was working and then stopped so completely baffled me during the testing of this. Their support is good and fast though.

Awesome library guys, works very well.

Thanks, Jamie

giwrgos88 commented 7 years ago

@jamoir I used the pem that rightmove gave me, but it was 2 years ago, I don't know if they changed anything since then, but I don't think is the pem the issue. It will be good to debug your code to see what the error is