public function main ($url) { //this method uses to launch the class object $agent=new EmailAgent(); $this->geturl=$url; $data=$agent->getData($this->geturl); $agent->emailGrabber($data); }
<?php //the file what implemented the class EmailAgent include_once ("EmailAgent.inc.php"); $agent=new EmailAgent(); $agent->main("http://localhost/oop/extract_emails.html"); ?>