0

im build a system to show prices of a product ok? Example: Site: https://www.kabum.com.br/produto/82186/placa-de-video-vga-nvidia-evga-geforce-gtx-1060-6gb-gddr5-pci-e-3-0-06g-p4-6161-kr

I'd like to get that price, 1.259,90.

I have tried this:

$url = "https://www.kabum.com.br/produto/82186/placa-de-video-vga-nvidia-evga-geforce-gtx-1060-6gb-gddr5-pci-e-3-0-06g-p4-6161-kr";

return file_get_contents($url);

"file_get_contents(): Unable to locate certificate CN"

I'm working in a local server.

Thanks guys

Hermus
  • 193
  • 2
  • 11
  • 1
    https://stackoverflow.com/questions/1975461/how-to-get-file-get-contents-to-work-with-https answer your question. – Yago Riveiro Dec 06 '17 at 21:50
  • Then after fixing that read: [How do you parse and process HTML/XML in PHP?](https://stackoverflow.com/questions/3577641/how-do-you-parse-and-process-html-xml-in-php) – Lawrence Cherone Dec 06 '17 at 21:53
  • i have tried all the answer, but i just have a blank screen... – Hermus Dec 06 '17 at 21:58
  • Update your question with your attempted fixed code. Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the **shortest code necessary to reproduce it in the question itself**. See: [How to create a Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve). – Lawrence Cherone Dec 06 '17 at 22:03
  • You will because you're [return](http://php.net/manual/en/function.return.php)ing from the file. – Lawrence Cherone Dec 06 '17 at 22:04

0 Answers0