Answer the question
In order to leave comments, you need to log in
How to continue script execution when function fails?
Here is my code
<?php
include("simple_html_dom.php");
function nas($nas, $name)
{
set_time_limit(0);
$pog='https://'.$nas;
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //Set curl to return the data instead of printing it to the browser.
curl_setopt($ch, CURLOPT_URL, $pog );
$string = curl_exec($ch);
curl_close($ch);
$html = str_get_html($string);
$pogoda = $html->find("div.values", 0)->children(4)->plaintext;
}
?>
echo nas(23123,123123);
echo nas(2342,234);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question