dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: How To Check Whether An Html Element Or Plain Text Exists On A Page Or Not

  1. #1
    Join Date
    Oct 2016
    Posts
    109

    Question How To Check Whether An Html Element Or Plain Text Exists On A Page Or Not

    Pros,


    Imagine you want to only provide your download link to those who tweet about you. Now, how would you code it ?
    Let's make it simple for you to understand.
    Let's say you want to write a php script that checks if a certain html element (eg. name=username) or plain text exists or not.
    If it exists then to give you an alert "TRUE"; Else alert: FALSE.

    In this example, you want the script to check this page:
    https://twitter.com/TangoForce123

    And you want it to check if the following text (exact match) exists or not:
    "I'd like to put forward an Idea"

    How would you code it ? Can we see 2-3 examples ?
    I'd be grateful if you can show another example for a fuzzy match. Eg:
    * like to put forward *

    This is an interesting topic. Base the boolean around what exists or not on a page.
    Curious to see what the code would look like and php is capable of doing it in how many lines of code.


    Thanks

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    21,978
    I'd start by seeing if the Twitter API would give me a dependable way to do it. https://dev.twitter.com/overview/api
    "Well done....Consciousness to sarcasm in five seconds!" ~ Terry Pratchett, Night Watch

    How to Ask Questions the Smart Way (not affiliated with this site, but well worth reading)

    My Blog
    cwrBlog: simple, no-database PHP blogging framework

  3. #3
    Join Date
    Apr 2017
    Location
    USA
    Posts
    6
    Nowadays, many tools are present here for checking, also use Firefox Add-ons.


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles