SitePoint Sponsor

User Tag List

Results 1 to 18 of 18
  1. #1
    SitePoint Addict khuramyz's Avatar
    Join Date
    Oct 2005
    Location
    Manchester, UK
    Posts
    296
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Checking User PCs...

    We would like to check the members pc on cookies, js and popup.
    Is this possible and how ?
    Khuram Javaid
    PHP Developer and Entrepreneur
    http://www.phprad.com/

  2. #2
    Non-Member
    Join Date
    Oct 2009
    Posts
    1,852
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    did you mean to check if js support enabled, cookie support enabled, and popup blocking disabled in user's browser?

  3. #3
    SitePoint Addict khuramyz's Avatar
    Join Date
    Oct 2005
    Location
    Manchester, UK
    Posts
    296
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes sir, I mean exactly that.
    Khuram Javaid
    PHP Developer and Entrepreneur
    http://www.phprad.com/

  4. #4
    Non-Member
    Join Date
    Oct 2009
    Posts
    1,852
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No, browser don't provide such info to the server
    Also, it is never needed though. Why?

  5. #5
    PHP Guru lampcms.com's Avatar
    Join Date
    Jan 2009
    Posts
    921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, it's possible, sort-of....
    There is a class on pear website
    http://pear.php.net/package/Net_UserAgent_Detect

    Some of the things it actually tests for while some other things it just guesses based on browser useragent string

    You can test for support for javascript and cookies and popup blocker yourself by writing a page that sends ajax based request back to your server. Then you can be sure that if you receive this ajax call, the browser supports javascript because without javascript it would not be able to do ajax call.

    For popup, you can write a page that actually opens a popup and that new popup window calls special php file with unique identifier. You would then know that popup was opened. This may annoy the user because you must actually open a popup to determine that user accepts popups.
    My project: Open source Q&A
    (similar to StackOverflow)
    powered by php+MongoDB
    Source on github, collaborators welcome!

  6. #6
    Non-Member
    Join Date
    Oct 2009
    Posts
    1,852
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can test for support for javascript and cookies and popup blocker yourself by writing a page that sends ajax based request back to your server
    ...and then user changes that state

  7. #7
    SitePoint Addict khuramyz's Avatar
    Join Date
    Oct 2005
    Location
    Manchester, UK
    Posts
    296
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For JS and Cookies, I have found the following script.

    http://snippets.bluejon.co.uk/check4...v4-phpcode.php

    I am still working on the Popup detection.
    Khuram Javaid
    PHP Developer and Entrepreneur
    http://www.phprad.com/

  8. #8
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,875
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    If you manage to open a pop up to test if they support popups then they will likely turn off JavaScript for your page in order to stop it happening again.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  9. #9
    SitePoint Addict khuramyz's Avatar
    Join Date
    Oct 2005
    Location
    Manchester, UK
    Posts
    296
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I thought we were discussing computer science not philosophy
    Khuram Javaid
    PHP Developer and Entrepreneur
    http://www.phprad.com/

  10. #10
    Non-Member
    Join Date
    Oct 2009
    Posts
    1,852
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    is it discussion?
    it is more like begging and charity

  11. #11
    SitePoint Addict khuramyz's Avatar
    Join Date
    Oct 2005
    Location
    Manchester, UK
    Posts
    296
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    is it charity?
    I thought misers should mind their own business.
    Khuram Javaid
    PHP Developer and Entrepreneur
    http://www.phprad.com/

  12. #12
    Twitter: @AnthonySterling silver trophy AnthonySterling's Avatar
    Join Date
    Apr 2008
    Location
    North-East, UK.
    Posts
    6,111
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    You have an interesting attitude for someone requiring help.

    Maybe you should be a little less aggressive and maybe offer up a please and `thank you` occasionally?
    @AnthonySterling: I'm a PHP developer, a consultant for oopnorth.com and the organiser of @phpne, a PHP User Group covering the North-East of England.

  13. #13
    SitePoint Guru mmarif4u's Avatar
    Join Date
    Dec 2006
    Location
    /dev/swat
    Posts
    619
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by khuramyz View Post
    I thought we were discussing computer science not philosophy
    Quote Originally Posted by khuramyz View Post
    is it charity?
    I thought misers should mind their own business.
    That's interesting..carry on with these words and you will get no help anywhere.
    BTW what you know about philosophy...? and computer science...?
    Do you think computer science came to existence with out this...?

    You are a programmer right? so you should know there are always "else" for "if". In the above posts, they are guiding you that way... so what philosophy is in that. Can you explain that?

    Next time be careful about your words.

    Good luck.

  14. #14
    SitePoint Addict khuramyz's Avatar
    Join Date
    Oct 2005
    Location
    Manchester, UK
    Posts
    296
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, I apologise for my attitude but I never thought I was being disrespectful.
    It seems like I have to learn more about use of english language which is my native tongue.
    I thought i was merely being funny which I am pretty much not (at least right now )
    What with being told off by the forum biggies and all.

    Sorry for Stephen, Shrapnel.

    Kind Regards
    Khuram Javaid
    PHP Developer and Entrepreneur
    http://www.phprad.com/

  15. #15
    SitePoint Guru
    Join Date
    Nov 2003
    Location
    Huntsville AL
    Posts
    706
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by khuramyz View Post
    Yes, I apologise for my attitude but I never thought I was being disrespectful.
    It seems like I have to learn more about use of english language which is my native tongue.
    I thought i was merely being funny which I am pretty much not (at least right now )
    What with being told off by the forum biggies and all.

    Sorry for Stephen, Shrapnel.

    Kind Regards
    Well, your location is in the UK so it's understandable that your English ain't so good.

  16. #16
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Yes, because what would the country which invented English know about speaking or writing it.
    Unless that's a rather fumbled attempt at humour it's a pretty silly comment to make.

    As for the question:
    No you cannot check for inherent browser support for those particular technologies. It's a case of when they are blocked, their not going to be available.

  17. #17
    SitePoint Addict khuramyz's Avatar
    Join Date
    Oct 2005
    Location
    Manchester, UK
    Posts
    296
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you @Alex.
    I have fixed the page for Cookies and Javascript detection. Pretty Trivial approach.
    Now I just need to check if Popups are available or not. Can I get some help with that ?

    Kind Regards,

    P.S: A small typo (english is NOT my native tongue.... )
    Damn I am still grim from the treatment.
    Khuram Javaid
    PHP Developer and Entrepreneur
    http://www.phprad.com/

  18. #18
    SitePoint Addict khuramyz's Avatar
    Join Date
    Oct 2005
    Location
    Manchester, UK
    Posts
    296
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just in case anyone else needs it, I have found this

    http://www.visitor-stats.com/article...up-blocker.php
    Khuram Javaid
    PHP Developer and Entrepreneur
    http://www.phprad.com/


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •