solo_400:
Can you help me please with basic php code in order to do that ?
No, not really, since you've not given us the "custom script" code, nor told us anything about it.
But here's what you need to do it yourself:
solo_400:
I have a custom php script that automatically create and send the newsletter
Does this custom script work inside Zen Cart and use the Zen Cart email templates? If so, simply make sure your email template has $UNSUBSCRIBE_LINK in it, and it will be converted into the correct link.
If your "custom script" doesn't know anything about Zen Cart, then you'll need to manually add your own link into it yourself:
index.php?main_page=unsubscribe&addr=PUT_THEIR_EMAIL_ADDRESS_HERE