script for getting link from charge code