lihman Posted August 31, 2009 Share Posted August 31, 2009 I need php cURL to click a button repeatedly but the button has nothing to do with a form, it is all javascript. <script type="text/javascript"> function set_opacity(id, opacity) { element = document.getElementById(id) if (/MSIE/i.test(navigator.userAgent)) { element.style.filter='alpha(opacity='+opacity+')'; } else { element.style.opacity = opacity/100; } } </script> <table cellspacing="0" width="100%"> <tr> <td class="center"> <h4 class="strong"> 1 / 375 clicked today </h4> <p> <script type="text/javascript"> //<![CDATA[ recruiter_clicks = 1 //]]> </script><a href="/recruiter/recruit/28cs5n4qu339k" id="recruit_link" onclick="return(submit_link_as_post_with_opacity(this, 'recruit_image'))"><img alt="" class="btn button_recruit" id="recruit_image" src="/A.gif?1221518016" /></a><script type="text/javascript"> //<![CDATA[ link = document.getElementById('recruit_link'); link_href = link.href; link.href = "#"; set_opacity('recruit_image', 50); setTimeout("link = document.getElementById('recruit_link'); link.href = '" + link_href + "'; recruiter_clicks = 0; set_opacity('recruit_image', 100)", 2000); //]]> </script> </p> According to TamperData, the POSTDATA for every click is: POSTDATA=Content-Type: application/x-www-form-urlencoded Content-Length: 0 The text after /recruiter/recruit/ always changes. For example, in the code above it is /recruiter/recruit/28cs5n4qu339k but that is not always the case. Link to comment https://forums.phpfreaks.com/topic/172597-php-curl-javascript-button/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.