$ wget http://reveration.com/
--2012-12-10 12:44:56-- http://reveration.com/
Распознаётся reveration.com (reveration.com)... 199.59.241.178
Подключение к reveration.com (reveration.com)|199.59.241.178|:80... соединение установлено.
HTTP-запрос отправлен. Ожидание ответа... 200 OK
Длина: 1233 (1,2K) [text/html]
Сохранение в каталог: ««index.html»».
100%[=================>] 1 233 --.-K/s за 0s
2012-12-10 12:44:57 (15,0 MB/s) - «index.html» saved [1233/1233]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
<title></title>
<script type="text/javascript">
StaticRequestInfo={Referer:document.referrer};function EscapeBrowserFrame(){try{if(window.top.location==window.self.location){}else{window.top.location.href=document.location.href}}catch(Error){}}function SetRequestTitle(){document.title=document.domain}function InitiateFrameRequest(){var a="";var b="";if(window.location.search.indexOf("?")==0){b="&framerequest=1"}else{b="?framerequest=1"}b+="&refurl="+encodeURIComponent(StaticRequestInfo.Referer);a=window.location+b;document.write("<frameset rows=\"100%,*\" frameborder=\"no\" border=\"0\" framespacing=\"0\"><frame src=\""+a+"\" name=\"landingparent\"><\/frameset>")}SetRequestTitle();EscapeBrowserFrame();
</script>
</head>
<script type="text/javascript">
InitiateFrameRequest();
</script>
<body>
<noscript>
<meta http-equiv="refresh" content="0;url=/?framerequest=1">
</noscript>
<noframes>
<meta http-equiv="refresh" content="0;url=/?framerequest=1">
</noframes>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<frameset framespacing="0" border="0" frameborder="no" rows="100%,*">
<frame name="landingparent" src="http://reveration.com/?framerequest=1&refurl=">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<title>Reveration.com - Reveration and Revelation Chapter</title>
<meta content="text/html; charset=utf-8" http-equiv="content-type">
<meta content="Reveration.com offers Revelation Chapter, Brown Commentary, Missionary Baptist Church, and Bible Study. Reveration - your number one choice for Private Revelation and Revelation Files." name="description">
<style type="text/css">
<script type="text/javascript">
<script type="text/javascript" src="http://pagead2.googlesyndication.com/apps/domainpark/show_afd_ads.js">
<script src="http://googleads.g.doubleclick.net/apps/domainpark/domainpark.cgi?callback=_google_json_callback&output=js&client=ca-dp-bodis27_3ph_js&domain_name=reveration.com&channel=014686&adtest=off&s=reveration.com&kw=Jesus%20Christ&num_ads=5&num_radlinks=18&dt=1355129751046&u_tz=240&u_his=2&u_h=1080&u_w=1920&frm=1">
<script type="text/javascript">
</head>
<body>
</html>
</frame>
</frameset>
<noframes> <meta http-equiv="refresh" content="0;url=/?framerequest=1"> </noframes>
</html>
SELECT seller.title seller_title, rel.price price, dvr.title dvr_title,dvr.id dvr_id FROM com_dvr dvr
LEFT JOIN com_dvr_relations rel ON dvr.id = rel.item_id
LEFT JOIN com_dvr_sellers seller ON rel.seller_id = seller.id;
ORDER BY dvr_title, dvr.id, seller.title, rel.price
$mysqli = new mysqli("example.com", "user", "password", "database");
(проверка на ошибку запроса)
$res = $mysqli->real_query($sql);
$mysqli->store_result();
// Получаем результат
$result = array();
while ($row = $res->fetch_assoc())
{
$dvrId = $row[ 'dvr_id' ];
if ( !isset($result[$dvrId] )
{
$result[ $dvrId ] = array();
$result[ $dvrId ][ 'dvr_title' ] = $row[ 'dvr_title' ];
$result[ $dvrId ][ 'sellers' ] = array();
}
$result[ $dvrId ][ 'sellers' ][] = array(
'seller_title' => $row[ 'seller_title' ]
, 'seller_price' => $row['price']
);
}
echo "<pre>";
var_dump( $result );