<div>
<span class="apple1evil">123</span>
<span class="apple!evil">456</span>
<span class="appleCevil">789</span>
<span class="appleRevil">000</span>
</div>
//div/span[@class[starts-with(.,'apple')][substring(.,string-length()-3)='evil']]
получить значения атрибута name
//div[@class="reports"]/div[@class="SUCCESS"]/div[@class="name"]
//div[@class="reports"]/div[@class="ERROR"]/div[@class="author"]
//li/a[@class="fancybox-thumbs2"]
//li/a[@class="fancybox-thumbs2"]/@href
$auth_arr = file('logins.txt');
$auth = FALSE;
$_POST['login'] = 'user'; // получаете из формы
$_POST['password'] = '321123'; // получаете из формы
foreach( $auth_arr as $line )
{
list($login, $password) = explode(' | ', trim($line));
if ($_POST['login'] == $login && $_POST['password'] == $password)
{
$auth = TRUE;
break; // прерываете foreach
}
}
echo ($auth === TRUE ? 'Success' : 'Fail');
$options = array("indent" => false,
"output-xml" => true,
"clean" => true,
"drop-proprietary-attributes" => true,
"drop-font-tags" => true,
"drop-empty-paras" => true,
"hide-comments" => true,
"join-classes" => true,
"join-styles" => true,
"show-body-only" => false);
$tidy = new tidy();
$str = $tidy->parseString($page, $options, 'utf8'); // $page содержит невалидный html
$tidy->cleanRepair();
echo $tidy; // валидный html
$post['pic'] = 'sa';
$post['nume'] = 'value';
$post['sex'] = 'masculin';
$ch = curl_init('http://www.example.com/tm1');
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_POST, TRUE);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
$result = curl_exec($ch);
curl_close($ch);
$(document).ready(function() {
$("#owl-example").owlCarousel();
});
<?
$name = $_POST['name'];
$phone = $_POST['phone'];
mail('yourmail@gmail.com', 'Code test', 'Message: '. $name .' - '. $phone);