Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to check output of a created URL?
    primarykey
    data
    text
    <p>I want to make a RuneScape(an MMORPG Game) Name Checker. For this i am using an IRC bot. The URL i am using to check names is this- <a href="http://rscript.org/lookup.php?type=namecheck&amp;name=" rel="nofollow">http://rscript.org/lookup.php?type=namecheck&amp;name=</a></p> <p>I am using javascript to take input and go to this url for checking names. The code i am using is this:</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;script type="text/javascript"&gt; function nameCheck() { var username = document.getElementById('uname').value; var url = "http://rscript.org/lookup.php?type=namecheck&amp;name="; var curl = url + username; } &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;input class="textBox" id="uname" type="text" maxlength="15" required/&gt; &lt;input type="button" onclick="nameCheck()" value="Submit"&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>To proceed with this i need a code that could check the output of the final url created ie. <code>curl</code>. If the output page looks like this:</p> <pre><code>START NAMECHECK: NOTAVALIBLE SUGGESTIONS: blah blah blah END </code></pre> <p>Then the code should run the function <code>nameNotAva()</code>. And if the output is like this:</p> <pre><code>START NAMECHECK: AVALIBLE END </code></pre> <p>Then the code should run the function <code>nameAva()</code>.</p> <p><strong>The question</strong>:</p> <p>I just want that using javascript the output be evalutaled to check that if <code>NAMECHECK: NOTAVAILABLE</code> is a part of the output page or not. If yes then a function <code>nameNotAva()</code> should be run. Otherwise a function <code>nameAva()</code> should be run.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload