Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7494207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T17:22:43+00:00 2026-05-29T17:22:43+00:00

I have a dynamic php page which I need to call with a get

  • 0

I have a dynamic php page which I need to call with a get parameter. I then want to put the generated html into a string and use it later ( I’m tryign out tonic framework for web services)

So this is similar to PHP – Read dynamically generated (and echoed) HTML into a string? and I tried the answer that uses cURL.

The issue is that authentication is done with ntlm (apache mod_auth_sspi). The php script executing curl is already authenticated, eg only valid users can ever execute it. It is somehow possible to pass on these “credentials” to cURL?
(username is available but of course not the password)

Or a completely different approach would be fine too but only idea I had was to make a function that creates a string with html content.

$response = new Response($request);
$format = $request->mostAcceptable(array(
    'json', 'html', 'txt'
        ));

switch ($format) {

    case 'html':
        $response->addHeader('Content-type', 'text/html');
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, 'http://localhost/viewRecord.php?identifier=' . $identifier);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_NTLM); 
        $html = curl_exec($ch);
        curl_close($ch);
        $response->body = $html;
        break;
    //...   
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T17:22:45+00:00Added an answer on May 29, 2026 at 5:22 pm

    The answer is simple:

    This is not possible.

    A workaround is to put all the files (including php, JavaScript and CSS) in a directory that does not need require NTLM authentication.

    To achieve this one either needs access to the Apache Configuration and if that is not possible only thing you can hope for is that the Apache Configuration allows overriding SSPI in .htaccess. Allow any authentication (=also none) but limit access to 127.0.0.0 since allrequest come from cURL on the same server.

    For authorization, you can put the data in the php session an pass the session cookie on to cURL and then the session data can be used for authorization in the page called from cURL.

    EDIT:

    I’ve basically reduced NTLM usage even more. I now have 1 login page (authentication) and everything else is controlled by php session (authorization). See

    Apache2, PHP: create automatic ntlm login page

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to get an html table from a dynamic php page on my
I'm trying to make a dynamic table with PHP. I have a page which
I have created a page index.php with a lot of divs and I need
What I want is to have links which change a part of the page
I have one webpage (lets call it A.html). A.html has some javascript which switches
I have a php page which supports arabic text properly. I am using ajax
I had a Dynamic PHP website which I needed to convert into a static
I have a classifieds website... The classifieds are displayed in a dynamic php page.
I have a PHP based site with dynamic pages , such as /page.php?ID=1. The
I have a rwrite rule which is like this: RewriteRule ^30/edit-print-ready-vinyl-banners.html edit_print_ready_form.php?id=30 Now I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.