3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $linkphp = 'http://conex2013.serveblog.net/iphone5s.php'; /* $rotina =$_POST["rotina"]; $idcliente =$_POST["idcliente"]; $casa =$_POST["casa"]; $valor =$_POST["valor"]; $data =$_POST["data"]; $outro =$_POST["outro"]; $id =$_POST["id"]; $bolausado =$_POST["bolausado"]; $compr =$_POST["compr"]; */ $dadospost = array( 'rotina' => '01', 'idcliente' => $idcliente, 'casa' => 'TODOS', 'valor' => $valor, 'data' => $data, 'outro' => $outro, 'id' => $id, 'bolausado' => $bolausado, 'compr' => $compr); echo 'passsou 01 '; $respuesta = Envia_Post($linkphp, $dadospost); echo $respuesta; function Envia_Post($URL, $dados, $optional_headers = null) { $erro = false; $params = array('http' => array('method' => 'POST','action' => $URL,'content' => cr_post( $dados ),)); echo 'passsou 02 '; if ($optional_headers !== null) { $params['http']['header'] = $optional_headers; echo 'passsou 03 '; } $ctx = stream_context_create($params); echo 'passsou 04 '; $fp = @fopen($URL, 'rb', false, $ctx); echo 'passsou 05 '; if (!$fp) { $erro = true; echo 'passsou 06 '; } echo 'passsou 06-1 '; //$response = @stream_get_contents($fp); echo 'passsou 07'; $response = @fgets($fp,4096); echo 'passsou 07 '; if ($response == false) { $erro = true; echo 'passsou 08 '; } if ($erro) { //return ''; return $response; echo 'passsou 09 '; } else { echo 'passsou 10'; if (strpos($response, '.php')) //Evitar Mostrar Caminho php Principal { //return ''; return $response; echo 'passsou 11 '; } else { return $response; echo 'passsou 12 '; } } } function cr_post($a,$b='',$c=0) { if (!is_array($a)) return false; foreach ((array)$a as $k=>$v) { if ($c) { if( is_numeric($k) ) $k=$b."[]"; else $k=$b."[$k]"; } else { if (is_int($k)) $k=$b.$k; } if (is_array($v)||is_object($v)) { $r[]=cr_post($v,$k,1); continue; } $r[]=urlencode($k)."=".urlencode($v); } return implode("&",$r); } ?>
Output for 5.0.4 - 7.1.0
Notice: Undefined variable: idcliente in /in/Ferbt on line 19 Notice: Undefined variable: valor in /in/Ferbt on line 21 Notice: Undefined variable: data in /in/Ferbt on line 22 Notice: Undefined variable: outro in /in/Ferbt on line 23 Notice: Undefined variable: id in /in/Ferbt on line 24 Notice: Undefined variable: bolausado in /in/Ferbt on line 25 Notice: Undefined variable: compr in /in/Ferbt on line 26 passsou 01 passsou 02 passsou 04 passsou 05 passsou 06 passsou 06-1 passsou 07 passsou 08
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: idcliente in /in/Ferbt on line 19 Notice: Undefined variable: valor in /in/Ferbt on line 21 Notice: Undefined variable: data in /in/Ferbt on line 22 Notice: Undefined variable: outro in /in/Ferbt on line 23 Notice: Undefined variable: id in /in/Ferbt on line 24 Notice: Undefined variable: bolausado in /in/Ferbt on line 25 Notice: Undefined variable: compr in /in/Ferbt on line 26 passsou 01 passsou 02 passsou 04 passsou 05 passsou 06 passsou 06-1 passsou 07 passsou 08