Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

[solved]Vuforia Web Services API

Discussion in 'Vuforia' started by GeneralDollar, Aug 11, 2018.

  1. GeneralDollar

    GeneralDollar

    Joined:
    Mar 24, 2018
    Posts:
    27
    I am currently trying to work with and understand the VWS API, and I am struggling with figuring out how to properly utilize this API with the given documentation. Are there more resources available beyond the literature on Vuforia's website?

    Can I create a website that uses this API to upload images into the cloud DB?
    If so, I would truly appreciate any resources or assistance in figuring out how to accomplish this.
    If not, what are the suggested ways to utilize the API?

    I am a quick learner, but I need a little more help than what is provided in the documentations please!

    Thank you ahead of time for any assistance
     
  2. meedabit

    meedabit

    Official Vuforia Employee Vuforia

    Joined:
    Dec 8, 2016
    Posts:
    267
    GeneralDollar likes this.
  3. GeneralDollar

    GeneralDollar

    Joined:
    Mar 24, 2018
    Posts:
    27
    I am attempting to set up the php files with a GoDaddy server, but the only thing I see when using the SampleSelector.php is "VWS Samples in PHP using HTTP_Request2". Is there more documentation on how to properly use the php files? All access and server keys are properly added in the other files, per the instructions in the read me file.

    Code (PHP):
    1. <!DOCTYPE html>
    2. <html>
    3. <head>
    4. <style>
    5.  
    6. body{
    7.   font-family:verdana;
    8. }
    9.  
    10. .result{
    11.   font-family:courier;
    12.   color:green;
    13. }
    14. </style>
    15. </head>
    16. <body>
    17. <h3>VWS Samples in PHP using HTTP_Request2</h3>
    18. <br />
    19. <br />
    20. <br />
    21.  
    22.  
    23. <?php
    24. require_once 'GetTarget.php';
    25. require_once 'UpdateTarget.php';
    26. require_once 'DeleteTarget.php';
    27. require_once 'PostNewTarget.php';
    28. require_once 'GetAllTargets.php';
    29.  
    30.  
    31. $instance = null;
    32.  
    33.  
    34. if( isset( $_GET['select']) ){
    35.  
    36.     $selection = $_GET['select'];
    37.  
    38.     echo "<div> $selection RESULT :</div><br/>";
    39.  
    40.     echo "<div class='result'>";
    41.  
    42.     switch( $selection ){
    43.      
    44.         case "GetTarget" :
    45.             $instance = new GetTarget();
    46.             break;
    47.         case "UpdateTarget" :
    48.             $instance = new UpdateTarget();
    49.             break;
    50.         case "DeleteTarget" :
    51.             $instance = new DeleteTarget();
    52.             break;
    53.         case "PostNewTarget" :
    54.             $instance = new PostNewTarget();
    55.             break;
    56.         case "GetAllTargets" :
    57.             $instance = new GetAllTargets();
    58.             break;
    59.         default :
    60.             echo "INVALID SELECTION";
    61.             break;
    62.      
    63.     }
    64.  
    65.     echo "</div>";
    66.  
    67.  
    68.     echo "<br /><div>~~~~~~~~~~~~~~~</div><br />";
    69.  
    70. }
    71.  
    72. ?>
    73.  
    74.  
    75. <div>Samples:</div>
    76. <br />
    77. <div>
    78. <a href="SampleSelector.php?select=GetTarget"><b>GetTarget.php</b> queries a single target by target id.</a>
    79. </div>
    80. <br />
    81. <div>
    82. <a href="SampleSelector.php?select=GetAllTargets"><b>GetAllTargets.php</b> queries for all target ids in a Cloud Reco database.</a>
    83. </div>
    84. <br />
    85. <div>
    86. <a href="SampleSelector.php?select=UpdateTarget"><b>UpdateTarget.php</b> updates the metadata for a target.</a>
    87. </div>
    88. <br />
    89. <div>
    90. <a href="SampleSelector.php?select=DeleteTarget"><b>DeleteTarget.php</b> deletes a target from its Cloud Database.</a>
    91. </div>
    92. <br />
    93. <div>
    94. <a href="SampleSelector.php?select=PostNewTarget"><b>PostNewTarget.php</b> uploads a new target to a Cloud Database.</a>
    95. </div>
    96. <br />
    97. <br />
    98. <br />
    99. <br />
    100. <div>
    101. <a href="CheckPHPEnvironment.php">Review your PHP installation.</a>
    102. </div>
    103. </body>
    104. </html>


    I appreciate any help!
     
  4. GeneralDollar

    GeneralDollar

    Joined:
    Mar 24, 2018
    Posts:
    27
    I read somewhere that a possibility could be that GoDaddy servers don't allow these types of programs to run for some reason, dealing with custom ports or something I do not fully understand. Could this be true? Could anyone who has successfully used VWS like this let me know what host they are using, or what I might be doing wrong?

    I have no experience with php.

    Thanks!
     
  5. GeneralDollar

    GeneralDollar

    Joined:
    Mar 24, 2018
    Posts:
    27
    I found the solution for anyone using GoDaddy servers. Add the following php code to your SampleSelector file

    ini_set("include_path", '/home/[GODADDY_USERNAME_HERE]/php:' . ini_get("include_path") );
     
  6. Yohaan_t

    Yohaan_t

    Joined:
    Jul 24, 2017
    Posts:
    1
    I was planning to implement VWS API. Does it support model targets or is it only made for image targets?
     
unityunity