span style="color: #0000BB"><?php$id=(int)$_GET['id'];$header[]='Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5';$header[]='Connection: Close';$header[]='Accept-Charset: iso-8859-1, utf-8, utf-16, *;q=0.1';$header[]='Accept-Language: ru-RU,ru;q=0.9,en;q=0.8';$header[]='User-Agent: Opera/10.54';$header[]='Cookie: informsan_front='.preg_replace('/[^a-zA-Z0-9]/','',$_COOKIE['informsan_front']);$curl = curl_init('https://www.swblife.com/profile/survey/id/'.$id.'/');$post=(($_POST['submit_btn'])?$_POST:'');//var_dump($post);curl_setopt($curl, CURLOPT_POST, true);curl_setopt($curl ,CURLOPT_POSTFIELDS, $post);curl_setopt($curl, CURLOPT_HTTPHEADER, $header);curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);curl_setopt($curl, CURLOPT_HEADER, true);curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);$f = curl_exec($curl);curl_close($curl);$g=$f;$f=explode('<h4>Заполнение анкеты',$f);$f=explode('</h4>',$f[1]);echo '<b>Заполнение анкеты'.$f[0].'</b><br>';$f=explode('</form>',$f[1]);$credit=explode('<div id="survey-credit">',$f[0]);$credit=explode('</div>',$credit[1]);echo $credit[0].'<hr>';unset($credit);$bil=explode('<div>Билет',$f[0]);$bil=explode('</div>',$bil[1]);echo '<div>Билет'.$bil[0].'<hr>';unset($bil);$question=explode('name="survey[question]" value="',$f[0]);$question=explode('" />',$question[1]);echo'<form action="go.php?id='.$id.'" method="post"><input type="hidden" name="survey[question]" value="'.$question[0].'" />';$radio=explode('<ul class="radio_list">',$f[0]);$radio=explode('</ul>',$radio[1]);$radio=explode('`|||:|||`',preg_replace('/.*?value="([0-9]*)".*?<label.*?">(.*?)<\/label>/si','$1`,:|:,`$2`|||:|||`',$radio[0]));$c=count($radio)-1;for($i=0; $i<$c; ++$i){$bufer=explode('`,:|:,`',$radio[$i]);echo '<input type="radio" name="survey[answer]" value="'.$bufer[0].'" /> '.$bufer[1].'<br>';unset($bufer);}echo'<input type="submit" name="submit_btn" value="отправить" /></form>'; |