01.
<?php
02.
require_once
"connectdb.php"
;
03.
04.
$sqltb
=
"select * from tabletb where id=1"
;
05.
$db_query
=mysql_query(
$sqltb
);
06.
$resultp
=mysql_fetch_array(
$db_query
);
07.
$message
=
$resultp
[message];
08.
09.
$ch
=curl_init(
'$message'
);
10.
curl_setopt(
$ch
, CURLOPT_RETURNTRANSFER, true);
11.
$page
= curl_exec(
$ch
);
12.
13.
preg_match(
'#CODE[^>]*(.+?)(PRICE[^>]*)#is'
,
$page
,
$matches
);
14.
15.
foreach
(
$matches
as
&
$match
) {
16.
$match
=
$match
;
17.
18.
}
19.
20.
echo
"<b>$matches[0]</b>"
;
21.
22.
?>
23.
24.
25.
</body>
26.
</html>