Jump to content

Hack attempt -> xml feed zbozi.cz


ghostrider

Recommended Posts

Zdravim a prosim vsechny o radu.

mam problem s xml feedem zbozi.cz (tuto sluzbu mam placenou u zbozi.cz). Jde o to, kdyz se mrknu na feed na webu tak se zobrazuje hlasak "hack attempt" a dal se nehnu. Neporadil by mi prosim nekdo co s tim? Nejak mi dochazeji napady :(

Obchod je verze 1.3.1.1, url feedu http://www.car-multimedia.cz/xml/zbozi.php

Samotny feed je:

<?php
$shopUrl = 'http://www.car-multimedia.cz';
include(dirname(__FILE__).'/../config/config.inc.php');
include(dirname(__FILE__).'/init.php');
error_reporting(0);
$p=Product::getProducts(4, 0, 0, 'id_product', 'desc', false);
$products=Product::getProductsProperties(4, $p);

header("Content-Type: text/xml");
echo '<?xml version="1.0" encoding="utf-8"?>
';
foreach ($products as $row) {
$img=Product::getCover($row['id_product']);
echo '

'.str_replace("&", "&", $row['name']).'
'.str_replace("&", "&",strip_tags($row['description_short'])).'
'.$row['link'].'
'.$shopUrl.'/img/p/'.$row['id_product'].'-'.$img['id_image'].'.jpg
'.($row['price']*1).'
0
';
}
echo '';
?>

Link to comment
Share on other sites

  • 1 month later...

Můj feed jsem napsal takto a funguje bez problémů:

<?php
$shopUrl = "http://".$_SERVER['SERVER_NAME'];
include(dirname(__FILE__).'/config/config.inc.php');
include('init.php');  
error_reporting(0);
$p=Product::getProducts(4, 0, 0, 'id_product', 'desc', false);
$products=Product::getProductsProperties(3, $p); 

header("Content-Type: text/xml");
echo '<?xml version="1.0" encoding="utf-8"?>
';

foreach ($products as $row) {
$img=Product::getCover($row['id_product']); 
$manufacturerName=Product::getManufacturerName($row['id_product']);        
echo '

'.$manufacturerName['meta_title'].' '.str_replace("&", "&", $row['name']).'
'.str_replace("&", "&",strip_tags($row['description_short'])).'
'.$row['link'].'
'.$shopUrl.'/img/p/'.$row['id_product'].'-'.$img['id_image'].'.jpg
'.round($row['price_tax_exc']).'
'.round($row['price_tax_exc'])*(round($row['tax_rate'])+100 )/100 .'
4
'.$manufacturerName['meta_title'].'
';
}
echo '';
?> 



Nezapomeňte si nastavit id jazyku na funkci

$p=Product::getProducts(4, 0, 0, 'id_product', 'desc', false);


já tam mám 4

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...