0,'url' => $url,'name' => $name]; echo json_encode($arr); } else { header('Location:'.$url); } }