Однозначно определите один компьютер

Это для массива строк:

string.Join(delimiter, array);

Это для List< string>:

string.Join(delimiter, list.ToArray());

И это для списка пользовательских объектов:

string.Join(delimiter, list.Select(i => i.Boo).ToArray());
6
задан 25 August 2009 в 21:17
поделиться

6 ответов

You can set a cookie. This will be remembered by the client and transmitted to the server as part of every request. More information here: http://www.w3schools.com/PHP/php_cookies.asp

12
ответ дан 8 December 2019 в 04:30
поделиться

Change Firefox's user agent header to something that uniquely identifies that machine, you can then extract this string in PHP from $_SERVER['HTTP_USER_AGENT'].

See How to edit the User Agent string

7
ответ дан 8 December 2019 в 04:30
поделиться

You could set a cookie, or alternatively, you could modify the UserAgent header that your Firefox installation is using to something distinctive.

To change the User Agent string, just enter about:config as an address in the address bar of FireFox, the location where you normally enter a URL (link). I recommend to preserve the original value, which you can get when you enter just about: in the address bar.

Now press the right mouse button to get the context menu and select "String" from the menu entry "New". Enter the preference name "general.useragent.override", without the quotes. Next, enter the new User Agent value you want Mozilla Firefox to use. I added my name and a link to my web site to the original value. You can also pick one from the list of User Agent strings. Check the new value by entering about: in the address bar.

You can retrieve this User-Agent string from $_SERVER['HTTP_USER_AGENT'] in php.

4
ответ дан 8 December 2019 в 04:30
поделиться
3
ответ дан 8 December 2019 в 04:30
поделиться

Some thoughts:

  • Set a durable cookie. (Since FF is in kiosk mode, you should be safe from the users clearing it.)
  • Have that kiosk use a different URL (perhaps with a query string parameter).

What I wouldn't do is work according to the machine's MAC address (which Gibson tells us is possible) or similar; too fragile when hardware gets fixed, etc.

2
ответ дан 8 December 2019 в 04:30
поделиться

Don't you have a SessionID ? Your sessionID should be unique enough to identify a computer.

-4
ответ дан 8 December 2019 в 04:30
поделиться
Другие вопросы по тегам:

Похожие вопросы: