How to make a function that fetch data from another website with click button

I want to make a function same like this: Check GEPCO Online Bill - Duplicate GEPCO Bill
it was created in php but now i want to shift in python. i’m new in python so i have no idea how to do it.