I believe I have figured it out. I don't have my entire file finished yet so I haven't tested it, but here goes:
Basically, I would run some code to establish the OS of the client and pass that to $client_os. $output recieves the dump from the ipconfig/ifconfig command. $mac_pos determines the point right before the MAC address and then the substr() function throws it to $client_mac. Sounds good to me in theory. If anyone sees something I missed, please feel free to comment.