curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_REFERER, $reffer); curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path); curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path); $result = curl_exec($ch); curl_close($ch); $regexp = "<input type=hidden name=f value=\"(.*)\">"; $matches = regexp($result, $regexp); if (!empty($matches[0][1])) { $f = $matches[0][1]; } $regexp = "<input type=hidden name=data value=\"(.*)\">"; $matches = regexp($result, $regexp); if (!empty($matches[0][1])) { $data = $matches[0][1]; } if (!empty($f) && !empty($data)) { ?> <form name=G><input type=hidden name=f value="<?php echo $f; ?> "><input type=hidden name=data value="<?php echo $data; ?> "> <input type=hidden name=boardprefs value=''> </form> <script language="javascript">
$matches2 = regexp($v[0], $regexp2); $data['haircolor'][] = $matches2[0][1]; $regexp2 = '<b>Height: <\\/b>(.*)<br>'; $matches2 = regexp($v[0], $regexp2); $data['height'][] = $matches2[0][1]; $regexp2 = '<b>Weight: <\\/b>(.*)<br>'; $matches2 = regexp($v[0], $regexp2); $data['weight'][] = $matches2[0][1]; $regexp2 = '<b>Marks\\/Scars\\/Tattoos: <\\/b>(.*)<br>'; $matches2 = regexp($v[0], $regexp2); $data['marks'][] = $matches2[0][1]; $regexp2 = '<b>Ethnicity: <\\/b>(.*)<br>'; $matches2 = regexp($v[0], $regexp2); $e = $matches2[0][1]; $regexp2 = '<b>Race: <\\/b>(.*)<br>'; $matches2 = regexp($v[0], $regexp2); $r = $matches2[0][1]; $data['ethnicity'][] = !empty($e) ? $e : $r; $data['city'][] = 'Fremont'; $data['state'][] = 'California'; $data['country'][] = 'US'; } } $newData = array(); foreach ($data as $k => $v) { foreach ($v as $k1 => $v2) { $newData[$k1][$k] = $v2; } } $sql = ''; if (!empty($newData)) {
} else { if (preg_match_all("/{$regexp}/siU", $input, $matches, PREG_SET_ORDER)) { return $matches; } } return false; } } if (!empty($_POST)) { //pr($_POST); echo $input = $_POST['list']; $regexp = '<p align="left">.*<p>(.*)<\\/p>(.*)<\\/p>'; $matches = regexp($input, $regexp); pr($matches); $regexp = '<p>(.*)<\\/font>(.*)'; $matches = regexp($matches[2], $regexp); pr($matches); } ?> <!doctype html> <html> <head> <meta charset="UTF-8"> <title>Untitled Document</title> </head> <body> <h1>Clarke Prescriber</h1> <form id="form1" name="form1" method="post"> <p> <label for="list">List:<br>