No nie wiem tylko jak się te linki zmieniają, ale:
<?php
$link1 = '<a href="/game/00000.html" class="media_gametitle" style="display: block;">AAAAA</a>';
$link2 = '<a href="http://www.gametrailers.com/download/35570/t_prototype_int1_powercombat_gt.mov">Quicktime - 26.1MB</a>';
$val1 = false;
if( preg_match( '/href="\/game\/([0-9]*).html"/is', $link1, $match ) ) {
$val1 = (int) $match[1];
}
$val2 = false;
if( preg_match( '/href="(.*)\/([a-z0-9_]*).mov"/is', $link2, $match ) ) {
$val2 = $match[2];
}
if( $val1 !== false && $val2 !== false ) {
echo 'http://trailers.gametrailers.com/gt_vault/' . $val1 . '/' . $val2 . '.flv';
}
?>
I działa też tak:
<?php
$data = file_get_contents('http://www.gametrailers.com/player/35570.html');
$val1 = false;
if( preg_match( '/href="\/game\/([0-9]*).html"/is', $data, $match ) ) {
$val1 = (int) $match[1];
}
$val2 = false;
if( preg_match( '/href="(.*)\/([a-z0-9_]*).mov"/is', $data, $match ) ) {
$val2 = $match[2];
}
if( $val1 !== false && $val2 !== false ) {
echo 'http://trailers.gametrailers.com/gt_vault/' . $val1 . '/' . $val2 . '.flv';
}
?>