 
  
   
  
   
  
   
  
  x=1
# if rsv == '\x06':
#            time.sleep(5)
#     print ("\x06")
#            port.write("test\x03\x04")
#            print ("test\x03\x04")
#        else:
#            print ("fall")
# if x==1:
#            print ("\x06")
#     port.write("\x02")
#     time.sleep(5)
#            print ("\x02")
#     print x
#     x=0
#     print x
# else:
#     x=1
#     port.write("test\x03\x04")
#     print "text" 
  
  z='first-comunication'
zx='second-comunication'
elif rcv == '\x06' and z:
       print ("send-06\x06")
       port.write("\x02")
       port.write("text")
       port.write("\x03")
       port.write("D4")
       port.write("\0D\0A")
       print ("host-send-text")
       print ("wait-confirm")
elif rcv == '\x06' and zx:
       print ("end")
       port.write("\x04") 
  
  $opts = array(
  'http'=>array(
    'method'=>"GET",
    'header'=>"Accept-language: en\r\n" .
              "Cookie: foo=bar\r\n"
  )
);
$context = stream_context_create($opts);
// Открываем файл с помощью установленных выше HTTP-заголовков
$file = file_get_contents('http://www.example.com/', false, $context); 
  
  function curl_load($url){
    curl_setopt($ch=curl_init(), CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    $response = curl_exec($ch);
    curl_close($ch);
    return $response;
}
$url = "test";
$end=curl_load($url);
print "$end"; 
  
   
  
   
  
  $persent=100;
$ipsa=0.704;
$i=(($ipsa/100)*$persent)*$ipsa;
$i=round($i, 3);Для этого, число надо разделить на 100, и умножить на заданный процент. Найденное значение процента нужно умножить на первоначальное число
 
  
  $ipsa3=0.704; 
  
   
  
  