user-agent

User-Agent not changing in NSMutableURLRequest

痴心易碎 提交于 2019-12-13 12:29:09
问题 I know there may be several issues about this, but i´m facing a problem when i try to set a new "user agent" for my UIWebView . Here is what i am doing right now: NSURL *myUrl = [NSURL URLWithString:auxUrl]; NSMutableURLRequest *myRequest = [NSMutableURLRequest requestWithURL:myUrl]; NSMutableString *auxUserAgent = [[NSMutableString alloc] initWithString:[myRequest valueForHTTPHeaderField: @"User-Agent"]]; [auxUserAgent appendString:@"(iOS)"]; [myRequest setValue:auxUserAgent

Undefined reference in Qt4

空扰寡人 提交于 2019-12-13 07:10:06
问题 I'm trying to change the user agent in Qt4. My code: main.cpp: #include <QApplication> #include <QDeclarativeContext> #include <QDeclarativeEngine> #include "qmlapplicationviewer.h" #include "NetworkAccessManagerFactory.h" #ifdef DEBUG #include "logger.h" #endif Q_DECL_EXPORT int main(int argc, char *argv[]) { QScopedPointer<QApplication> app(createApplication(argc, argv)); app->setOrganizationName("..."); app->setApplicationName("..."); QmlApplicationViewer viewer; /*and stuff related to it*

Facebook Embedded Post: force mobile view

試著忘記壹切 提交于 2019-12-13 05:57:09
问题 i've created a web platform where you can insert 'facebook embedded posts'. Facebook Embedded Posts Docs As you can see, i can show a post on my pages simply with <div class="fb-post" data-href="{your-post-url}"></div> With this tag, you can show a post in Desktop version: from 350px to 750px width. The mobile view will be used automatically only on mobile devices. Docs says: "On mobile web, Embedded Posts automatically scale to the width of the container." The problem is that i'd like to

IE11 User-Agent - Wrong one when pointing towards localhost - Right one when going towards my PC name?

谁说我不能喝 提交于 2019-12-13 05:24:22
问题 I am using internet explorer 11.0.9600.16438 I am hosing my website locally. When I go to localhost/myWebSite/Default.aspx I get the following User-Agent information: Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like MyCompanyName When I however go to myComputerName/myWebSite/Default.aspx i get the following User-Agent information: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.3; WOW64; Trident/7.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729)

Can't get input stream from URL! Java

筅森魡賤 提交于 2019-12-13 04:26:54
问题 I have the following simple program which reads an image from a url. public class TestWebScrapper { /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here URL imageUrl; try { imageUrl = new URL("https://assets.boxdice.com.au/bj_corporate/listings/1751/4618116b.jpg"); HttpURLConnection connection = (HttpURLConnection) imageUrl.openConnection(); connection.setRequestProperty( "User-Agent", "Mozilla/5.0 (Windows NT 6.3; WOW64;

expand werkzeug useragent class

 ̄綄美尐妖づ 提交于 2019-12-13 01:51:19
问题 I want to expand werkzeug UserAgent class with one more browser. How can I do it without modifying the source code of werkzeug library? I'm new in python so I have small idea about mixins, inheritance, modules and so on. I've found in docs: It’s a good idea to create a custom subclass of the BaseRequest and add missing functionality either via mixins or direct implementation. Here an example for such subclasses: from werkzeug.wrappers import BaseRequest, ETagRequestMixin class Request

Get 32px favicon.ico

浪尽此生 提交于 2019-12-12 22:31:46
问题 Im trying to get the 32px favicon.ico of the websites, but the response it obtain is the 16px favicon, I guess because I´m trying to obtain it by the smarthphone, but I try to change the user agent of the http petition with no result here is my code: DefaultHttpClient client = new DefaultHttpClient(); String baseUrl = getBaseUrl(url); HttpGet httpGet = new HttpGet(baseUrl + "/favicon.ico"); httpGet.setHeader("User-Agent", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko)

Which browser have this strange user agent? (IOS device)

試著忘記壹切 提交于 2019-12-12 18:37:53
问题 I recently notice that approximately 17 % of users with ios device have browser with strange user agent. This user agent like the Safari user agent but with slight modification: it does not contain "Safari/XXXX" string. Example: normal user agent of Safari: Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5355d Safari/8536.25 user agent of browser that i talk: Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like

How to detect touch device browsers vs desktop using javascript?

纵饮孤独 提交于 2019-12-12 18:25:10
问题 What is the code to detect touch devices (smartphones and tablets) vs desktops browsers using userAgent.match and return a boolean variable (for example 'isipad')? I need to test this against Android and Apple devices mainly. If the device browser is Android or Apple, return isipad = false. Else, return isipad = true. So far I went about it like this (for iDevice browser detection) : if( navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i) ||navigator.userAgent.match(

Is there a site which shows peoples User-Agent without cutting off long ones?

◇◆丶佛笑我妖孽 提交于 2019-12-12 18:09:31
问题 Basically, I know of this website http://www.whatsmyuseragent.com but it truncates the user-agents it gathers to 150 chrs. I also know of http://botsvsbrowsers.com but that site (although better) truncates to 200 chrs. I just want a website similar to these ones (any site that shows other users user-agents) but allows for at least 300 chrs or does not truncate them! Also, if you don't know weather the site you have in mind truncates the User-Agent, that's ok. As long as it's a site that lists