perform clicks and logout of website using cURL and php -
i used curl login website. natural question how perform clicks on buttons , logout. example..javascript uses click() function. php use? clues. i following book on web scraping. in author logins it's publishers website. book old , out of date. more over, says nothing logging out. publisher: https://www.packtpub.com/ you can't click button using php alone. php doesn't work that. php can download html of webpage, can't perform actions browser can. if want that, need headless browser. headless browser typically seen invisible browser. can things regular browser can do. there's phantomjs , , casperjs , this. there php libraries use phantomjs. example php phantomjs . personally, i've never done php, use phantomjs , casperjs on regular basis. alternative that, can php parse dom links, or buttons, , replicate http request that's made when clicking links/buttons. for example, if there's link goes /contactus , create request page using curl...