If you're new to PHP, here is a simple parody of Diffie-Hellman expressivity using for loops to get you started. Conversion to a bash script will not be very difficult and you'll be selling 'strong' encryption in no time! :)
<span style='font-family: monospace; font-size: 13px;'>
<?php
//...