file_get_contents NOT WORKING
-
hi, please help, I need to read div content from another site but I get error:
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/pu026100/www_root/wp-content/plugins/insert-php/includes/shortcodes/shortcode-php.php(45) : eval()'d code on line 1 Warning: file_get_contents(https://restauracie.sme.sk/restauracia/hotel-teledom_263-kosice_2914/denne-menu/): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/pu026100/www_root/wp-content/plugins/insert-php/includes/shortcodes/shortcode-php.php(45) : eval()'d code on line 1
my code:
$data = file_get_contents("https://restauracie.sme.sk/restauracia/hotel-teledom_263-kosice_2914/denne-menu/"); preg_match_all("/<div class=\"jedlo_polozka\">\s+<div class=\"left\">\s+(.*?)\s+<\/div>\s+<span class=\"right\"><b>(.*?)<\/b><\/span>\s+<\/div>\s+<div class=\"delimiter\"><\/div>/", $data, $hlavnejedlo); preg_match_all("/<div class=\"jedlo_polozka\">\s+<div class=\"left\">\s+(.*?)\s+<\/div>\s+<\/div>\s+<div class=\"delimiter\"><\/div>/", $data, $polievka);
Thanks so much 🙂
- This topic was modified 3 years, 6 months ago by .
- This topic was modified 3 years, 6 months ago by .
The page I need help with: [log in to see the link]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘file_get_contents NOT WORKING’ is closed to new replies.