1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Steps in creating this web app?

Discussion in 'Programming' started by Dr.Weed, Apr 8, 2015.

  1. #1
    So I need to create a web app that does the following. So there is this website with chat, something like Wall, where people post messages. Well, what I need is to get a notification via email when a specific guy make a post. So when "Joe Doe" posts a message, I will immediatelly receive an email.

    Now, I'm new to this (web apps), but I can pick it up very fast. All I need to do is to understand it. That's why I need you guys to help on what is the best way and how should I do this? What language to use? JavaScript? PHP? What's the logic behind? How does it work?

    Regards
     
    Dr.Weed, Apr 8, 2015 IP
  2. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #2
    First question would be - is this a page you control? Or do you need to make something that will scan a page (made by someone else) and notify you if a user (or a set of users) posts?
     
    PoPSiCLe, Apr 8, 2015 IP
  3. Dr.Weed

    Dr.Weed Greenhorn

    Messages:
    64
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #3
    Its not my website
     
    Dr.Weed, Apr 8, 2015 IP
  4. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #4
    Well... first of all, what you're trying to do is probably not gonna be welcomed by the site in question, but there are ways to do it - one way would be to use PHP (or some other server-side scripting language) and pull info from the site at regular intervals, and if there's a post by the person or persons you've singled out, you get an email sent to you - it will, however, not be immediate (unless you pull info every second, which will be stressful for both your and their server, and will probably get you blocked).
    Another way would be to have the site open in a tab in a browser (or in a completely separate browser), and run a javascript (user.js) which refreshes the page, looks for content matching the criteria, and if so, notifies you - however, you can't really send an email via javascript (it's run on the client side, and doesn't have access to an email-server) - so there's that. It's also rather restrictive on what it allows transferred - what you probably could do is create a cookie, and fetch that cookie on another site, even run on localhost, which would then trigger if the cookie is set to "true" or something, and email you. It would however demand that you have the site open at all times and run the js-file.
     
    PoPSiCLe, Apr 9, 2015 IP
  5. Dr.Weed

    Dr.Weed Greenhorn

    Messages:
    64
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #5
    I was thinking about Chrome extension. And dont worry, there is no site refreshing, because this chat, refreshes itself.
     
    Dr.Weed, Apr 9, 2015 IP
  6. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #6
    aha - I didn't catch the chat-reference - that might be hard to catch with a server-pull - depends on what you get on a html-request pull, really - I think your best bet is some kind of, as you say, chrome extension or Greasemonkey-script (the latter will work on any browser able to load the Greasemonkey-plugin).
     
    PoPSiCLe, Apr 9, 2015 IP
  7. Dr.Weed

    Dr.Weed Greenhorn

    Messages:
    64
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #7
    So that extension would search for a specific phrase every 30secs or 1min
     
    Dr.Weed, Apr 9, 2015 IP
  8. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #8
    That would be perfectly doable, yes - however, while you could make Greasemonkey send the information in some way, it will be tough to get it to send emails - that would mean you would have to tie it into something else - if it's an open tab somewhere, maybe it could notify you via a messenger app, or post to a similar open Gmail-tab or something - never tried anything like that myself, so not entirely sure what can be achieved.
     
    PoPSiCLe, Apr 9, 2015 IP
  9. HowDoYou

    HowDoYou Well-Known Member

    Messages:
    443
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    130
    #9
    If its a web app with a live updating chat, then it is already polling the server ever few seconds, using web sockets, Ajax, or similar. Your best bet would be to monitor how this chat is loading new messages, and clone the process in your own application, C#, PHP, etc. The language you choose would primary be dependent on if you want this ran on your local machine, a remote VP server, shared hosting, etc.
     
    HowDoYou, Apr 16, 2015 IP