I make with tonic (php library for rest ) a rest webservice.
I use according to CRUD and REST put for editing a element.
So i call my method with a picture and filetype and parse the paramters and save the base64 encoded file on my server.
Code:
function put($request) {
$response = new Response($request);
$msg = new ErrorMessage();
$dbmodel = new DBModel();
$arr = array('Data' => null,'Message' =>null,'Code' => null);
try{
$split = explode ('&',$request->data);
$para = array();
foreach($split as $i) {
$names = explode('=',$i);
if(!isset($names[0]) or !isset($names[1]))
{
throw new Exception();
}
$para[$names[0]] = $names[1];
}
}
catch(Exception $e)
{
$arr['Code'] = 400;
$arr['Message'] = $msg->getMessage(400);
$response->body = json_encode($arr);
return $response;
}
if (isset($para['picture']) or isset($para['filetype']) )
{
if (isset($para['picture']) and isset($para['filetype']))
{
if (!($para['filetype'] == 'jpg' || $para['filetype'] == 'png'))
{
$arr['Code'] = 688;
$arr['Message'] = $msg->getMessage(617);
$response->body = json_encode($arr);
return $response;
}
$bin = base64_decode($para['picture']);
if (strlen($bin) >524288)
{
$arr['Code'] = 617;
$arr['Message'] = $msg->getMessage(617);
$response->body = json_encode($arr);
return $response;
}
$uid = $dbmodel->getUid($sid);
if($uid<1)
{
$arr['Code'] = 699;
$arr['Message'] = $msg->getMessage(699);
$response->body = json_encode($arr);
return $response;
}
$file = fopen($_SERVER['DOCUMENT_ROOT']."/img/".$uid.".".$para['filetype'], 'wb');
fwrite($file, $bin);
fclose($file);
}
else
{
$arr['Code'] = 616;
$arr['Message'] = $msg->getMessage(616);
$response->body = json_encode($arr);
return $response;
}
}
$arr['Code'] = 200;
$arr['Message'] = $msg->getMessage(200);
$response->body = json_encode($arr);
return $response;
}
Problem: The saved picture isn't like the original one it can't be displayed as image
I use http://www.redio.info/werkzeuge/file2base64.html to convert my picture into base64. I think that the problem could be in the parsing at the beginning of my code.
Original: 13.872 Bytes
New Image: 14.313 Bytes
Your picture parameter gets probably urlencoded, that would explain the bigger filesize. (e.g. '/' to %2F)
Try to put a urldecode around the parameter before you decode it.
$bin = base64_decode(urldecode($para['picture']));
Related
I'm fairly new to all of this, but I have created a simple telegram bot to test their functionality. I have set the webhook and I'm using ngrok for the "host". However when I type a command the bot just doesn't do anything.
Does anyone know how to fix this?
Here is the index.php file:
<?php
require('token.php');
require('config.php');
try{
$ngrokUrl = "ngrok url";
$bot = new TelegramBot($token);
$jH = new jsonHandler($token);
var_dump($bot->setWebhook($ngrokUrl));
$webhookJson = $jH->getWebhookJson();
$chatId = $jH->getChatId($webhookJson);
$msg = $jH->getText($webhookJson) !== "" ? $jH->getText($webhookJson) : "";
switch($msg){
default:{
if ($msg[0] == '/')
$bot->sendMessage($chatId, 'The command does not exist');
break;
}
case '/test':{
$msg = 'test test';
$bot->sendMessage($chatId, $msg);
break;
}
case '/help':{
$msg = 'Help!';
$bot->sendMessage($chatId, $msg);
break;
}
}
}catch(ErrorException $e){
echo $e->getMessage();
}
?>
And the config.php file:
<?php
function fetchApi($url){
$req = curl_init($url);
$resp = curl_exec($req);
if($resp == false){
$error = curl_error($req);
curl_close($req);
throw new ErrorException($error);
}
else{
curl_close($req);
//return $resp;
}
}
class TelegramBot{
protected $tUrl;
function __construct($token){
$this->tUrl = "https://api.telegram.org/bot".$token;
}
function setUrl($method){
return $this->tUrl."/".$method;
}
function sendMessage($chatId, $msg){
$data = [
'chat_id' => $chatId,
'&text' => $msg
];
$url = $this->setUrl("sendMessage?".http_build_query($data));
fetchApi($url);
file_get_contents($url);
}
class jsonHandler extends TelegramBot{
function getWebhookJson(){
$json = file_get_contents("php://input");
return json_decode($json, true);
}
function getChatId($jsonDecoded){
return $jsonDecoded["message"]["chat"]["id"];
}
function getText($jsonDecoded){
return $jsonDecoded["message"]["text"];
}
}
?>
There are two 'else' condition with the same code, so how to simplify this code?
if(!empty($data))
{
$getData = $this->getData($data);
if(!empty($getData))
{
$response = $getData->name;
}
else
{
$response = $this->getRequest($value);
}
}
else
{
$response = $this->getRequest($value);
}
return $response;
Get the response from getData(), and in a second step, check if $response is set, and if not, get the value from getRequest():
if (!empty($data)) {
$getData = $this->getData($data);
if (!empty($getData)) {
$response = $getData->name;
}
}
$response = $response ?? $this->getRequest($value);
You could do this:
if(!empty($data)) {
$getData = $this->getData($data);
if(!empty($getData)) {
$response = $getData->name;
}
}
if ($response == null) { // Or check if the $response is not filled yet
$response = $this->getRequest($value);
}
return $response;
This should help
$response = $this->getRequest($value);
if(!empty($data)){
$getData = $this->getData($data);
if(!empty($getData))
{
$response = $getData->name;
}
}
return $response;
if(!empty($data) && ($getData = $this->getData($data)) && !empty($getData))
{
$response = $getData->name;
}
else
{
$response = $this->getRequest($value);
}
return $response;
I have a PHP function that talks to another API for real-time train information to get data from it. It makes the call and parses the XML data to JSON but when there is only one train in the station it will come out as an object and not an array. How can I make it convert everything to an array even if there is only one train coming.
public function getStationsByName(Request $request)
{
try {
$stationName = $request->input('id');
$url = "http://api.irishrail.ie//realtime/realtime.asmx/getStationDataByNameXML?StationDesc=";
$url .= $stationName;
$res['status'] = true;
$res['message'] = 'Success';
$ir = xmlparser::Parse($url);
$res ['results'] = json_decode($ir, TRUE);
$res['num_rows'] = count($res['results']);
return response($res, 200);
} catch (\Illuminate\Database\QueryException $ex) {
$res['status'] = false;
$res['message'] = $ex->getMessage();
return response($res, 500);
}
}
This is what the data looks like with more than one train arriving at the station
And this is where there is only one arriving
You can check it by your self,
if(false !== ($result = json_decode($ir, TRUE))){
if(isset($result["objStationData"]["Servertime"])){
$objStationDatas = [$result["objStationData"]];
}else{
$objStationDatas = $result["objStationData"];
}
}
before convert JSON into array you can check if the parsed XML is an array or an object. You have to do that on your objStationData the code below is just an example
if(!is_array($ir){
$res ['results'] = json_decode($ir, TRUE);
}else{
$res ['results'] = $ir;
}
or
if(is_object($ir){
$res ['results'] = json_decode($ir, TRUE);
}else{
$res ['results'] = $ir;
}
HelloI need find city for ip, I install maxmind/GeoIP2-php and download file GeoLite2-City.mmdb 31mb GeoLite2-City.mmdb 2,2mb and create service AdditionalFunction and function getInfoIpCity, getInfoIpCountry and when developer registration I use this function like this:
$ip = $request->getClientIp();
$record = $hAid->getInfoIpCountry($ip);
$get_record = $hAid->getInfoIpCity($ip);
$record_coutry = $record->country->name;
I download GeoLite2-City-CSV_20150707/ and this file GeoLite2-City-Blocks-IPv4.csv 135.3 mb and in this file I find 176.241.128.0/20,690791,690791,,0,0,,50.4500,30.5233 If I have this file how I can find name city ? If I have in variable 50.4500,30.5233 and google know this is Kyiv how I get name city ?
and service:
class AdditionalFunction
{
private $rootDir;
public function setRootDir($rootDir)
{
$this->rootDir = $rootDir;
}
public function getInfoIpCountry($ip)
{
try {
$reader = new Reader($this->rootDir.'/data/GeoLite2-Country.mmdb');
$data = $reader->country($ip);
} catch (\Exception $e) {
$data = null;
}
return $data;
}
public function getInfoIpCity($ip)
{
try {
$reader = new Reader($this->rootDir.'/data/GeoLite2-City.mmdb');
$data = $reader->city($ip);
$m = $data->country->name;
$t = $data->country->isoCode;
$b = $data->mostSpecificSubdivision->name;
$c = $data->city->name;
} catch (\Exception $e) {
$data = null;
}
return $data;
}
}
coutry find right
but in dump I have $c = null, $b = null
why???? I need city
I solved my problem I use free base for maxmind but if city not found in this DB I use googlr aip and find city for latitude & longitude, this code:
public function getInfoIpCity($ip)
{
try {
$reader = new Reader($this->rootDir.'/data/GeoLite2-City.mmdb');
$data_geo = $reader->city($ip);
$name = $data_geo->country->name;
$isoCode = $data_geo->country->isoCode;
$mostSpecificSubdivision = $data_geo->mostSpecificSubdivision->name;
$data = $city = $data_geo->city->name;
$postal = $data_geo->postal->code; // '55455'
$latitude = $data_geo->location->latitude; // 50.45
$longitude = $data_geo->location->longitude;// 30.5233
if (is_null($data)){
$url = 'http://maps.googleapis.com/maps/api/geocode/json?latlng='.$latitude.','.$longitude.'&sensor=false';
$data = #file_get_contents($url);
$jsondata = json_decode($data,true);
if(is_array($jsondata )&& $jsondata ['status'] == "OK")
{
$addr = $jsondata ['results'][0]['address_components'][4]['long_name'];
$addr2 = $jsondata ['results'][0]['address_components'][4]['short_name'];
$addr3 = $jsondata ['results'][0]['address_components'][3]['long_name'];
}
$info = "Country: " . $addr . " | Region: " . $addr2 . " | City: " . $addr3;
$data = $addr3;
}
} catch (\Exception $e) {
$data = null;
}
return $data;
}
I hava a rest-webservice and i want to upload the image as a base64 string and decode it on my webserver using php.
My Code:
if (isset($para['picture']) or isset($para['filetype']) )
{
if (isset($para['picture']) and isset($para['filetype']))
{
if (!($para['filetype'] == 'jpg' || $para['filetype'] == 'png'))
{
$arr['Code'] = 617;
$arr['Message'] = $msg->getMessage(617);
$response->body = json_encode($arr);
return $response;
}
echo $para['picture'];
$bin = base64_decode(str_replace(' ', '+', $para['picture']));
if (strlen($bin) >(524288*2))
{
$arr['Code'] = 624;
$arr['Message'] = $msg->getMessage(624);
$response->body = json_encode($arr);
return $response;
}
$uid = $dbmodel->getUid($sid);
if($uid<1)
{
$arr['Code'] = 699;
$arr['Message'] = $msg->getMessage(699);
$response->body = json_encode($arr);
return $response;
}
$file = fopen($_SERVER['DOCUMENT_ROOT']."/img/".$uid.".".$para['filetype'], 'w');
fwrite($file, $bin);
fclose($file);
$dbmodel->insertPicture($uid,URL_ROOT."/img/".$uid.".".$para['filetype']);
}
else
{
$arr['Code'] = 616;
$arr['Message'] = $msg->getMessage(616);
$response->body = json_encode($arr);
return $response;
}
DBModel:
function insertPicture($uid,$link)
{
$result = mysql_query("select link from USER_PICTURE where USER_ID=$uid");
if (mysql_num_rows($result)==1)
{
$row = mysql_fetch_array($result);
$row['link'];
$split = explode("/img/", $row['link']);
unlink($_SERVER['DOCUMENT_ROOT']."/img/".$split[1]);
}
$result = mysql_query("INSERT INTO USER_PICTURE (user_id,link) VALUES ($uid, '$link')ON DUPLICATE KEY UPDATE link='$link'");
if ($result)
{
return true;
}
return false;
}
I call my webservice with:
sid=3rcsg42ekbiats33uf2jto6u16&picture=/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUG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iIAiIgCIiAIiIAiIgCIiAIiIAiIgCIiAIiIAiIgCIiAIiIAiIgCIiAIiIAiIgCIiAIiIAiIgCIiAIiIAiIgCIiAIiIAiIgCIiAIiIAiIgCIiAIiIAiIgCIiAIiIAiIgCIiAIiIAiIgCIiAIiIAiIgCIiAIiID/9k=&filetype=jpg
I use the notepadd++ with mimetype plugin to convert a image to base64
UPDATE:
Picture Paramter in PHP:
/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAEEAQQDASIAAhEBAxEB/8QAHQABAAEFAQEBAAAAAAAAAAAAAAECAwQGBwUICf/EAD0QAAEDAwIEBAQEBAQGAwAAAAEAAgMEBREGIQcSMUETUWFxCBQikTKBobEVI0LRJWLB4RYXMzRSckSi8f/EABwBAQABBQEBAAAAAAAAAAAAAAABAgQFBgcDCP/EADQRAAIBAwMCBAQDCAMAAAAAAAABAgMEEQUhMQYSE0FRYSJxgZEUQqEVFjIzscHR8CPh8f/aAAwDAQACEQMRAD8A/VNERAEREAREQBERAEREAREQBERAEREAREQBERAEREAREQBERAEREAREQBERAEREAREQBERAEREAREQBERAEREAREQBERAEREAREQBERAEREAREQBERAEREAREQBERAEREAREQBERAEREAREQBERAEREAREQBERAEREAREQBERAEREAREQBERAEREAREQEIXYVLngYVD3HrhAXOcYTnCx/Ez02TmyfX26ISZHOCcAqenqsfmPmFWHFpyhBeRUNkyVWgIQqUQBFCZQEoo5h5qOYHugKlCpc/HXZOcY6oCpSqQ7IU8w80BKKljw5OYeYQFSKAQVKAhSoUoAijupQBFClAEREAREQBERAWTgFCMgqBv/dSMgY6oCwWEHZT+P8PsrrhnHRM+uyE5LIy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ar5R5IBhAAMKURAERUPICAF+M5VJeTnyVAJyqS44/1QlEPkHkqC/GMjr6qHHm7Kk5wd9+2UJILgfLHRWnuBAwPuFWGkHcAEjfG6gtODsPRQySkDcFqyYRk5237K0zmGM9lkRjp5BSQy6Om/VFWzPL0RCkrUb5UogIIypREAREQBERAUEOLgdsfqqlKIAoUogCp3yqkQBR0UogCIiAIiIAoKlEBTg49VQYznzV1EBY8J2MYUeE7AGP1WQiE5MYQvz0291SaZx7fqstEGTDNM/s39VBppCNm/qs1EGTCbTPA/D+qvxxub2V5EIIHRFKIAiIgCIiAIiIAiIgCIiAIiIAiIgCIiAIiIAiIgCIiAIiIAiIgCIiAIiIAiIgCIiAIiIAiIgCIiAIiIAiIgCIiAIiIAiIgCIiAIiIAiIgCIiAIiIAiIgCIiAIiIAiIgCIiAIiIAiIgCIiAIiIAiIgCIiAIiIAiIgCIiAIiIAiIgCIiAIiIAiIgCIiAIiID/9k=
Problem:
The DB Link will be set right, but the image doesn't appear in the webroot.
Please help
There is a "%3D" at the end of your base64 string. But there is no "%" in the base64 alphabet.
If this makes it into your image files, they might be invalid.
Regards
Stefan