I'm writing a php script for a php callback in a standard page. There is a circumstance where I need to send an alert to me to let me know of a particular situation.
Is there a quick way to send an alert to my account?
This assumes you are using an existing content type which handles alerts.
If you wish to send alerts for custom types then you will need to create an add-on which fetches and displays your own content.
The simplest example would be to take a look at my Thread Ban add-on where I use alerts for my custom content type.
There is no alert function that will send any old text to a particular user.
If you want to notify a user about certain actions that exists in the system (such as replying, editing etc.) then you can use the default alert system by calling the alert function with appropriate action and content type.
Otherwise, to send an alert for your own 'action' you will need to create your own content type and alert handler. The alert handler fetches the content (if exists) and displays it together with the alert action.