+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 10 of 14

Thread: Can I change input variables

  1. Join Date
    Aug 2005
    Posts
    13

    Can I change input variables

    Hi - great script,

    Can I change the input variable names and values? It would help to integrate with my current search forms. I tried changing in the search bar in config but that didn't work.

    I'd like to change

    <input type='hidden' name='page' value='WhoisSearch'>

    to

    <input type="hidden" name="c" value="1">


    and

    <input name='domain' type='text' value=''>

    to

    <input name="keywords" type='text' value="">

  2. Join Date
    Aug 2004
    Posts
    781

    Can I change input variables

    well, I suppose you could.

    But first let me just make sure that you are not doing this for the wrong reasons. In fact, you really shouldn't ever have to change these variable names. For example, you could instead include the page (<?php include("/absolute/path/to/whois.php"); ?>).

    But if you really want to, you can change them to whatever you want, and then open up whois.php and find:
    $_REQUEST['var_name'] where var_name is, for example, 'domain', and replace it with whatever you change it to (for example, 'keywords').

    There may need to be other changes in other files too, especially in display.php, where something like &amp;page=, &amp;domain=, etc can be found and will need to be changed.

  3. Join Date
    Aug 2005
    Posts
    13

    Can I change input variables

    No luck yet.

    I changed Search bar to

    <form name='whois_search' method='get' action='[[site-url]]whois.php'>
    <input type='hidden' name='c' value='1'>

    <input name='keywords' type='text' value='[[user-domain]]' size="49">

  4. Join Date
    Aug 2005
    Posts
    13

    Can I change input variables

    No luck yet.

    I changed Search bar to

    <form name='whois_search' method='get' action='[[site-url]]whois.php'>
    <input type='hidden' name='c' value='1'>

    <input name='keywords' type='text' value='[[user-domain]]' size="49">

  5. Join Date
    Aug 2005
    Posts
    13

    Can I change input variables

    whois.php I changed to

    $domains = explode("\n", str_replace("\r\n", "\n", $_REQUEST['keywords']));

  6. Join Date
    Aug 2005
    Posts
    13

    Can I change input variables

    [sorry for multiple posts - for some reason board keeps cutting off message]

    there was also $domain = $_REQUEST['domain'];


  7. Join Date
    Aug 2005
    Posts
    13

    Can I change input variables

    in line 77 which I tried changing and leaving alone

  8. Join Date
    Aug 2005
    Posts
    13

    Can I change input variables

    in display.php I changed

    "whois.php?page=WhoisReport&amp;domain=" . $current_domain->getDomain() . "&amp;ext=" . $current_domain->getExt()

    to
    "whois.php?c=WhoisReport&amp;keywords=" . $current_domain->getDomain() . "&amp;ext=" . $current_domain->getExt()

    --------


  9. Join Date
    Aug 2005
    Posts
    13

    Can I change input variables

    and this is the comparison urls

    page=WhoisSearch&domain=test&submit=Check+Availabi lity

    c=1&keywords=test&submit=Check+Availability

    the second is my try - it just returns a blank space where the results should be

  10. Join Date
    Aug 2005
    Posts
    13

    Can I change input variables

    looked to me like WhoisSearch needed to be replace by 1 somewhere in the script - but changing it back to WhoisSearch in search bar didn't help

    c=WhoisSearch&keywords=test&submit=Check+Availabil ity

    still gave nothing

+ Reply to Thread

Posting Permissions

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