Ask Your Question
0

GetObject Property Photos Timeout

asked 2021-06-18 13:40:37 -0500

Hello,

I am using the PHRETS library and am able to query a filtered list of properties using the standard "Search" method on the PHRETS Session class, however when I try and fetch photos for each property using the "GetObject" method the request becomes unresponsive for anything more than 5 properties.

$photos = $session->GetObject('Property', 'Photo', $propertyId, '*');

Is there a way to batch these photo requests to make the query faster. We are trying to sync down ~40 properties and can only get images for ~5 properties at a time before the request times out. Our request timeout for Apache and PHP is set to 600 seconds.

Requesting only the properties w/o images returns a response in less than a few seconds. Is this a problem w/ the RETS server or is there anything I can do to help speed up the response times when querying photos for properties? I have used this identical code for other RETS servers w/o issue on a similar number of properties.

Please let me know if I can provide additional detail to help troubleshoot this.

Thanks, Trevor

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-07-01 16:25:49 -0500

There are several ways to do this:
1. Media Resource search. This will return the image URLs for a listing. Then the URLs can be used to download the images if you need a local copy. This is the preferred method.
2. GETOBJECT Location=1. This will return the image URLs which can then be used to download the images if you need a local copy. You should be able to include multiple Listing IDs when getting the URLs without timeouts.
3. GETOBJECT Location=0 or not specified. This returns the actual image file. This method will probably go away sometime in the future to allow us to better support caching schemes. If you pull all images for a listing, you are probably best doing it one Listing at a time since they can have many images and sizes can vary.

edit flag offensive delete link more

Comments

Thanks bwolven. Adding Location=1 allows us to reference the URL externally which significantly increased the response time of our interaction w/ the RETS server. Appreciate the help!

trevor gravatar imagetrevor ( 2021-07-07 13:19:54 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2021-06-18 13:40:37 -0500

Seen: 135 times

Last updated: Jul 01 '21