Photo location (URL) possible w/ CRMLS ?

1,200 views
Skip to first unread message

RBG

unread,
Apr 6, 2014, 7:58:52 PM4/6/14
to phr...@googlegroups.com
I've just started working with CRMLS - http://www.crmls.org/

I can retrieve image data using GetObject, but when specifying GetObject's 5th parameter as 1, I still get the same data type response. I know URLs are optional, but wondering if anyone knows if there is another way to get the URL? It wouldn't be the end of the world if I had to store the images on a server, but having URLs is so much easier. Also, even for thumbnails, the response time is slow, at least a full second and a half. I'd could probably just set up a cron to pull in the data every 30 to 60 mins so site visitors don't see any lag, but when working with this RETS server everything else I do has an almost immediate response time.

I use GetMetadataTable on the "media" resource and it's "media" class, I do see an indication that URLs might be stored:

# "media" resource
Array
(
 [description] => description
 [matrix_unique_id] => matrixuniqueid
 [MediaURL] => MediaURL
 [modifieddate] => modifieddate
 [order] => order
 [originalfilename] => originalfilename
 [size] => size
 [table_id] => tableid
 [table_mui] => tablemui
 [type] => type
 [uploaddate] => uploaddate
)

So why this weird need for a special object query? Can't we query this media class? I've never worked with such a bone-headed feed.

If anyone else uses this CRMLS RETS server and has some tips regarding this issue, or any other CRMLS specific issues, I'd really appreciate your insight. So far I can successfully get my broker's listings and images, so I've got the basics covered. I would like to eventually upload listings and delete listings using PHRETS, or an extension of PHRETS.

Grace Lau

unread,
Jul 22, 2014, 6:50:32 AM7/22/14
to phr...@googlegroups.com
HI RBG, 

Have you had any luck with this? I've been trying to contact the CRMLS support team but they've been unresponsive and I'm not getting anywhere with them. 

I've been able to download images, but like you said, it's a lot. 

Any advice?

Thanks

Obi-Wan

unread,
Aug 18, 2014, 1:19:28 PM8/18/14
to phr...@googlegroups.com
I got same issue and I'm still waiting for the response.
Thanks

Mark Spraker

unread,
Aug 18, 2014, 3:47:03 PM8/18/14
to phr...@googlegroups.com
The CRMLS RETS server does not support GetObject like the CARETS server did. You can get the url's and the order with this sample PHRETS query:

$search_photos = $rets->SearchQuery("Media","Media","(ClassKey=6725601)", array('Limit' => 'none', 'Select' => "MediaOrder,MediaURL"));

The ListingKey corresponds to the ClassKey and the main photo is MediaOrder 0. You can either use the urls or a Curl script to download the photos from the urls. I have not tried using the Curl built into PHRETS to do this as was done with GetObject.

Mark S


--
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 http://groups.google.com/group/phrets.
For more options, visit https://groups.google.com/d/optout.


Mark Spraker

unread,
Aug 20, 2014, 2:02:02 AM8/20/14
to phr...@googlegroups.com
IMPORTANT TIP TO GET PHOTO URLS FROM CRMLS - I noticed that I was getting some PDFs included with the photo url query responses so I have modified the query to request only images:

$search = $rets->SearchQuery("Media","Media","(ClassKey=639422), (MediaType=Image)", array('Limit' => 'none', 'Select' => "MediaOrder,MediaURL"));

This property has a PDF in the first position so without the (MediaType=Image) you will see it in the response.

Mark S

Damon Casale

unread,
Sep 1, 2014, 11:53:48 AM9/1/14
to phr...@googlegroups.com, marks...@sbcglobal.net
I'm attempting to query the Media table for CRMLS and can't.  Instead of querying by Listing Key, I'm attempting to retrieve all of the most recent photos, and not using a Select either.  But, the CURL request never returns.

Have you experienced anything similar?

Damon

Mark Spraker

unread,
Sep 1, 2014, 3:52:23 PM9/1/14
to phr...@googlegroups.com
You must have the ListingKey, you can query for recent data first then run the ListingKeys you get. I use the above query when I loop through the most recent properties to add to the database. The photo URL's are then added to an additional field for each property. If you want to download the photos you might want to get all recent ListingKeys first then run a curl script to to go to each URL and get the photo.

Using the photo links rather then storing all the photos seems to be working out pretty well. The CRMLS server is generally pretty fast. Once in a while I get a broken link or it slows somewhat but not too often.

Mark S

Damon Casale

unread,
Sep 1, 2014, 4:48:16 PM9/1/14
to phr...@googlegroups.com
Mark, are you saying that because that's what you've been able to get to work, or because you've been told this by CRMLS support?  (Assuming CRMLS support actually exists, that is.)

I'm asking because my client would really prefer to download photos using GetObject, and we can't figure out what type to use (e.g., Photo).

Damon


--
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/ZzIRMvEoBC4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to phrets+un...@googlegroups.com.

Mark Spraker

unread,
Sep 1, 2014, 5:20:48 PM9/1/14
to phr...@googlegroups.com
I have been told by tech support that GetObject is not supported. You have to query the media class to get the URL's. This actually ends up working better than the CARETS server that CRMLS used previously. I always had a problem with CARETS GetObject not getting all the photos. Sometimes it would send 4 out of 30 for example or none at all.

Mark S

Azaz Khan

unread,
Oct 30, 2014, 1:31:17 PM10/30/14
to phr...@googlegroups.com, marks...@sbcglobal.net
I am using phRETS and now GetObject is not working. can you please tell me how to pull listings Using ListingID?

Abhinandan Dev

unread,
Oct 25, 2017, 11:13:10 AM10/25/17
to PHRETS
Hi please tell me where to get ClassKey?

Nick Balistreri

unread,
Jun 13, 2018, 3:05:22 PM6/13/18
to PHRETS
I am confused by this.  I know this post was roughly 4 years ago but when i var_dump a media the only common denominator with a property is the "OfficeMLSID" There is no "Listing Key"
Reply all
Reply to author
Forward
0 new messages