Jump to content

andyfarang

Members
  • Posts

    10
  • Joined

  • Last visited

andyfarang's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thank you both for helping me. It's working. I basically used @Barrands solution with @Muddy_Funster contribution in the last post. Temporary table wasn't even needed. Thank you.
  2. Thank you for both answers! Additional question - XML has about 1000 products (524kB) and I have to update into MySql prices of about 200 products. Which of the solutions would be better to use? It seems that in Muddy_Funsters solution I would go through that XML at least ten thousand times?
  3. Hello, I want to search for a PRICE of product by his ID. I have this unussual XML structure. I found some examples for XPath. But problem is, that in my XML id is not "parent" and price is not a "child". They are equal. Could somebody help me and show me, how to get a price if I know id of that product? <eshop> <product> <id></id> <name></name> <price></price> </product> <product> <id></id> <name></name> <price></price> </product> <product> <id></id> <name></name> <price></price> </product> </eshop>
  4. <SHOP> <SHOPITEM> <PRODUCT></PRODUCT> <PRODUCT_SKU></PRODUCT_SKU> <CATEGORYTEXT></CATEGORYTEXT> <CATEGORIES> <CATEGORY</CATEGORY> <CATEGORY></CATEGORY> </CATEGORIES> <URL></URL> <IN_STOCK></IN_STOCK> <IMGURL></IMGURL> <IMGURL_FULL></IMGURL_FULL> <PRICE_VAT></PRICE_VAT> </SHOPITEM> <PRODUCT_SKU> is ID of product and I want to get <PRICE_VAT>. XML has about 1000 products, I have to get price of about 200 products (and then save it to MySQL - which I know how to do, but I don't know how to get a price of product by ID)
  5. I couldn't find any example at google. Let's say, that I have some generic XML file, feed of products from eshop. And I want to get value of <price> of product, which has <product_id> equal to 9631. How do I get it's price?
  6. I'm using get_file_content and sometimes I get failed to open stream http, which isn't a problem, but displaying that message is a problem. Can I turn it off (in a script, not in php.ini etc.)?
  7. Imagine there is site www.some-free-dictionary.com. There's textarea and submit button. When you submit that form, you are redirected back at the same address, but it changed - there is translated text (and textarea and submit button). But that site is not mine and I want to my PHP script use this translator. First submit that form, after get content of new page. But I'm clueless with first two steps. How to submit that form with my data and how to get content of refreshed page (it's url doesn't change, you're redirected back)? Thank you //translator is example - suggesting using translator with free API is not a solution
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.