Viewing entries tagged

PHP ARD (Apple Remote Desktop) Import List Generator


PHP ARD (Apple Remote Desktop) Import List Generator

In the past, adding new computers to Apple Remote Desktop has been through either Bonjour discovery (local subnet) or scanning IP address ranges. These methods work great until you have hundreds of Macs and your ARD computer list starts to become out of sync from your colleagues.

Since we keep an asset database tracking our Mac's hostnames and last known IP addresses, I have written a PHP function for generating an ARD friendly import file.

You can find the source code on GitHub here.

This function only requires a filename and an array of Mac's with their hostname and last known IP address. Examples of these are included at the top of ardgen.php. With very little work, this script could be integrated into any database containing Mac's with their recent IP addresses.

An earlier version of this function also included device MAC addresses. However, during a migration to a new database, MAC address information was not ported over, therefore the optional MAC address data was removed from the plist generation. If you have access to the MAC addresses of your computers it is worth including it in the plist.

How to import an ARD import list file

Open Apple Remote Desktop and click 'File' > 'Import List...'

Select your newly created plist file.

Assuming all your Mac's use the same Remote Management user account, uncheck 'Verify user name and password before adding' and then click 'Add.'

With a single import, all your Macs are now in ARD!


Turn Your Mac into a PHP Web Server In Under 10 Seconds


Turn Your Mac into a PHP Web Server In Under 10 Seconds

In almost no time at all this post will have your Mac up and running as an Apache 2 web server with PHP support. It's great for those that want to set-up a local web development environment to code that quick web app idea.


I have tested the following steps on Mac OS X Lion (10.7), OS X Mountain Lion (10.8) and OS X Mavericks (10.9).


Step 1: Enable PHP in the Apache configuration file

Open Terminal (/Applications/Utilities/Terminal) and type: 

sudo nano /etc/apache2/httpd.conf

Hit return and type your password. Don’t worry if it looks like you are not typing anything, it's just Terminal hiding your password input for added security.

To search the document press control + w, type 'php' and hit return.


You'll need to uncomment (remove the leading #) the php5_module.



To save changes press control + x, type y and hit return.

Step 2: Start up Apache


sudo apachectl restart

Step 3: Test it out

Open Safari and type 'localhost' into the address bar. You should see:

This is the default web page that comes with Apache.

This is the default web page that comes with Apache.

Open Finder and click 'Go' → 'Go to Folder…'


Type “/Library/WebServer/Documents/“ and click 'Go.'

Tip: You can press ‘ tab ’ to autocomplete folder names.

Tip: You can press ‘tab’ to autocomplete folder names.



This index.html file is the “This works!” web page you saw in the last step. Go ahead and edit index.html in your favourite text editor. I like to use Coda 2 (bit pricey) for my web development projects, but you could use any text editor. Before Coda 2 I was using Smultron and Notepad++, which are much cheaper. Once you have made a change refresh the page in Safari to see your changes.