Jump to content

Recommended Posts

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.