handsetdetection / php-apikit Goto Github PK
View Code? Open in Web Editor NEWHandset Detection v4 API kit for PHP
Handset Detection v4 API kit for PHP
Since i saw the new release, i gave the lib another try to integrate it to https://github.com/ThaDafinser/UserAgentParser
But i could not finish it.
First off, the cache cannot be changed to another then APC
Some methods also have missing parameters, e.g.
https://github.com/HandsetDetection/php-apikit/blob/master/src/HD4.php#L242
Line 115 in b70691b
Hi,
We are getting errors like *Undefined index: en_us* _HDExtra.php@117_
after deploying code using this package. This prevents scripts from completing device detection and results in a fatal error.
Locally, and on our beta server, we never saw this error.
Not sure if this is a permissions issue or something else.
Looping in @artkay
If you reuse the same HD4 instance, sometimes the results are from previous detections.
$parser->deviceDetect($headers);
$resultRaw = $parser->getReply();
$parser->deviceDetect($otherHeaders);
$resultRaw = $parser->getReply();
//...the result can be from previous detection
I tried already to set
$parser->reply = [];
$parser->rawreply= [];
$parser->detectRequest = [];
But that seems not enough.
If a userAgent is a bot, the result model is populated although it's not a model
Is there any criteria to detect bots?
Array
(
[general_vendor] => Coc Coc Company Limited
[general_model] => Spider
[general_platform] =>
[general_platform_version] =>
[general_platform_version_max] =>
[general_browser] =>
[general_browser_version] =>
[general_image] =>
[general_aliases] =>
[general_eusar] =>
[general_battery] =>
[general_type] =>
[general_cpu] =>
[general_virtual] => 0
[design_formfactor] =>
[design_dimensions] =>
[design_weight] =>
[design_antenna] =>
[design_keyboard] =>
[design_softkeys] =>
[design_sidekeys] =>
[display_type] =>
[display_color] =>
[display_colors] =>
[display_size] =>
[display_x] => 0
[display_y] => 0
[display_ppi] => 0
[display_pixel_ratio] => 0
[display_other] =>
[memory_internal] =>
[memory_slot] =>
[network] =>
[media_camera] =>
[media_secondcamera] =>
[media_videocapture] =>
[media_videoplayback] =>
[media_audio] =>
[media_other] =>
[features] =>
[connectors] =>
[benchmark_min] => 0
[benchmark_max] => 0
[general_app] =>
[general_app_version] =>
[general_app_category] =>
[general_language] =>
[display_css_screen_sizes] =>
)
When using this config
$config = [
'username' => 'something',
'secret' => 'something',
'use_local' => true,
'log_unknown' => false
];
And try to detect a userAgent, you may get Not found
.
This can be a real "not found" or the filesdir
is not correct.
A custom message for not correct installed
or something like that would be good.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.