ob_start();
$API_KEY = ‘1070094759:AAFEqRkZI2IkvfASoyokaj26JxU5P8drgV4’ ;
define(‘API_KEY’, $API_KEY) ;
function bot($method,$datas=[ ]){
$url = “https://api.telegram.org/bot”.$API_KEY.”/”. $method;
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_ RETURNTRANSFER,true);
curl_setopt($ch,CURLOPT_POSTFIELDS,$datas);
$res = curl_exec($ch);
if(curl_error($ch)){
var_dump(curl_error($ch));
}else{
return json_decode($res);
}
}
$update= json_dcode(file_get_contents(‘php://input));
$message= $update->$message;
$text = $message->text;
$chat_id = $message->chat->id;
if($text == ‘/start’){
bot(‘sendMassage’,[
‘chat_id’=>$chat_id,
‘text’=>’Welcome to my PHP bot’,
]);
}
fix this please
What
<?php
ob_start();
$API_KEY = ‘1070094759:AAFEqRkZI2IkvfASoyokaj26JxU5P8drgV4’ ;
define(‘API_KEY’, $API_KEY) ;
function bot($method,$datas=[ ]){
$url = “https://api.telegram.org/bot”.$API_KEY.”/”. $method;
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch,CURLOPT_POSTFIELDS,$datas);
$res = curl_exec($ch);
if(curl_error($ch)){
var_dump(curl_error($ch));
}else{
return json_decode($res);
}
}
$update= json_dcode(file_get_contents(‘php://input));
$message= $update->$message;
$text = $message->text;
$chat_id = $message->chat->id;
if($text == ‘/start’){
bot(‘sendMassage’,[
‘chat_id’=>$chat_id,
‘text’=>’Welcome to my PHP bot’,
]);
}
ob_start();
$API_KEY = ‘1070094759:AAFEqRkZI2IkvfASoyokaj26JxU5P8drgV4’ ;
define(‘API_KEY’, $API_KEY) ;
function bot($method,$datas=[ ]){
$url = “https://api.telegram.org/bot”.$API_KEY.”/”. $method;
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch,CURLOPT_POSTFIELDS,$datas);
$res = curl_exec($ch);
if(curl_error($ch)){
var_dump(curl_error($ch));
}else{
return json_decode($res);
}
}
$update= json_dcode(file_get_contents(‘php://input));
$message= $update->$message;
$text = $message->text;
$chat_id = $message->chat->id;
if($text == ‘/start’){
bot(‘sendMassage’,[
‘chat_id’=>$chat_id,
‘text’=>’Welcome to my PHP bot’,
]);
}
tell the problem
You forgot to close a single quotation in php://input
Line number 21 I think
which location are you looking for???
Location : Ahmedabad
Position : .Net Developers (DotNet)
Salary : Rs. 40000
Experience : 2+ yrs
Send your CVs to it.hashtagconsultancy@gmail.com







inbox
inbox

Link please
Please send the link..
can get u many projects if u can work in low amount costs and if u are very fast with full stack development