Quicksdk Posted June 29, 2012 Report Share Posted June 29, 2012 вообщем нужно изменить данный код <form method="POST" accept-charset="utf-8" id="siteheart_button_501108" action="https://siteheart.com/webconsultation/501108?devisions=all" target="siteheart_button_501108"><input type="hidden" name="_charset_"><input type="hidden" name="data[your_name]" value="your_value"> <img src="__webindicator.siteheart.com/webindicator/help11?ent=501108&company=501108" border="0" style="cursor:pointer;" alt="SiteHeart" onclick="window.open('about:blank','siteheart_button_501108','width=500,height=400,resizable=1') ;document.getElementById('siteheart_button_501108').submit();"/> </form> который будет расположен на html страничке siteheart.html так чтобы он был активным без нажатия, т.е. если человек перешел на siteheart.html сразу срабатывал этот код. такое возможно? Quote Link to comment Share on other sites More sharing options...
_Dark_ Posted June 30, 2012 Report Share Posted June 30, 2012 Можно отправить POST запрос средствами PHP, тогда при открытии страницы siteheart.php будет отправлен запрос. Quicksdk 1 Quote Link to comment Share on other sites More sharing options...
Quicksdk Posted June 30, 2012 Author Report Share Posted June 30, 2012 Можно отправить POST запрос средствами PHP, тогда при открытии страницы siteheart.php будет отправлен запрос. а что тогда нужно дописать? Quote Link to comment Share on other sites More sharing options...
_Dark_ Posted June 30, 2012 Report Share Posted June 30, 2012 <?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://siteheart.com/webconsultation/501108?devisions=all'); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, 'a=b'); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30); $data = curl_exec($ch); curl_close($ch); ?> [/CODE] Я так понял, что data[your_name] и your_value откуда-то берутся, так что вместо a=b в коде, надо написать значение data[your_name] и your_value соответственно. Для работы скрипта необходим cURL. CNoise 1 Quote Link to comment Share on other sites More sharing options...
Quicksdk Posted June 30, 2012 Author Report Share Posted June 30, 2012 __pro-ucheba.com/siteheart.html Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.