Im teaching myself scraping with php using curl and im at a standstill trying to figure how to make the script click a JavaScript activated link. For example looking here http://www.tvduck.com/How-I-Met-Your-Mother.html How do i tell the script to click <a name="S1E1" rel="nofollow" href="#" onclick="javascript:updateElement('62224',''); return false;">Season 1, Episode 1: Pilot</a> so that it shows the underlying links?
Generally you can't tell php script to click that link using curl. But you can examine that javascript by hand and see what it does and then emulate it in php
You should check definition of javascript function updateElement. Mainly, it makes an ajax call to http://www.tvduck.com/thescript.php?rnd=' + Math.random()*4 + '&el_id=' + el_id + '&action=action where Math.random() is for making a url unique for avoiding cache. el_id is the id of the element passed into function. action is a static parameter valued 'action' Hope above helps.