Php and asterisk

Hi
i want to make a webpage which wil call a number and hangup when i want to it like

Click to call

end call

i want to use php how can i use php to do this
i am new to this so please tell me, not how it could be done, i want to know where to start to make such application.

thanks

bye

You will need PHP AGI: phpagi.sourceforge.net/
as well as connect with your scripts to the asterisk AMI:
voip-info.org/wiki/view/Asterisk+manager+API