w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Which browser have this strange user agent? (IOS device)
The shorter user agent comes when an ipad enters "web app" mode. This means that a phone is parsing the html only using webkit, in full screen mode, not within a safari browser window. Thus only the information about CPU version, webkit version, etc is sent along. http://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html Additional discussion can be found on this very similar post: ipad user agent changes during use?

Categories : IOS

Iphone app browser window - Add value to user agent string
Can't you pass those values as GET params in the url? For android: http://www.somedomain.com/page.html?appName=myAndroidApp&ver=version For ios: http://www.somedomain.com/page.html?appName=myIphoneApp&ver=version

Categories : Android

PHP Server User Agent to determine browser and CSS support
Yes, but I wouldn't recommend doing it yourself. That user agent string is notoriously fickle. Some browsers send it one way, other versions of the same browser send it another. It's a mess to try to keep track of yourself. I would recommend going with a library that can do this for you. Here's one from the CodeIgniter framework I use: http://ellislab.com/codeigniter/user-guide/libraries/user_agent.html There are probably many, many others. This is a pretty commonly-done thing, so there's lots of solutions for it already.

Categories : PHP

Parsing user agent to check for newer version of browser
You can use the following PHP class to determine a user's browser and version. https://github.com/ornicar/php-user-agent/blob/master/README.md

Categories : PHP

HttpServletRequest#getHeader("User-Agent") returns null browser name
String browserName = requestProvider.get().getHeader("User-Agent"); null means whoever sent the request didn't include a "User-Agent" header. String ipAdd = requestProvider.get().getRemoteAddr(); is unlikely to return null under normal circumstances, but there are reports the it may do so in edge cases, like after the response has already been sent. Regardless, "get IP address of the machine on which my application is running" doesn't sound like what getRemoteAddr() is for. It's for getting the address of the most recent client or proxy that sent the request. Is there any alternate way to get IP address & browser name every time? No. You're entirely dependent on the behavior of the HTTP client and/or any intervening proxies to get information like this.

Categories : Java

What is the user agent string of Samsung Galaxy S4 mini in native browser
If you look at the Model Variants section of the Galaxy S4 wikipedia article, you can find the SGH-* codes to search for. Also, there is a link to an article about the S4 mini. There you can find model numbers, such as this one (the only one at the time of writing) GT-I9195. Simply search the web for "GT-I9195 user agent" and you will probably find what you're looking for, for example: Mozilla/5.0 (Linux; Android 4.2.2; en-us; SAMSUNG GT-I9195 Build/JDQ39) AppleWebKit/535.19 (KHTML, like Gecko) Version/1.0 Chrome/18.0.1025.308 Mobile Safari/535.19 Of course, if you actually have access to a device/browser for which you'd like to know the user-agent string you can simply examine the HTTP request headers with a tool like WebInspector or Firebug. As other users have pointed out, there

Categories : Misc

How to force to download a file than view inside the browser depending on the user agent via .htaccess?
If you want to force download for specific file extensions, the easiest way is using AddType which is a mod_mime directive. For pdf, you can add this line to your .htaccess file: AddType application/octet-stream .pdf The key is octet-stream, this is the guy forcing download (and disallowing "Open..." items in download popups for browsers). Hope this helps! EDIT (asker's request in comment) As I got to go I try to give as much details as possible. If you mean to add a user agent 'prevention' you need these lines: RewriteCond %{HTTP_USER_AGENT} ^UserAgentNameHere [OR] (...more user agents...then last one:....) RewriteCond %{HTTP_USER_AGENT} ^AnotherUserAgentsName RewriteRule ^.* - [F,L] If you mean e.g. "forcing download for different browsers only", you need Apache Server v2.4 as you

Categories : Htaccess

How to assign to workers a proxy that requires user name - password and a custom user agent?
Assign User Agent by Desired Capabilities dcap = dict(DesiredCapabilities.PHANTOMJS) dcap["phantomjs.page.settings.userAgent"] = ( "Your User Agent String here . . .") Found API Reference here for the proxy authorization. Add "--proxy-auth=username:password" to server_args. Like . . . service_args = [ '--proxy=xxx.xxx.xx.xxx:xxxx', '--proxy-auth=username:password', '--proxy-type=http', ] Then use both when starting the webdriver driver = webdriver.PhantomJS(desired_capabilities=dcap,service_args=service_args) This took care of all my issues. EDIT: Unable to reproduce solution. Only proxy is changed with above method. EDIT.02: Issue resolved. It was never a coding issue. A new proxy provider at the server level assigned a default UA that ov

Categories : Python

bash script openning firefox browser from browser
Make sure you're running your script on a terminal under same user and same X session. The DISPLAY variable should be set. Add this line to know more info: ... echo "DISPLAY: "$DISPLAY", whoami: $(whoami)" /usr/bin/firefox http://www.google.fr ## No need to add &. Your user should be the same as the one on your X session. If DISPLAY has no value, try setting to :0.0 as a quick hack: ... export DISPLAY=':0.0' /usr/bin/firefox http://www.google.fr If it still doesn't work, try to refer to some threads about DISPLAY like here.

Categories : Linux

What is MATM in my User-agent
MATM is a codename for the hardware, one of several by the same vendor: useragent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0; MATMJS) vendor: TS - useragent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/7.0; MATM) vendor: TS - useragent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/7.0; MATP) vendor: TS - useragent: Mozilla/5.0 (MSIE 9.0; Windows NT 6.3; WOW64; Trident/7.0; MATBJS; rv:11.0) like Gecko vendor: TS - useragent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; Trident/7.0; MATPJS; rv:11.0) like Gecko vendor: TS - useragent: Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; TNJB; rv:11.0) like Gecko vendor: TS - useragent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; Trident/7.0; Touch; TAJB; rv:11.0) like

Categories : Internet Explorer

What is my user.agent version?
For Firefox (Gecko) use <set-property name="user.agent" value="gecko1_8" /> But it depends of the GWT version. Other possible values are ie6, ie8, gecko1_8, safari, opera, ie9.

Categories : Gwt

Is it possible to specify user agent with URL in HTML?
Can the HTML DOM be modified to indicate that either a single or all URLs (<a href=""> elements) use a specific user agent? Not in any standard way. If it's possible to add a custom (non-standard) attribute to the element or possibly a child element to it, that'd work too, if it's valid to do so. "non-standard" is practically invalid by definition. There is a loophole in data- attributes (since they are defined by the specification as a way to add extensions) but: "These attributes are not intended for use by software that is independent of the site that uses the attributes" HTML 5 is a Candidate Recommendation, not a standard.

Categories : HTML

Interesting IOS 6 user agent
Ok basically if you install the Google Search App and visit a site via the app then the user agent will be Mozilla/5.0 (iPhone; CPU iPhone OS 6_1_4 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Mobile/10B350 Hope this helps someone.

Categories : IOS

How do I set the user agent in Volley?
You should override the method getHeaders() in Request and set the "User-agent" header In your Request class: @Override public Map<String, String> getHeaders(){ Map<String, String> headers = new HashMap<String, String>(); headers.put("User-agent", "YOUR_USER_AGENT"); return headers; }

Categories : Android

Powershell/PoshGit - 'Could not find ssh-agent'
You just need to reverse those two lines in your Microsoft.PowerShell_profile.ps1 so that the PATH environment variable is updated to include the Git bin path before you include the posh-git profile. On my PC this is what it looks like: I start PowerShell and get the warning message: WARNING: Could not find ssh-agent I locate and edit the PowerShell profile using $profile: C:Usersglombard> notepad $profile Update the $env:path to include the path to git before loading the posh-git example profile: $env:path += ";${env:ProgramFiles(x86)}Gitin" # Load posh-git example profile . 'C: oolsposhgitdahlbyk-posh-git-22f4e77profile.example.ps1'

Categories : GIT

Change User-Agent of audio tag
I don't think there's a way to change the User-Agent. But you can force SHOUTcast to serve the stream by adding a Semicolon ; to the end of the URL. SHOUTcast will then ignore the User-Agent. HTML5 example: <!DOCTYPE html> <html> <body> <audio controls> <source src="http://72.13.82.82:5100/;"/> <em>Sorry, your browser doesn't support HTML5 audio.</em> </audio> </body> </html> You can also verify the workaround by visiting http://72.13.82.82:5100/; directly in browser. You should see some ICY-metadata followed by the mpeg stream.

Categories : Javascript

IE8 reporting its user agent string as IE9
We had a customer with the same issue. Also stumped. We changed to using TRIDENT as well as the MSIE number to accurately detect what they were using. If they are using Trident 4, it is either IE 8 (or IE 7 because of compat mode) but nothing higher. Same for other versions of IE as well. Trident 5 can't be higher than IE 9, etc.

Categories : Internet Explorer

Setting User Agent of URLClassLoader
Try using this constructor: URLClassLoader(URL[] urls, ClassLoader parent, URLStreamHandlerFactory factory) By overriding some stuff in the factory, you should be able to set the user agent before it establishes a URL connection.

Categories : Java

what is the user agent string (github api)
You need to pass a user agent string like it says :) I just pulled one from chrome: require( 'https' ) .get({ hostname : 'api.github.com' , path :'/repos/cwolves/jquery-imask/issues' , headers : { 'User-Agent' : 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1521.3 Safari/537.36' } }, function(res){ res.on('data',function(data){ console.log(data+''); }); });

Categories : Javascript

Can't change user agent php curl
curl_setopt($ch, CURLOPT_HTTPHEADER, array("User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3")); This worked for me and was necessary to post to NodeJs server since PHP's cURL did not by default provide one.

Categories : PHP

What user.agent property value should i use in gwt.xml for FF21?
There is only one firefox user agent and is gecko1_8. It targets the gecko engine 1.8 and onwards, hence FF >= 1.5 according to this. Have a look at here to find all the available user agents you can use.

Categories : Gwt

H3 being overwritten by user agent stylesheet but only for em
h1 { font-size: 3.929 em } h2 { font-size: 2.072 em; text-transform: uppercase; } h3 { font-size: 2.072 em; padding: 10px 0;} take away the spaces between the number and the 'em' h1 { font-size: 3.929em } h2 { font-size: 2.072em; text-transform: uppercase; } h3 { font-size: 2.072em; padding: 10px 0;}

Categories : Misc

how to change user agent in selenium with .net
In c#: public static FirefoxProfile myFireProfile = new FirefoxProfile(); myFireProfile.SetPreference("general.useragent.override", "Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10"); public IWebDriver driver= new FirefoxDriver(myFireProfile);

Categories : Dotnet

What is 'AskTbPTV' in HTTP User Agent?
Ask.com toolbar http://apnstatic.ask.com/static/toolbar/everest/download/index.html?source=sp wich modify user agent string.

Categories : Misc

How can I divide users by their user-agent?
Yu should have a look at https://github.com/brendanlim/mobile-fu. It should help you to accomplish things like this. It also enables you to check in your templates for mobile devices.

Categories : Javascript

Load different .css basing on user-agent - GWT project
I am using mgwt for creating mobile gwt apps. There is a themeing based on user agent: https://code.google.com/p/mgwt/source/browse/src/main/java/com/googlecode/mgwt/ui/client/theme/MGWTThemeBaseThemeStandardImpl.java In your Bundle you can seperate different css. If you don't use CssResources you may just use the StyleInjector

Categories : CSS

Allow only one User-Agent, block the rest in nginx?
You can try the following in the proper location set $isallowed = ""; if ($http_user_agent = allowed_user_agent) { set $isallowed "${isallowed}YES"; } if ($isallowed !~ YES) { rewrite ^ http://yourserver.com permanent; }

Categories : Nginx

Regex to parse a user agent string
This regex will capture it: (?<=().*?;.*?;.*?(?=;) As code it would be: string s = Regex.Match(input, @"(?<=().*?;.*?;.*?(?=;)").Value As breakdown of the regex: (?<=() = a "look behind" that asserts the previous char is a literal open bracket ( .*?; = a (non-greedy - won't skip ;) match of everything up to the next ; (?=;) = a "look ahead" that asserts the next char is a literal semi-colon ;

Categories : C#

Extract bot name from user-agent string-Python
Try following: import re lines = [ 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)', 'Mozilla/5.0 (compatible; AhrefsBot/4.0; +http://ahrefs.com/robot/)', 'msnbot/2.0b (+http://search.msn.com/msnbot.htm)' ] botname = re.compile('w+bot/[.w]+', flags=re.IGNORECASE) for line in lines: matched = botname.search(line) if matched: print(matched.group()) prints Googlebot/2.1 AhrefsBot/4.0 msnbot/2.0b assumed that bot agent names contain bot/.

Categories : Python

mobile user agent detection with htaccess
You don't want to redirect to /getapp if you're already there. Try excluding that URI: RewriteCond %{HTTP_USER_AGENT} "android|ipad|iphone|ipod" [NC] RewriteRule !^getapp http://www.example.com/getapp [L,R=302] To allow an optout after a user visits the getapp page, you'll need to persist a cookie or something: RewriteCond %{HTTP_USER_AGENT} "android|ipad|iphone|ipod" [NC] RewriteCond %{HTTP_COOKIE} !app-optout RewriteRule !^getapp http://www.example.com/getapp [L,R=302] RewriteCond %{HTTP_USER_AGENT} "android|ipad|iphone|ipod" [NC] RewriteRule ^getapp - [CO=app-optout:1:www.example.com] So here, you only redirect to /getapp if there is no "app-optout" cookie. Once there, you set the opt out so that they don't get redirected there again if they navigate out of the getapp page.

Categories : Android

IE 11 sends different User-Agent header to different subdomains
Microsoft has the site in question configured to use UA-spoofing (via the Compatibility View list) and that causes IE to send a custom UA string. CompatView-based UA spoofing was enabled in IE8 in 2008: http://blogs.msdn.com/b/ie/archive/2008/08/27/introducing-compatibility-view.aspx And in IE10+, it's gotten richer, with per-site spoofing to enable the best experience. See http://blogs.msdn.com/b/ieinternals/archive/2013/09/21/internet-explorer-11-user-agent-string-ua-string-sniffing-compatibility-with-gecko-webkit.aspx for an exploration of this topic.

Categories : Internet Explorer

Is is possible to specify (fake) a User Agent using IIS Reverse Proxy?
The solution was simple enough. In IIS in the URL Rewrite configuration slick View Server Variables... in the right hand column. Click add and enter the name of the Server Variable - in this case HTTP_USER_AGENT. This will allow you to use and/or modify this specific server variable during the routing process. This is the step that I had missed, or gotten wrong before. To my knowledge this can't be done in the web.config file. I'm sure there's a command line to do it, but I don't know that. After adding HTTP_USER_AGENT to the allowed server variables list it is just a matter of setting that either through IIS or in the Web.config file add the desired value to the server variables section. <rule name="..." enabled="true" stopProcessing="true"> <match url="[pattern]" />

Categories : Dotnet

Checking user agent in cookies, minor changes
I'm just gonna throw this out here. User-Agents are a bad security measure. But there's not a lot of other alternatives. So! To get the user agent string... $_SERVER['HTTP_USER_AGENT']; Now if your encrypting and setting it to cookies, and worried by small changes (which should only happen if the browser changes or gets updated). I would suggest stripping this info down and using basic info like OS, Hardware, and Browser Brand. There are PHP libraries available to help facilitate the parsing of these strings. You can also salt this with the users IP address if your really worried. You can get the IP with... $_SERVER['REMOTE_ADDR']; But remember, both of these values can be faked EASILY and are not to be trusted.

Categories : PHP

Unable to change the user-agent in Silverlight C#. how I can do it?
According to the documentation for the Silverlight WebHeaderCollection user-agent is listed as a restricted field that you cannot change, so it appears that there is no way to change it. Some common headers are considered restricted and are either exposed directly (such as Content-Type) or protected by the system and cannot be set or changed in a WebHeaderCollection object. Any attempt to set one of these restricted headers in the WebHeaderCollection object associated with a HttpWebRequest object throws an exception. Any attempt to set one of these restricted headers in the WebHeaderCollection object associated with a WebClient object will throw an exception later when attempting to send the WebClient request. Many of these restricted headers are set by the web bro

Categories : C#

how to set user agent in rspec route assertions
I'm not sure this will work, but here's something to try: If you look at the source for the RouteToMatcher, it just parses a controller/action pair (given as a hash or in controller#action format) and any other parameters given along with them and then delegates to ActionDispatch::Assertions::RoutingAssertions#assert_recognizes. But that method builds the request object from the parameters you pass in as the argument to route_to. So there's no easy way to access the request object from your spec. However, to build this dummy request, it calls ActionController::TestRequest.new So you might try ActionController::TestRequest.any_instance.stub(:user_agent). and_return "Mozilla/5.0 (iPhone; CPU iPhone OS 6_1_3 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10B329

Categories : Ruby On Rails

Change User Agent in IE7 through javascript/html
No, you cannot change the UA String of the browser from script. You can do it with an extension or the registry. But the premise of your question is wrong-- if you change the UA string to "trick" the application, you may avoid the "You need to upgrade your browser" error message and instead you'll just have broken pages that are throwing exceptions or laying out incorrectly because they depend on IE8+ features that aren't present in IE7. IE7 is crusty, insecure, and shouldn't be used any longer.

Categories : Javascript

Using user-agent language with Django Translation
I would go for user agent because the user is able to set his preferred language in his browser. IP location says nothing about the language the user actually speaks nor does the user have any influence on it. In both cases you can still provide a language selector on your page as well.

Categories : Django

How to find all SQL Agent Jobs that call a given stored-proc
Here is a query that will give you that and more (look at the WHERE clause for the stored proc name): SELECT [sJOB].[job_id] AS [JobID] , [sJOB].[name] AS [JobName] , [sJSTP].[step_uid] AS [StepID] , [sJSTP].[step_id] AS [StepNo] , [sJSTP].[step_name] AS [StepName] , CASE [sJSTP].[subsystem] WHEN 'ActiveScripting' THEN 'ActiveX Script' WHEN 'CmdExec' THEN 'Operating system (CmdExec)' WHEN 'PowerShell' THEN 'PowerShell' WHEN 'Distribution' THEN 'Replication Distributor' WHEN 'Merge' THEN 'Replication Merge' WHEN 'QueueReader' THEN 'Replication Queue Reader' WHEN 'Snapshot' THEN 'Replication Snapshot' WHEN 'LogReader' THEN 'Replication Transaction-Log Reader' WHEN 'ANALYSISCOMMAND' THEN 'SQL Serv

Categories : Sql Server

Python: User-agent information urllib retrieve()
i dont think you can add custom headers while using urllib but i know there are multiple ways to do it using urllib2 one way you could is like this: import urllib2 headers = { 'User-Agent' : 'Mozilla/5.0' } req = urllib2.Request('http://example.com/image.jpg', None, headers) html = urllib2.urlopen(req).read() with open('download.jpg','r+') as f: f.write(html) this will download the image but the 'download.jpg' has to already exist there are more ways to do it i would take a look at this Setting the User-Agent also take a look at this Question Good Luck!

Categories : Misc

Smarty PHP, AbanteCart E-Commerce User Agent Theme
i guess the easiest way is hook of all controllers and adding new variable into request (sf) which contains template_text_id... plus using cookie about template mode(desktop or mobile). /** * redirect to mobile template if we load page in mobile device **/ public function onAHook_InitEnd() { if ( $this->_processHooks() ) return; $device = $this->baseObject->request->getDeviceType(); if ( !empty($device) && empty( $this->baseObject->request->cookie['abantecart_mobile_redirect'] ) ) { //set flag that redirect was done setcookie("abantecart_mobile_redirect", "1", time() + 3600*24); //set template to mobile $url = $this->baseObject->html->removeQueryVar($_SERVER['REQUEST_URI'], 'sf'); $url .= '&sf

Categories : PHP



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.