"I have implemented it with Perl code in the past and with php code as well."
Yes I see your previous reaped request for python help on this very topic. Consider reading How do I post a question effectively? since as usual, it seems you have problems actually asking questions that people can understand, without others having to ask you several questions for clarification.