well I am triying to do something easy at first sight...
I am makeing a project and I want to send an email for my own website... on the host I have a php file call sendMail.php and I want to run it when the sensor on my arduino detect something... I dont know the function to do it... may someone help me?
If all you want to do is send an email, I see no reason to have to run a php file. Take a look at this project. I haven't tried it but it seems like it might work. If this doesn't work for you, just look it up on google!
php does not run on Arduinos. You will have to get your Arduino to send some kind of signal to your PC, which then picks it up and runs that php program for you.
If you already have your php file, sendMail.php, working and running on an HTTP server; all you have to do is make an HTTP GET request to its URI when your sensor is triggered.
I use the ESP8266 and ESP32 as my microcontroller. A simple HTTP GET request example can be found at Espressif's Github.