{"action":"opened","issue":{"url":"https://api.github.com/repos/troydavisson/PHRETS/issues/67","labels_url":"https://api.github.com/repos/troydavisson/PHRETS/issues/67/labels{/name}","comments_url":"https://api.github.com/repos/troydavisson/PHRETS/issues/67/comments","events_url":"https://api.github.com/repos/troydavisson/PHRETS/issues/67/events","html_url":"https://github.com/troydavisson/PHRETS/issues/67","id":81098753,"number":67,"title":"PHRETS issue/question: Using PHP to download real estate listing photos","user":{"login":"r-interactive","id":12615722,"avatar_url":"https://avatars.githubusercontent.com/u/12615722?v=3","gravatar_id":"","url":"https://api.github.com/users/r-interactive","html_url":"https://github.com/r-interactive","followers_url":"https://api.github.com/users/r-interactive/followers","following_url":"https://api.github.com/users/r-interactive/following{/other_user}","gists_url":"https://api.github.com/users/r-interactive/gists{/gist_id}","starred_url":"https://api.github.com/users/r-interactive/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/r-interactive/subscriptions","organizations_url":"https://api.github.com/users/r-interactive/orgs","repos_url":"https://api.github.com/users/r-interactive/repos","events_url":"https://api.github.com/users/r-interactive/events{/privacy}","received_events_url":"https://api.github.com/users/r-interactive/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-26T19:19:57Z","updated_at":"2015-05-26T19:19:57Z","closed_at":null,"body":"When using PHP to download real estate listing photos to the server, does it automatically update or replace the old/current photo with the new photo from the MLS to my server. \r\nIf it does, it's not working for me. \r\n\r\nmy current code to grab the listing photos to my server:\r\n\r\n\tif($rets->TotalRecordsFound() > 0) {\r\n\t\twhile($data = $rets->FetchRow($search)) {\r\n\r\n\t\t\t$listing_id = $data['sysid'];\r\n\t\t\t$n = 1;\r\n\t\t\t\r\n\t\t\t$photos = $rets->GetObject('Property', 'Photo', $listing_id);\r\n\t\t\t\r\n\t\t\tforeach($photos as $photo) {\r\n\t\t\t\tif ($photo['Success'] == true) {\r\n\t\t\t\t\tfile_put_contents('photos/'.$listing_id.'-'.$n.'.jpg', $photo['Data']);\r\n\t\t\t\t}\r\n\t\t\t\t$n++;\r\n\t\t\t}\r\n\t\t\t$rets->FreeResult($photos);\t\t\t\r\n\t\t}\r\n\t\techo \"Collected All data successfully\";\r\n\t} else {\r\n\t\techo '0 Records Found';\r\n\t}\r\n"}}