PHP - which urls have to be accessible?

0 votes

I found out, that following url has to be accessible from my homepage (my provider needs to allow all urls on demand):

Is that all? Or is there another url that has to be accessible? Because above url is accessible, but I still can't get a simple example (like the following) to work:

    include_once 'app42/App42API.php';
    include_once 'app42/App42Response.php';    
    include_once 'app42/App42Exception.php';    
    include_once 'app42/App42BadParameterException.php';    
    include_once 'app42/App42NotFoundException.php';    
    include_once 'app42/OrderByType.php';    
    include_once 'app42/Query.php';    
    include_once 'app42/QueryBuilder.php';    
    include_once 'app42/StorageService.php';   
    App42API::initialize("<my api key>", "<my api secret>");
    $storageService = App42API::buildStorageService();   
    $dbName = "DB";    
    $collectionName = "baseExercises";      
    $max = 50;  
    $offset = 0 ;  
    $storage = $storageService->findAllDocuments($dbName, $collectionName, $max, $offset);    
    $jsonDocList = $storage->getJsonDocList();  
    foreach($jsonDocList as $jsonDoc)  
        print_r("docId is : " . $jsonDoc->getDocId());  
        print_r("jsonDocs is : " . $jsonDoc->getJsonDoc());  
        print_r("updated at is : " . $jsonDoc->getUpdatedAt());  
        print_r("created At is : " . $jsonDoc->getCreatedAt());  

I get following answer (which lets me suppose, that my php script does not get a response):

Warning: curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when an open_basedir is set in /home/.sites/151/site997/web/exercises_app42/app42/RestClient.class.php on line 28

Fatal error: Call to a member function __get() on null in /home/.sites/151/site997/web/exercises_app42/app42/StorageResponseBuilder.php on line 32

asked Dec 13, 2014 in App42 Cloud API-BaaS by mflisar85 (40 points)

1 Answer

0 votes
Hi mflisar85,
Yes you are right, For accessing App42 Cloud API's you have to allow this URL only 
However if you want to use our custom code(cloud code) services in your application you can allow this URL too
Let me know if it's helps.
answered Dec 14, 2014 by naresh (350 points)
actually, I thought, I don't need this url because I don't use custom code, just the api... But I'll try that...
this does not change anything... as the code above shows, I'm only using the cloud api and no custom code...
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on