too long

Using : php with connection webhook its all correctly if i change to another php bot it works: {"ok":true,"result":true,"description":"Webhook is already set"}

My bot dosen't work has no connection with Php im using an example of Keyboard-inline) this is the code of source.php i hope u guys can help me with some idea :S :(

  <?php

define('api', 'https://api.telegram.org/bot'.token.'/');

$data = file_get_contents("php://input");
$update = json_decode($data,true);

$message = $update["message"];
$text = $message["text"];
$cid = $update["message"]["from"]["id"];
$from = $message["from"];
$username = $from["username"];
$nome = $from["first_name"];
$cognome = $form["last_name"];

$cbid = $update["callback_query"]["from"]["id"];
$cbdata = $update["callback_query"]["data"];

function callback($up){
    return $up[callback_query];
}

function apiRequest($metodo){
    $req = file_get_contents(api.$metodo);
    return $req;
}

function send($id,$text){
    if(strpos($text, "
")){
        $text = urlencode($text);
    }
    return apiRequest("sendMessage?text=$text&parse_mode=HTML&chat_id=$id");
}

function keyboard($tasti, $text, $cd){
    $tasti2 = $tasti;

    $tasti3 = json_encode($tasti2);

        if(strpos($textm "
")){
            $text = urlencode($text);
        }

 apiRequest("sendMessage?text=$text&parse_mode=Markdown&chat_id=$cd&reply_markup=$tasti3");
}

function inlinekeyboard($menud,$chat,$text){
    $menu = $menud;

        if(strpos($text, "
")){
            $text = urlencode($text);
        }

        $d2 = array(
            "inline_keyboard" => $menu,
        );

        $d2 = json_encode($d2);

        return apiRequest("sendMessage?chat_id=$chat&parse_mode=Markdown&text=$text&reply_markup=$d2"); }

And this is the code of bot.php

<?php

define('token', '<token>');

include 'source.php';

if($text == "/start"){
    send($cid, "bievenido al Bot inversion");
}

if($text == "tastiera"){
    $keyboard = [
        ["Inline", "Inline2"],
        ["Inline3", "Inline4"],
];
$key = array(
"resize_keyboard" => true,
"keyboard" => $keyboard,
);

    keyboard($key, "bievenido al Bot inversion", $cid);
}

if($text == "Inline"){
    $but = array(array(array("text" => "Bottone 1", "url" => "www.google.com"),),);
    inlineKeyboard($but, $cid , "Clicca questo pulsante per andare su google");
}

if($text == "Inline2"){
    $but = array(array(array("text" => "Bottone 1", "url" => "www.google.com"),array("text" => "Bottone 2", "url" => "www.facebook.it"),),);
    inlineKeyboard($but, $cid, "Clicca uno di questi due pulsanti 
per andare su google o su facebook!");
}

if($text == "Inline3"){
    $but[] = array(array("text" => "Bottone 1", "url" => "www.google.com"),);
    $but[] = array(array("text" => "Bottone 2", "url" => "www.facebook.it"),);
    inlineKeyboard($but, $cid, "Clicca uno di questi due pulsanti 
per andare su google o su facebook");   
}

if($text == "Inline4"){
    $but = array(array(array("text" => "Bottone 1", "callback_data" => "ciao1"),),);
    inlineKeyboard($but, $cid, "Clicca il bottone!");
}

if(callback($update)){
    if($cbdata == "ciao1"){
    send($cbid, "hai cliqueado el Bottone 1");
    }
}

It is really helpful to have a look at PHP's error log. It will tell you

PHP Parse error: syntax error, unexpected '" "' (T_CONSTANT_ENCAPSED_STRING) in [...].php on line xx

You missed a , in if(strpos($textm " ")).