Размер файла: 1.31Kb
<?php
/*
* Copyright (C) W@P Labs Group
* Product name: Free Informers
* Web Site: http://waplabs.ru
* Web Site: http://x-engine.net
*
* This script is redistributed to the free
* conditions, observe copyright and
* appreciate the work of programmers.
* Sincerely Michael aka Sklep
*
* Founder of the project Michael aka Sklep
* (Jabber id: [email protected])
*/
ini_set('default_charset', 'uft-8');
header('Content-Type: text/html; charset=utf-8');
/**
* Preload class queryApi()
*/
require_once('queryApi.php');
/**
* Set the username and password
*/
queryApi::setAuth('demo', 'demo');
/**
* Conclusion Mobile News
* Type news: wlg, mobile, crime, sport, science, internet, digital, game, mil, kino
*/
$ini = queryApi::send(array('API' => 'news', 'Type' => 'internet'));
if ($ini->result == 'success') {
foreach ($ini->answer as $value) {
foreach ($value->img as $keys => $img) {
echo 'Image - ' . ($keys + 1) . ': <img src="' . $img . '" alt=""><br />';
}
echo 'Date: ' . $value->date . '<br />' .
'Name: ' . $value->name . '<br />' .
'SmallText: ' . $value->smalltext . '<br />' .
'FullText: ' . $value->text . '<br /><br /><br />';
}
} else {
echo 'News error: ' . $ini->error_text;
}
?>