the-joker Posted September 9, 2018 Share Posted September 9, 2018 Hello i am trying to code an script php ( Auto Book appointment ) So i Connected with the target website with this Code Source . <?php $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_URL, 'https://example.com/login/login.php'); curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookie.txt'); curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt'); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); $co = curl_exec($ch); $doc = new DOMDocument(); libxml_use_internal_errors(true); $doc->loadHTML($co); $xpath = new DOMXPath($doc); $val1 = $xpath->query('//input[@name="_sid"]/@value')->item(0)->nodeValue; echo $val1; $field['process'] = 'login'; $field['_sid'] = $val1; $field['email'] = 'email@email.com'; $field['pwd'] = '123456'; $datafield = http_build_query($field); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookie.txt'); curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt'); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $datafield); curl_setopt($ch, CURLOPT_VERBOSE, true); curl_exec($ch); curl_setopt($ch, CURLOPT_URL, 'https://example.com/login/myapp.php?id=5454654'); $cur = curl_exec($ch); echo $cur; curl_close($ch); ?> Now i have to Search on the Calender an available date and click ON it Thene Click ON the POP up to confirm the appointement . So How can i do this action ? this is a part of Calender : this 1 st part with FULL dates <li class="overable initialised">2018-09-14 <a class="full" type="button">08<i>:30</i></a> <a class="full" type="button">08<i>:45</i></a> <a class="full" type="button">09<i>:00</i></a> <a class="full" type="button">09<i>:15</i></a> <a class="full" type="button">09<i>:30</i></a> <a class="full" type="button">09<i>:45</i></a> <a class="full" type="button">10<i>:00</i></a> <a class="full" type="button">10<i>:15</i></a> <a class="full" type="button">10<i>:30</i></a> <a class="full" type="button">10<i>:45</i></a> <a class="full" type="button">11<i>:00</i></a> <a class="full" type="button">11<i>:15</i></a> <a class="full" type="button">11<i>:30</i></a> <a class="dispo" type="button" href="javascript:void(0)" onclick="ajaxCall("ajax_form_status", "https://example.com/login/action.php?timestamp=1536452615.5094&skey=90f7a8877d1accee20e413dd209ea029&process=multiconfirm&what=take_appointment&fg_id=5274725&result=2018-09-14+11%3A45&issuer_view=tnTUN2fr")">11<i>:45</i></a> <a class="full" type="button">12<i>:00</i></a> <a class="full" type="button">12<i>:15</i></a> <a class="full" type="button">12<i>:30</i></a> <a class="full" type="button">13<i>:00</i></a> <a class="full" type="button">13<i>:15</i></a> <a class="dispo" type="button" href="javascript:void(0)" onclick="ajaxCall("ajax_form_status", "https://example.com/login/action.php?timestamp=1536452615.5096&skey=3ab72b245127e591ba1d0db8afd08fb1&process=multiconfirm&what=take_appointment&fg_id=5274725&result=2018-09-14+13%3A30&issuer_view=tnTUN2fr")">13<i>:30</i></a> <a class="dispo" type="button" href="javascript:void(0)" onclick="ajaxCall("ajax_form_status", "https://example.com/login/action.php?timestamp=1536452615.5098&skey=dcd416fa984f755cf9e55e503942220d&process=multiconfirm&what=take_appointment&fg_id=5274725&result=2018-09-14+13%3A45&issuer_view=tnTUN2fr")">13<i>:45</i></a> <a class="dispo" type="button" href="javascript:void(0)" onclick="ajaxCall("ajax_form_status", "https://example.com/login/action.php?timestamp=1536452615.51&skey=8f41ad6700c58d4308fb836cc474c6f1&process=multiconfirm&what=take_appointment&fg_id=5274725&result=2018-09-14+14%3A00&issuer_view=tnTUN2fr")">14<i>:00</i></a> <a class="dispo" type="button" href="javascript:void(0)" onclick="ajaxCall("ajax_form_status", "https://example.com/login/action.php?timestamp=1536452615.5102&skey=9ff4540d8cdf1fc8f0b22e9786d059dd&process=multiconfirm&what=take_appointment&fg_id=5274725&result=2018-09-14+14%3A15&issuer_view=tnTUN2fr")">14<i>:15</i></a> <a class="dispo" type="button" href="javascript:void(0)" onclick="ajaxCall("ajax_form_status", "https://example.com/login/action.php?timestamp=1536452615.5104&skey=3e58332ea1a132cbe2e00a17017ba5d8&process=multiconfirm&what=take_appointment&fg_id=5274725&result=2018-09-14+14%3A30&issuer_view=tnTUN2fr")">14<i>:30</i></a> <a class="dispo" type="button" href="javascript:void(0)" onclick="ajaxCall("ajax_form_status", "https://example.com/login/action.php?timestamp=1536452615.5106&skey=c02c797479820694f40edd05dbc98a99&process=multiconfirm&what=take_appointment&fg_id=5274725&result=2018-09-14+14%3A45&issuer_view=tnTUN2fr")">14<i>:45</i></a> <a class="dispo" type="button" href="javascript:void(0)" onclick="ajaxCall("ajax_form_status", "https://example.com/login/action.php?timestamp=1536452615.5108&skey=d6d652cbcde371221550cd466d227259&process=multiconfirm&what=take_appointment&fg_id=5274725&result=2018-09-14+15%3A00&issuer_view=tnTUN2fr")">15<i>:00</i></a> <a class="dispo" type="button" href="javascript:void(0)" onclick="ajaxCall("ajax_form_status", "https://example.com/login/action.php?timestamp=1536452615.511&skey=02670bb010e3f9503dcd3df6a5f914a6&process=multiconfirm&what=take_appointment&fg_id=5274725&result=2018-09-14+15%3A15&issuer_view=tnTUN2fr")">15<i>:15</i></a> <a class="dispo" type="button" href="javascript:void(0)" onclick="ajaxCall("ajax_form_status", "https://example.com/login/action.php?timestamp=1536452615.5112&skey=b9fd49cfe1dee68f84cad7b941358cb8&process=multiconfirm&what=take_appointment&fg_id=5274725&result=2018-09-14+15%3A30&issuer_view=tnTUN2fr")">15<i>:30</i></a> <a class="dispo" type="button" href="javascript:void(0)" onclick="ajaxCall("ajax_form_status", "https://example.com/login/action.php?timestamp=1536452615.5114&skey=c98b90cd33f13068217484b7af669a8e&process=multiconfirm&what=take_appointment&fg_id=5274725&result=2018-09-14+15%3A45&issuer_view=tnTUN2fr")">15<i>:45</i></a> <a class="dispo" type="button" href="javascript:void(0)" onclick="ajaxCall("ajax_form_status", "https://example.com/login/action.php?timestamp=1536452615.5116&skey=8c38d3c3353d46958f09734ed1306820&process=multiconfirm&what=take_appointment&fg_id=5274725&result=2018-09-14+16%3A00&issuer_view=tnTUN2fr")">16<i>:00</i></a> <a class="dispo" type="button" href="javascript:void(0)" onclick="ajaxCall("ajax_form_status", "https://example.com/login/action.php?timestamp=1536452615.5118&skey=3e6ecdf78f138930b7dd286cb852aade&process=multiconfirm&what=take_appointment&fg_id=5274725&result=2018-09-14+16%3A15&issuer_view=tnTUN2fr")">16<i>:15</i></a></li> This part with Availble dates : <li class="overable initialised">2018-09-18 <a class="dispo" type="button" href="javascript:void(0)" onclick="ajaxCall("ajax_form_status", "https://example.com/login/action.php?timestamp=1536452615.5155&skey=c51070edf5580d9f244ee811ab3890d8&process=multiconfirm&what=take_appointment&fg_id=5274725&result=2018-09-18+08%3A30&issuer_view=tnTUN2fr")">08<i>:30</i></a> <a class="dispo" type="button" href="javascript:void(0)" onclick="ajaxCall("ajax_form_status", "https://example.com/login/action.php?timestamp=1536452615.5285&skey=f7f7bfabe5c772e74dd94d69a9a9de6e&process=multiconfirm&what=take_appointment&fg_id=5274725&result=2018-09-18+16%3A15&issuer_view=tnTUN2fr")">16<i>:15</i></a></li> thank you for orienting me I am waiting . 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.