w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How to simulate a web browser to interact with a https server
I had the same problem a couple of months back, which is when I solved it by using phantomjs. If you are a Linux user and comfortable with CLI then it is very easy to use this tool. If you are a Windows or Mac user then also it must be simple to use. This is a sample phantomjs code which I wrote sometime back. This will load a web page and local.js JavaScript file. After which we can write normal JavaScript code to access and manipulate the DOM. var page = require("webpage").create(); page.open("http://localhost/localdir", function() { page.includeJs("http://localhost/local.js", function() { var xml = page.evaluate(function() { x = window.XML_VAR; return x; });

Categories : C

How do I login to a website programmatically when it crosses over from HTTPS to HTTP?
If you are certain that (1) your client is handling cookies correctly, (2) you are logging in correctly, and (3) the http://www.dotmed.com server is working as expected, then the problem might be the cookie set by https://secure.dotmed.com: To be usable across subdomains, the cookie domain must be Domain=.dotmed.com Since it was set by HTTPS, the cookie MUST NOT set the Secure flag if it is to be usable on a non-HTTPS request.

Categories : C#

Login to a website and open it in web browser
Argh. You can't just do that. Do you ever log in to gmail using internet explorer, and then expect it to work in firefox? ... If you need to log in with your browser, you should probably just get perl to log in with your browser. If you really need to do it with just mechanize, then you probably need mechanize to store the same cookies your browser uses.

Categories : Windows

Scrapy - using scrapy is it possible to login to an https website
Scrapy will support https by default, just be sure to use the right protocol in your URLs when you're launching the scraper.

Categories : Python

How to get Font Awesome to work on iOS Safari Browser on a Ruby based Website
Font awesome uses many different file types to embed it's font. If your site is showing up in certain browsers it's highly likely that you have not correctly copied one of the font sources across. Depending on what version of iOS it is failing on I would double check the .ttf and .svg format. @font-face { font-family: 'FontAwesome'; src: url('../fonts/fontawesome-webfont.eot?v=4.1.0'); /* IE9 Compat Modes */ src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.1.0') format('embedded-opentype'), /* IE6-IE8 */ url('../fonts/fontawesome-webfont.woff?v=4.1.0') format('woff'), /* Modern Browsers */ url('../fonts/fontawesome-webfont.ttf?v=4.1.0') format('truetype'), /* Safari, Android, iOS */ url('../fonts/fontawesome-webfont.svg?v=4.1.0#fontawesomeregular') fo

Categories : IOS

Changing website layout based on screen size and browser window size in Rails
You need to use CSS to do this, it has nothing to do with Rails. See http://www.1stwebdesigner.com/css/responsive-website-tutorial/

Categories : CSS

Simulate Up Arrow Press in Linux
I've found a thread regarding this. The following code should work: shell_exec("echo -n $'e'[A > $pipe");

Categories : PHP

Simulate browser zoom in CSS
I don't believe there is a way to programmatically control the native browser zoom. What you might do instead is use Javascript to control the scaling of your document with CSS while keeping track of the current zoom level, then filtering your mouse coordinates with the current zoom level as a modifier. For example, if you are at 50% zoom, multiplying your mouse coordinates by 0.5 would keep things in sync. Note that the zoom property was proprietary to MSIE and is not yet universally adopted, so it may not work in all browsers: http://dev.w3.org/csswg/css-device-adapt/#the-lsquozoomrsquo-descriptor

Categories : CSS

Facebook login in from a third party static website then redirect to my rails app website
Facebook login on websites ties an app to one domain (or subdomains) - so using the same app for login from different domains will not work. (Although you could have the login button on the other sites link to your app page first, and then handle login there.)

Categories : Ruby On Rails

How to simulate an interrupt storm or a live lock on Linux?
Just create a module with an interrupt forkbomb in it. Google it. It'll only take a second for your vm to halt. http://www.tldp.org/LDP/tlk/dd/interrupts.html

Categories : Linux

How to simulate a true browser with Google API for search?
You don't. You get different results from a browser search because Google generally knows who you are and tailors its search results to be more applicable to you. If you do the search from another person's browser you will get yet different results. When you run the query via API on what I assume is your server Google doesn't have your profile, or likely any profile, and returns a result set based on that. This is called a Filter Bubble and can be slightly infuriating once you know you're in one.

Categories : PHP

Simulate browser access to load all html elements
The page uses js to load the content dymanically. Mechanize simply cannot handle it. You have two options here: try to simulate those js calls manually in the script switch to in-browser tools like selenium Here's the same sample using selenium: import selenium.webdriver as webdriver url = "http://www.youtube.com/watch?v=OuSdU8tbcHY" driver = webdriver.Firefox() driver.get(url) embed = driver.find_elements_by_tag_name('embed')[0] print embed Hope that helps.

Categories : Python

python login to website, no "id" only "class" for login button
Use session. Or cookies are not kept. import requests s = requests.session() # <-- url = 'http://company.page.com/member/index.php' values = {'username': 'myusernamehere', 'password': 'mypasswordhere'} r = s.post(url, data=values) # session.post instead of requests.post # Now you have logged in url = "http://company.page.com/member/member.php" (this is the resulting url after logging in) result = s.get(url) # Use session.get and do not specify cookies. print (result.headers) print (result.text)

Categories : Python

http works fine in mobile browser, but https totally lags in mobile browser
Try to use online tools to make sure nothing is wrong with your certificate. example DigiCert. Also check in your browser if there is a problem with the certificate (Chrome makes easy to check this, click on the secure icon at the left of the URL). If all I said above is file I think the problem is from your HTTP server configuration. Are you using port 443 and did you change default values?

Categories : Http

Put browser full screen and refresh on button click (simulate F11) JavaScript
maybe this can help you example of full screen using the blog post Native Fullscreen JavaScript API (plus jQuery plugin)

Categories : Javascript

How to login to another website from current website
There are multiple options to implement SSO for a .NET application. Check out the following tutorials online: Basics of Single Sign on, July 2012 http://www.codeproject.com/Articles/429166/Basics-of-Single-Sign-on-SSO GaryMcAllisterOnline: ASP.NET MVC 4, ADFS 2.0 and 3rd party STS integration (IdentityServer2), Jan 2013 http://garymcallisteronline.blogspot.com/2013/01/aspnet-mvc-4-adfs-20-and-3rd-party-sts.html The first one uses ASP.NET Web Forms, while the second one uses ASP.NET MVC4. If your requirements allow you to use a third-party solution, also consider OpenID. There's an open source library called DotNetOpenAuth. For further information, read MSDN blog post Integrate OpenAuth/OpenID with your existing ASP.NET application using Universal Providers. Hope this helps!

Categories : C#

HTTPS redirects to totally different website?
i think its a hosting issue. I had similar problem with subdomains, when on one of my subdomains completely different site appeared. Its due to on 1 server (ip) there are more than 1 domain (shared hosting) and it might be not configured properly. Ask your hosting provider support how they would explain and fix it, as this is obviously big security issue.

Categories : Http

ELB and Apache configuration for HTTPS website
This is a valid way to do it. You can have the ELB handle SSL termination. In some compliance cases the entire path has to be encrypted all the way to the instance. If this doesn't apply to you, then you don't have to make any changes.

Categories : Apache

Redirect a website from http to https
This solution helped me. <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://domain.name/$1 [R,L] </IfModule> I hope it'll be helpfull for you too.

Categories : Apache

Redirect website from http to https
I can see that you've taken the code snipet from Steve Marx example The problem is that you have whitespace in your rule name. Just remove them and it will work. The name attribute of rule must not have spaces; the rule won’t work correctly in IIS on Azure with spaces in the name. Find the full article here: Azure https guide

Categories : C#

PHP Curl Login https
Try comparing the HTTP headers sent by your CURL script to those headers sent by your browser (use chrome dev tools). Maybe the remote server is refusing you due to some missing header info. Ensure cookie files have full permissions. From php.net: When specifing CURLOPT_COOKIEFILE or CURLOPT_COOKIEJAR options, don't forget to "chmod 777" that directory where cookie-file must be created.

Categories : PHP

Enable / disable cookie based login in Yii framework on login
You would use this if user checked the remember me checkbox: Yii::app()->user->login($identity, 24*3600*7); and this if he didn't: Yii::app()->user->login($identity, 0); Make sure that you allowed auto login in your config file: 'components' => array( 'user' => array( 'allowAutoLogin'=>true, ), // ... ),

Categories : PHP

Always get a Security Error for Internal HTTPS Website
It almost sounds like you need to trust a self-signed certificate? Perhaps follow: https://confluence.atlassian.com/display/SOURCETREEKB/Resolving+SSL+Self-Signed+Certificate+Errors

Categories : Osx

HTTPS website accessing HTTP WCF service
it seems that you have enables https and want to consume service vai http. so please change your serviceMetadata <serviceMetadata httpsGetEnabled="true"/> to <serviceMetadata httpGetEnabled="true"/>

Categories : Asp Net Mvc

Phonegap with HTTPS Login Page
Greets, getJSON sends data as a GET, so if you want to send data as POST u gotta use a normal ajax post with $.ajax() or the simplified way : $.post(url, dataToBeSent, function(data, textStatus) { //data contains the JSON object //textStatus contains the status: success, error, etc }, "json");

Categories : Jquery

Facebook Login API HTTPS Issue
If you are not loading the javascript sdk async, you could see this error a lot. refer to: https://developers.facebook.com/docs/javascript/quickstart in addition, if you are using any Facebook plugins via the iframe code, be sure the src url protocol matches. <div id="fb-root"></div> <script> window.fbAsyncInit = function() { // init the FB JS SDK FB.init({ appId : 'YOUR_APP_ID', // App ID from the app dashboard channelUrl : '//WWW.YOUR_DOMAIN.COM/channel.html', // Channel file for x-domain comms status : true, // Check Facebook Login status xfbml : true // Look for social plugins on the page }); // Additional initialization

Categories : Facebook

How can I work locally with facebook login with the settings of App Domains and Website with Facebook Login?
Let's say you are doing local development and your app hosted locally with url: http://localhost:53750/ Go to your settings on Facebook: Apps-> YOUR_APP_NAME -> Settings -> Add Platform Select WebSite and enter your url and save changes After that you should have something like: Done. Try to login from your web app.

Categories : Misc

http/https mismatch with linkedin recommendations on a website
I had the same problem while integrating LinkeIn auth on my site. While it didn't stop the linkedin api from working, I was annoyed to see the error popping on the console. So I binded a listener to remove any iframe coming from "https://api.linkedin.com" before it loads. jQuery('body').bind("DOMSubtreeModified", function(evt) { var elemento=evt.delegateTarget.lastChild; if(elemento.tagName=='IFRAME') { if(elemento.src.indexOf('https://api.linkedin.com')!=-1) { jQuery('#'+elemento.id).remove(); } } }); Everything is still working.

Categories : Javascript

Django Login/Session Not Sticking Over HTTPS
It's little longer and complex the SSL system. to handle the session/login properly with https you can set a configuration with the session_cookies. settings.py: ENABLE_SSL=False #in the debug mode in the production passed it to True MIDDLEWARE_CLASSES = ( 'commerce.SSLMiddleware.SSLRedirect', #) # the session here is to use in your views when a user is connected SESSION_COKIE_NAME='sessionid' #the module to store sessions data SESSION_ENGINE='django.contrib.sessions.backends.db' #age of cookie in seconds (default: 2 weeks) SESSION_COOKIE_AGE=7776000 # the number of seconds in 90 days #whether a user's session cookie expires when the web browser is closed SESSION_EXPIRE_AT_BROWSER_CLOSE=False #whether the session cookie should be secure (https:// only) SESSION_COOKIE_SECURE=Fal

Categories : Django

Amazon S3 HTTPS not loading with Chrome and wget on Linux
works here in Ubutnu Linux with Chromium and with wget. It only works in wget if you put " " around the URL, which contains special characters. Otherwise I do get 403 forbidden. I receive a jpeg file, 5.1k. It looks like the same drawing I get on chromium. The URL produces a picture of some kind of rough drawing with black lines. wget version is 1.13.4 chromium about: Chromium 25.0.1364.160 (Developer Build 25.0.1364.160-0ubuntu0.12.10.1) Ubuntu 12.10 OS Linux WebKit 537.22 (trunk@137939) JavaScript V8 3.15.11.16 Flash 11.2 r202 User Agent Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Ubuntu Chromium/25.0.1364.160 Chrome/25.0.1364.160 Safari/537.22 Command Line /usr/lib/chromium-browser/chromium-browser --flag-switches-begin --sync-keystore-e

Categories : Linux

htaccess https rewrite issue when trying to login to cmsms
Well, from my point of view, of course, your "problem" is caused by: (updated) apache rewrite module in new version of apache (what is normal for apache updates anyway) and of course, IF your script have been working fine at - previous server. You might give it a try by removing (or playing around with) these lines away, for a start at least; RewriteRule ^(.*)home$ https://www.energysavingwarehouse.co.uk/$1 [R=301,L] RewriteRule ^(.*)index.php$ https://www.energysavingwarehouse.co.uk/$1 [R=301,L] assuming that your php script supports upcoming URI changes after this. If that will work, get you logged in (and your users will have problems), deal is to write those lines back and a codework for your login panel to obey new rewrite rules. Anyway I would not recommend to mess up php.i

Categories : PHP

AFNetworking - 401 response from https server (login action)
401 is the HTTP status code "Unauthorized", which is sent back from the server when the provided credentials are invalid (incorrect username / password). Check that you're sending the correct information. Also, JSON serialization is provided automatically when AFHTTPClient is configured correctly. See the example app in the AFNetworking repository to see how that is done.

Categories : IOS

Get facebook login popup every time user try to Login using facebook from my website
If you want to login the user everytime he visits the app, you should implement FB.logout, when you get the status as connected on getLoginStatus() when the app starts. So the session when be destroyed and then you can call FB.login again. Just like- // app starts here FB.getLoginStatus() { if(status == "connected") // call FB.logout() // call FB.login() else // call FB.login() }

Categories : Javascript

How can I dump and decrypt HTTPS traffic from the command line under linux?
You can use ssldump.(it works on top of libpcap). ssldump -r <File_Name>.pcap -k <Key_File>.key -d host <IP_Address> You specify the following options with the ssldump utility: -r: Read data from the <File_Name>.pcap file instead of from the network. -k: Use <Key_File>.key file as the location for the SSL keyfile. -d: Display the application data traffic. You may refer the complete example here

Categories : Http

Disable Google Indexing the HTTPS version of our website naked domain
GAE doesn't officially support naked domains. What you're seeing is a limitation of GAE, https://developers.google.com/appengine/kb/general#naked_domain

Categories : Google App Engine

Does my website require https/ssl for Paypal Express Checkout for recurring payment?
If by 'https/ssl' you mean whether your site itself needs to support SSL traffic over HTTP (and thus have a valid SSL certificate): no, it doesn't. You do however need to be able to establish an SSL connection. Specifically, to PayPal's API endpoint. This means you need to allow outbound SSL traffic via your firewall (if you have any) and your environment needs to support this. Ensure you have a valid copy of the root certs (I usually suggest http://curl.haxx.se/ca/cacert.pem) to valid the SSL certificates against.

Categories : Paypal

Perl: How can i test for a URL ( https ) accepting GET requests using "login" parameter
Sending password in a cookie? Nope. Disallow GET for /login. POST username and password to /login, over SSL. In CGI, the GET/POST is indicated via the REQUEST_METHOD environment variable. You cannot stop determined people from issuing a GET request to your server, but you can refuse to process it like so (untested code - you have to fill in details): if ($ENV{REQUEST_METHOD} ne 'POST') { # issue a redirect to a suitable error page, then return. } my $q = CGI->new(); my $user = $q->params('username'); my $password = $q->params('password'); my $encrypted_password = my_password_encryptor($password); unless ( can_log_in($user, $encrypted_password) ) { # issue an error message - redirect&return or fall-through... } else { $session->set_user_

Categories : Perl

Redirect the login page from HTTP to HTTPS via httpd.conf
Since no one else has replied yet I will give it a try, it's untested but maybe it will give you some ideas on how to proceed. Maybe this could work: RewriteEngine on RewriteCond %{HTTP_HOST} ^login.abcde.com RewriteCond %{REQUEST_URI} ^/$ RewriteRule ^/(.+)$ https://client1.abcde.com/$1 [L,R] RewriteCond %{HTTP_HOST} ^login.abcde.com RewriteCond ${HTTPS} !=on RewriteRule ^/(.+)$ [F] Also it looks like in your case you have ^client1.abcde.com$ instead of ^login.abcde.com$ in your RewriteRule, not sure if changing it will make your solution work. Maybe you could do the redirect in the VirtualHost as described in this RedirectSSL wiki page?

Categories : Apache

How to retrieve data from a iframe on a HTTPS secured site with a login
Whenever the response status is 301 or 302, which means a redirection, we'll get the redirected url in 'location' parameter. Then using that url, you need to make the request again. Remember, this url will expect the user to be logged in, so you need to pass on all the cookies too. What you are essentially doing is scraping this website to retrieve data from it. You need to take of the following things: Do the same the steps you want to follow in a browser. Like opening the web page, posting the form and clicking on links etc. Use a development tool on browser(Eg- firebug for Firefox browser) and replicate the same request each time through the code. Any cookies which come in web page response, is automatically saved by the browser and is sent along with the next request. Hence we need

Categories : Python

HTTPS iframe in HTTP page, browser false warnings
Same Origin Policy as specified in RFC 6454 Subsection 3.2 covers the protocol, host, and domain. Iow: Sorry, it's as designed.

Categories : Facebook



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