Import PHP Script help please please

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • midanceptyltd
    Corporal

    • Apr 2010
    • 18

    Import PHP Script help please please

    Hi I am trying to import the following PHP script into bv but it dosnt work when i input it into the html box

    help what am i doing wrong
    <?php
    /**
    * Netregistry Console API PHP sample.
    * Copyright (c) 2009 Netregistry Pty Ltd.
    *
    * Authorised for use by official Netregistry resellers only. For support please
    * contact resellers@netregistry.com.au
    *
    * @web www.netregistry.com.au
    **/
    // Start Domain Lookup Form function

    function domainlookupform() {
    ?>

    <table>
    <form method='post' action=''>
    <tr>
    <td>Domain Name: </td><td><input type='text' name='domain' size='20'>
    <select name="tld">
    <option value=".com.au">.com.au</option>
    <option value=".net.au">.net.au</option>
    <option value=".org.au">.org.au</option>
    <option value=".com">.com</option>
    <option value=".net">.net</option>
    <option value=".org">.org</option>
    </select></td></tr>
    </tr>
    <td><input type='submit' name='submit' value='Lookup Domain'></td></tr>
    </form>
    </table>
    <?php
    }
    // End Domain Lookup Form function
    // Start Submit and Display Results function
    function getResults() {
    /**
    * BEGIN EDITABLE CONFIGURATION
    */
    // connection credentials and settings
    $location = 'https://theconsole.netregistry.com.au/external/services/ResellerAPIService/';
    $wsdl = $location.'?wsdl';
    $username = 'XXXXXXXXXXXXXXXX';
    $password = 'XXXXXXXXXXXXXXXX';
    // if you do not need to use a proxy host and port, just comment these two lines out
    // these are the correct and default settings for use on the Netregistry hosting infrastructure
    $proxyHost = '192.168.241.146';
    $proxyPort = 3128;
    /**
    * END EDITABLE CONFIGURATION - SEE BELOW FOR SAMPLE USAGE OF METHODS
    */

    $domain = $_POST['domain'];
    $tld = $_POST['tld'];

    $domainname = $domain . $tld;
    // include the console and client classes
    include "class_console.php";
    include "class_client.php";
    // if the proxy and host are not set, set them to null
    if(!isset($proxyHost) || !isset($proxyPort) || empty($proxyHost) || empty($proxyPort)) {
    $proxyHost = NULL;
    $proxyPort = NULL;
    }
    // create a client resource / connection
    $client = new Client($location, $wsdl, $username, $password, $proxyHost, $proxyPort);
    /**
    * Example usage and output results to screen
    */
    // Example #1: Check domain name availability
    print('========== consoleMethod[domainLookup] ==========<br/>');
    $client->set('domain', $domainname);
    $client->domainLookup();
    $result = ($client->response());
    $array = $result->return->fields->entries;
    foreach ($array as $value) {
    $i = $value->key;
    switch ($i) {
    case "domain.status" :
    $domainavailability = $value->value;
    break;
    case "domain.name" :
    $domainsearched = $value->value;
    break;
    }
    }
    //Displaying results in our own custom way
    echo $domainsearched . " is " . $domainavailability;
    $client->del('domain');
    }
    // End Submit and Display Results function
    // Start Website Code
    // If user have not posted then
    if(!isset($_POST['submit'])) {
    domainlookupform();

    }
    // If user has posted form then
    if(isset($_POST['submit'])) {
    getResults();
    }
    ?>
  • navaldesign
    General & Forum Moderator

    • Oct 2005
    • 12080

    #2
    Re: Import PHP Script help please please

    Did you upload the necessary auxiliary files ? It seems to be including "class_console.php" and "class_client.php" which should be in the same folder as the form.
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

    Comment

    • midanceptyltd
      Corporal

      • Apr 2010
      • 18

      #3
      Re: Import PHP Script help please please

      No I haven't but I do have those scripts so in which order should I do it
      class_client.php then the one i posted then class_console.php

      Comment

      • midanceptyltd
        Corporal

        • Apr 2010
        • 18

        #4
        Re: Import PHP Script help please please

        Did you upload the necessary auxiliary files ? It seems to be including "class_console.php" and "class_client.php" which should be in the same folder as the form.

        So when u say that when I am creating a form in bv how do i create a folder for the other two files to be in the form wizard

        Comment

        • midanceptyltd
          Corporal

          • Apr 2010
          • 18

          #5
          Re: Import PHP Script help please please

          I got giving the following http://api-test.au.com/TEST.php and I can make what on the site but I just cant conduct the search and been working on this for two days trying different option

          im going crazy

          Comment

          • navaldesign
            General & Forum Moderator

            • Oct 2005
            • 12080

            #6
            Re: Import PHP Script help please please

            Please do not confuse BV's forms and form wizard with the script you are using.

            The script by itself creates the necessary form, at least from what I see in your code that you posted..

            So simply upload the two auxiliary files, in the same folder where your BV pages are published, add the script (as you have already done) in a HTML box in your page, and publish the page.

            The code will create the necessary form.
            Navaldesign
            Logger Lite: Low Cost, Customizable, multifeatured Login script
            Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
            DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
            Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

            Comment

            • midanceptyltd
              Corporal

              • Apr 2010
              • 18

              #7
              Re: Import PHP Script help please please

              that makes heaps sense only thing is "So simply upload the two auxiliary files, in the same folder where your BV pages are published" would that the public_html folder that when i press ppublich that folder comes up

              Comment

              • midanceptyltd
                Corporal

                • Apr 2010
                • 18

                #8
                Re: Import PHP Script help please please

                UPDATE - Ok, that getting me somewhere, http://www.mi-dance.com is my site. Now only problem I have is when I do a search it disappears my search try and do a search and see

                Comment

                • navaldesign
                  General & Forum Moderator

                  • Oct 2005
                  • 12080

                  #9
                  Re: Import PHP Script help please please

                  You have missed part of the code in the begining, so it doesn't work
                  Navaldesign
                  Logger Lite: Low Cost, Customizable, multifeatured Login script
                  Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                  DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                  Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                  Comment

                  • midanceptyltd
                    Corporal

                    • Apr 2010
                    • 18

                    #10
                    Re: Import PHP Script help please please

                    I don't think I have because I have just imported the coding that I got from someone and all it does is redirects it to my page and not to the results.

                    Comment

                    • midanceptyltd
                      Corporal

                      • Apr 2010
                      • 18

                      #11
                      Re: Import PHP Script help please please

                      when you put the mouse over the 'lookup up domian' its got my web address on it.

                      Comment

                      • midanceptyltd
                        Corporal

                        • Apr 2010
                        • 18

                        #12
                        Re: Import PHP Script help please please

                        so what kind of the code am I missing

                        Comment

                        Working...
                        X