browser

how to prevent user from using multiple browsers at a time

十年热恋 提交于 2019-12-22 00:31:02
问题 I have login system in my site and users have to pay for using my site. As they have to pay, I am afraid that one user may share his username and password with another users. So I have to set my login system in such way that no user can use more than one browser at a time. But they can change the browser from time to time (not at the same time but different periods of a day). How can I implement that by php? Any idea? 回答1: Use helper javascript preloader to collect non-personal browser

New to PHP logins and sessions; Is this safe enough?

冷暖自知 提交于 2019-12-21 23:36:54
问题 I have a classifieds website which I am creating a login system for... In the code below, a form with "username" and "password" has been submitted to. Also a "remember_me" feature is available (Code is not tested yet): else if($row['password']===$pass){ session_start(); $_SESSION['logged_in'] = '1'; $remember_me = isset($_POST['remember']) ? $_POST['remember'] : '0'; if($remember_me=='1'){ $text = "SECRET_TEXT_AND_NUMBERS_HERE"; $username= $row['username']; $salt1 = sha1($row['alt_username'])

How to change script location on firefox addon?

拈花ヽ惹草 提交于 2019-12-21 23:05:15
问题 What is the simplest way to make the firefox addon, which repeats this chrome functionality: chrome.webRequest.onBeforeRequest.addListener( function(info) { if(info.url.indexOf("notifier") + 1){ return {redirectUrl: "https://domain.null/1.js"}; } }, { urls: [ "*://domain2.null/*" ], types: ["script"] }, ["blocking"]); I know about nsIContentPolicy in firefox, but I don't understand how to use it. All opinions, advice, and help will be appreciated Answer I've determined the problem with the

how to disable “save as” and “print” option of browser

半腔热情 提交于 2019-12-21 22:11:51
问题 Can any one tell me how to disable "save as" and "print" option of browser menu bar? if I go through File->Save As or Print, the document gets printed and saved. I want to prevent this. Can any one help me out in this issue? Thanks in advance 回答1: <style type="text/css"> @media print{ body {display:none;} } </style> The above code can be used to disable the user from printing the webpage.I have tested this code, its working fine for me in IE8, Chrome and Firefox. 来源: https://stackoverflow.com

Display Custom Dialog When File Downloaded

烈酒焚心 提交于 2019-12-21 21:42:21
问题 Looking for a solution to my issue. We are building a web browser control into a product for a client, they need to be able to detect when there is a File Upload box on a website, then instead of it launching the Windows 7 File Browser window, it needs to open their own custom designed one Is there a browser event that allows us to capture that? 回答1: You can hook up your own download manager that is effective only in your webbrowser control host process by implementing IServiceProvider in the

Django: Creating a unique identifier for a user based on request.META values

懵懂的女人 提交于 2019-12-21 21:35:00
问题 I'm looking at creating an anonymous poll. However, I want to prevent users from voting twice. I was thinking of hashing some request.META values like so: from hashlib import md5 request_id_keys = ( 'HTTP_ACCEPT_CHARSET', 'HTTP_ACCEPT', 'HTTP_ACCEPT_ENCODING', 'HTTP_ACCEPT_LANGUAGE', 'HTTP_CONNECTION', 'HTTP_USER_AGENT', 'REMOTE_ADDR', ) request_id = md5('|'.join([request.META.get(k, '') for k in requst_id_keys])).hexdigest() My questions: Good idea? Bad idea? Why? Are some of these keys

WebBrowser Control and GetElement by ID

一笑奈何 提交于 2019-12-21 21:31:49
问题 I am using Visual C# Winforms to control a WebBrowser object. Specifically I want to use WebBrowser.Document.GetObjectByID("myid").Style to set the style of an object that is part of the document loaded into the WebBrowser object. I want to have button on the WinForm toggle the Style of a heading from "display:none" to "display:block;text-align:middle". This is what I am doing: private void frmView_Load(object sender, EventArgs e) { string question = "How many cows?"; string answer = "5 cows"

DIV absolute positioning - maintain position after browser window resize

浪子不回头ぞ 提交于 2019-12-21 20:29:19
问题 I am displaying divs with position absolute. .my_label{ list-style:none; list-style-type:none; position:absolute; top:2px; left:10px; width:20px; height:20px; background-color:#FF1021; } once I re-size the browser window, all these divs stay at same position. and they're not absolute to the parent elements anymore. I want them to stay in relation with the surrounding objects. should I use position "relative" or is there another way? (also jQuery is welcome) thanks a lot 回答1: To make an

Are there any ways to embed a browser in Android app?

末鹿安然 提交于 2019-12-21 17:45:20
问题 I'm working on a project that needs to manage requests(html/javascript) and many more other things. I Used Chromiumembedded for windows. Now I need something like that for android. I've searched about android programming and spent some time on Phonegap. As I know it opens a webview and have some javascript API for some device features like camera. So Phonegap is not going to help me. I wonder if there is any way to embed Chrome or any other browser that can be embedded in an android app? 回答1:

Stop alert javascript popup in webbrowser c# control

天涯浪子 提交于 2019-12-21 17:21:58
问题 This website : http://blog.joins.com/media/folderListSlide.asp?uid=ddatk&folder=3&list_id=9960150 has this code: <script>alert('¿Ã¹Ù¸¥ Çü½ÄÀÌ ¾Æ´Õ´Ï´Ù.');</script> So my web browser control show a popup, how can I bypass the popup without using sendkeys enter?? 回答1: In the ProgressChanged event handler, you insert a script element that replaces the Javascript alert function with a function of your own, that does nothing: private void webBrowser1_ProgressChanged(object sender,