How to write a script for Adding the lead from another website while submitting the details

I want to add the lead, But the details of the lead are coming from another website while entering the details like name, email, mobile no… etc., and submit.

For this I want to write a script, Could you give any solution for this

You said details are coming from another website, is it a frappe site or entire different site. If another website is not a frappe site then 2 questions,

  1. Does other website has api to access lead details, if yes you will simply call api.
  2. If other website doesnt have api, you may choose to scrap the data (not a good option though).

Once you have above information, then you can move forward.