making a query to the listing database

712 views
Skip to first unread message

Jerry Woods

unread,
Dec 16, 2016, 6:20:46 PM12/16/16
to PHRETS
i can sign on fine, and can retrieve data from 5 of the 6 resources listed from RETS M.D.
when i try to get data from the listing resource i get:
PHP Fatal error:  Uncaught exception 'GuzzleHttp\Exception\ClientException' with message 'Client error response [url] http://rets.mfrmls.com/contact/rets/search?SearchType=Property&Class=Listing&Query=&QueryType=DMQL2&Count=1&Format=COMPACT-DECODED&Limit=99&StandardNames=0 [status code] 404 [reason phrase] Not Found' in /home1/jerrywoo/public_html/JWReal2/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:89


I can do Agent/Agent, Media/Media, Office/Office, OpenHouse/OpenHouse, PropertySubTable/Room

when i try to query Property/Listing i get the above error
the code is right from the setup

$bulletin = $rets->Login();

$UC = "Matrix_Unique_ID";
$lc = "matrix_unique_id";
$Agent = "FullName";
$resource = "Agent";//Office works Agent works
$class = "Agent";
$query = "";
$results = $rets->Search(
    $resource,
    $class,
    $query,
    [
        'QueryType' => 'DMQL2',
        'Count' => 1, // count and records
        'Format' => 'COMPACT-DECODED',
        'Limit' => 99,
        'StandardNames' => 0, // give system names
    ]
);

any help would be VERY appreciated

Rusty Abbott

unread,
Dec 17, 2016, 1:09:16 AM12/17/16
to PHRETS
I use Matrix on a RETS version 1.5 and I'm pulling data successfully. I'm not a developer, but below is a portion of my code if it helps. What caused the most problems for me initially was the query. My MLS didn't support getting URL's, which threw me off for a while.

$connect = $rets->Login();
 
$system = $rets->GetSystemMetadata();
 
$resources = $system->getResources();
 
$classes = $resources->first()->getClasses();
 
$classes = $rets->GetClassesMetadata('Property');
 
$results = $rets->Search('Property', 'Listing', '(Status=A,BU,P,PC),(Area=1),(StreetName=Ocean),(StreetNumber=1456)', ['Limit' => 20]);
 
$total = $results->getTotalResultsCount();

Rusty Abbott

unread,
Dec 17, 2016, 1:14:33 AM12/17/16
to PHRETS
I just Googled "mfrmls" and noticed you're in Florida. Maybe we should chat? I'm in Stuart building a site that incorporates FlexMLS (Jupiter, Palm Beaches) and Matrix (Martin County). 772-538-8468 or abbott...@gmail.com

-Rusty Abbott


On Friday, December 16, 2016 at 6:20:46 PM UTC-5, Jerry Woods wrote:

Jerry Woods

unread,
Dec 17, 2016, 5:47:56 PM12/17/16
to PHRETS


On Friday, December 16, 2016 at 6:20:46 PM UTC-5, Jerry Woods wrote:
rusty, tried your code, same results. I am not intentionally sending a URL (not sure what rets is doing)
but thanks
any other suggestions welcome

Jerry
 

Gregg Moore

unread,
Dec 17, 2016, 6:24:30 PM12/17/16
to phr...@googlegroups.com
Connection error or having issues keeping connected. 

Sent from my iPhone
--
You received this message because you are subscribed to the Google Groups "PHRETS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phrets+un...@googlegroups.com.
To post to this group, send email to phr...@googlegroups.com.
Visit this group at https://groups.google.com/group/phrets.
For more options, visit https://groups.google.com/d/optout.

Gregg Moore

unread,
Dec 17, 2016, 6:26:23 PM12/17/16
to phr...@googlegroups.com
Yeah, MFR is intense. A lot of info. Overkill. 

Sent from my iPhone
--

Jerry Woods

unread,
Dec 23, 2016, 10:39:03 PM12/23/16
to PHRETS

take a look at these 2 queries

The first is successful and I can retrieve data.

The second one, identical to the first, except I am looking at Property/Listing instead of Agent/Agent fails with a 404 error.

 

First:

http://rets.mfrmls.com:80/contact/rets/search (Search) {"query":{"SearchType":"Agent","Class":"Agent","Query":"(Matrix_Unique_ID)","QueryType":"DMQL2","Count":1,"Format":"COMPACT-DECODED","Limit":5,"StandardNames":0},"headers":{"User-Agent":"UserAgent/1.0","RETS-Version":"RETS/1.7.2","Accept-Encoding":"gzip","Accept":"*/*","RETS-UA-Authorization":"Digest 247d734d1c748cd61916078e4c9e501b"},"cookies":"[object] (GuzzleHttp\\Cookie\\CookieJar: {})"} []

 

second:

http://rets.mfrmls.com:80/contact/rets/search (Search){"query":{"SearchType":"Property","Class":"Listing","Query":"(Matrix_Unique_ID)","QueryType":"DMQL2","Count":1,"Format":"COMPACT-DECODED","Limit":5,"StandardNames":0},"headers":{"User-Agent":"UserAgent/1.0","RETS-Version":"RETS/1.7.2","Accept-Encoding":"gzip","Accept":"*/*","RETS-UA-Authorization":"Digest 247d734d1c748cd61916078e4c9e501b"},"cookies":"[object] (GuzzleHttp\\Cookie\\CookieJar: {})"} []

 

Error message:

[23-Dec-2016 19:39:36 America/New_York] PHP Fatal error:  Uncaught exception 'GuzzleHttp\Exception\ClientException' with message 'Client error response [url] http://rets.mfrmls.com/contact/rets/search?SearchType=Property&Class=Listing&Query=%28Matrix_Unique_ID%29&QueryType=DMQL2&Count=1&Format=COMPACT-DECODED&Limit=5&StandardNames=0 [status code] 404 [reason phrase] Not Found' in /home1/jerrywoo/public_html/JWReal2/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:91


On Friday, December 16, 2016 at 6:20:46 PM UTC-5, Jerry Woods wrote:

Gregg Moore

unread,
Dec 24, 2016, 8:02:47 AM12/24/16
to phr...@googlegroups.com
Jerry,

Can you post the syntax for us to evaluate? Thanks!

Gregg Moore
Application Programmer/Web Developer
AT&T/iPhone :: 910.685.5055

Facebook :: facebook/GreggMoore23
Twitter :: MadRhino23

"Never trust a computer you can’t throw out a window."
Steve Wozniak

Jerry Woods

unread,
Dec 24, 2016, 3:46:14 PM12/24/16
to PHRETS
here is the code:

$UC = "Matrix_Unique_ID";
$lc = "matrix_unique_id";
$Agent = "";
$resource = "Property";//Office works Agent works
$class = "Listing";
$query = $UC;
$timestamp_field = 'ActiveStatusDate';
$property_classes = ['Listing']; 

/
$results = $rets->Search(
    $resource,
    $class,
    $query,
    [
        'QueryType' => 'DMQL2',
        'Count' => 1, // count and records
        'Format' => 'COMPACT-DECODED',
        'Limit' => 5,
        'StandardNames' => 0, // give system names
    ]
);

On Friday, December 16, 2016 at 6:20:46 PM UTC-5, Jerry Woods wrote:

Jerry Woods

unread,
Dec 24, 2016, 3:49:27 PM12/24/16
to PHRETS
code was there, what are you looking for?


On Friday, December 16, 2016 at 6:20:46 PM UTC-5, Jerry Woods wrote:

Gregg Moore

unread,
Dec 24, 2016, 8:06:15 PM12/24/16
to phr...@googlegroups.com
Remove the matrix unique from the query. Let me know what you get. 

I'll be able to look at it closer later this evening. 

Sent from my iPhone

Rusty Abbott

unread,
Dec 25, 2016, 12:31:01 PM12/25/16
to PHRETS
Here is a sample that works for me with Matrix RETS 1.5:


$results = $rets->Search('Property', 'Listing', '(Status=A,BU,P,PC),(Area=1),(StreetName=Ocean),(StreetNumber=1456)', ['Limit' => 20]);

Jerry Woods

unread,
Dec 25, 2016, 4:02:21 PM12/25/16
to PHRETS
how do i do that? not setting anything for that, that i know of
thanks for your time!!!!


On Friday, December 16, 2016 at 6:20:46 PM UTC-5, Jerry Woods wrote:

Jerry Woods

unread,
Dec 25, 2016, 4:13:29 PM12/25/16
to PHRETS
sorry, did not realize what you were referring to.
that is where i started out, no data in query. i added  the matrix unique field to see if it helped. it is the key field for the table. it is in all tables, sometimes upper case, sometimes lower case.
ANY help would be great!! does not make seance to me that i can get data from the other tables and not Property/Listing! same code, just change request.

if it would help i can setup 2 programs you can run from my website, one to Agent/Agent and one to Property/Listing with any dumps you would need.
thanks again for your time!!
Jerry


On Friday, December 16, 2016 at 6:20:46 PM UTC-5, Jerry Woods wrote:

Jerry Woods

unread,
Jan 5, 2017, 9:54:11 AM1/5/17
to PHRETS
I have checked my credentials on RetsMD and on RetsMD/auth. both are good. I can pull data from several other Tables. when I try from Property/Listing I get the following error message. My routine, posted earlier is the same, I just change the Resource and Class I am querying. I have talked with Rod at MFRMLS and he can pull data using my credentials. I am at my wits end.  Troy, if you read this, I would REALY appreciate a bit of guidance.

[05-Jan-2017 09:42:31 America/New_York] PHP Fatal error:  Uncaught exception 'PHRETS\Exceptions\RETSException' with message 'Unauthorized Query' in /home1/jerrywoo/public_html/JWReal2/vendor/troydavisson/phrets/src/Session.php:379
Stack trace:
#0 /home1/jerrywoo/public_html/JWReal2/vendor/troydavisson/phrets/src/Session.php(297): PHRETS\Session->request('Search', Array)
#1 /home1/jerrywoo/public_html/JWReal2/vendor/SmallSteps.php(169): PHRETS\Session->Search('Prpoerty', 'Listing', '', Array)
#2 {main}
  thrown in /home1/jerrywoo/public_html/JWReal2/vendor/troydavisson/phrets/src/Session.php on line 379

On Friday, December 16, 2016 at 6:20:46 PM UTC-5, Jerry Woods wrote:

Jerry Woods

unread,
Jan 6, 2017, 7:58:53 PM1/6/17
to PHRETS
I can pull Property  data from my PC using the CoreLogic RETS connector.
so i have accessibility 'remotely' but I need it from my host.


On Friday, December 16, 2016 at 6:20:46 PM UTC-5, Jerry Woods wrote:

Joe Corapi

unread,
Jan 29, 2017, 5:59:03 PM1/29/17
to PHRETS
Jerry....were you able to resolve this?  I'm running into the same issue.  

Troy Davisson

unread,
Jan 29, 2017, 6:12:05 PM1/29/17
to PHRETS

For anyone still experiencing this, if you could join our Slack channel (https://groups.google.com/d/msg/phrets/5gr467Jy2B0/Ryawl5bBBgAJ) and contact me there, I'd like to look into this further to see if I can narrow this down.


Jerry Woods

unread,
Jan 29, 2017, 7:45:20 PM1/29/17
to phr...@googlegroups.com

Not yet.

Have not had time to work on it in the past few weeks.

I will have time Wed and Thursday.

Troy sent me a link, I will follow up on it Wed morning.

 

 

Jerry Woods

La Rosa Realty LLC

321.689.0597

 

Jerry.Wo...@gmail.com

jerrywoodsrealestate.com

--
You received this message because you are subscribed to a topic in the Google Groups "PHRETS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/phrets/nK4QRbWW7bo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to phrets+un...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages