Appcast php example

Hi All,

I just released my first stacks last week and am now getting round to try and set them up for automatic updates. It looks like most developers point the SUFeedURL to a php file instead of the xml file. I guess that is just to hide the xml file from view? The php file generally contains a message advising the user that they shouldn’t be there and that they can get the stacks/updates elsewhere etc.

Would anyone be willing to share a copy of their php file so that I can see how to set it up and point that to my xml file?

Also - if going with the php approach is there the same need to use the secure stack API?

Many thanks,


Perfect! Thanks @instacks

1 Like

Thanks again for this @instacks. I seem to have got it working for my 2 stacks.

Just wanted to check though…in the log is an ‘update’ simply a successful check whether there is an available update as opposed to the stack actually being updated? And we therefore should see the same ip repeated each day (that they opened RW) with an ‘update’ attempt for each stack.

Yes, exactly, it’s an update check.

1 Like

@instacks You use the PHP setup outlined above? What about all of that IP address logging? :stuck_out_tongue_winking_eye:


I am not using this version of the appcast. I have an adapted version, which does not log the IP address

Re: GDPR, this made me chuckle…


I’ve just tweaked the php code now too to anonymise the ip. For anyone that might want to do the same here is how I did it (this just replaces the last 2 parts of the IP with 0.0):

function log_connection($prepend) {
	global $stacks_api;
	$ip_parts = explode (".", $_SERVER['REMOTE_ADDR']);
	log_line($prepend.' '. strval($ip_parts[0]) . '.' . strval($ip_parts[1]) . '.0.0' .' USER_AGENT:'. $_SERVER['HTTP_USER_AGENT'] .' StackAPIVersion: '. strval($stacks_api));