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 6535985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:26:18+00:00 2026-05-25T10:26:18+00:00

I am using curl to display a page response on a thank you page.

  • 0

I am using curl to display a page response on a thank you page. The code looks something like this:

$curl_handle=curl_init();
curl_setopt($curl_handle,CURLOPT_URL,'http://www.site.com');
curl_exec($curl_handle);
curl_close($curl_handle);

The page above ‘www.site.com’ has a hidden input value in it that looks something like this:

<input type="hidden" id="my_id" value="123" />

All i need to do is grab the value (‘123’) from this hidden input and echo it out on my page.

Would be grateful if anyone could help me out with this.

Thanks!

  • 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-25T10:26:18+00:00Added an answer on May 25, 2026 at 10:26 am

    You may use DOMDocument to parse HTML and get the value from the input element. I’ve not test this code, but quick code should look something like this:

    $doc = new DOMDocument();
    $doc->loadHTMLFile('http://www.site.com');
    $id = $doc->getElementById('my_id')->getAttribute('value');
    

    For example, cnn.com has the following html code on the front page.

    <a id="nav-us" href="/US/" title="U.S. News Headlines Stories and Video from CNN.com">U.S.</a>
    

    The following code would echo “U.S. News Headlines Stories and Video from CNN.com”

    $doc = new DOMDocument();
    $doc->loadHTMLFile('http://www.cnn.com');
    $title = $doc->getElementById('nav-us')->getAttribute('title');
    echo $title;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using this PHP: <?php $curl_handle=curl_init(); curl_setopt($curl_handle,CURLOPT_URL,'http://www.notrly.com/jackbauer/'); curl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,2); curl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,1); $buffer = curl_exec($curl_handle); curl_close($curl_handle); if
$ch = curl_init(); //this part we set up curl curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
I am trying to retrieve this page using curl in php. This page of
I'm using system() PHP function to run some curl commands like this system(curl command
I'm using php 5.3.2 and when i execute a curl it display the result
i am using curl in my program. and my code is : $tref =
I'm trying to extract the price from the bellow html page/link using php cURL
i get page in utf-8 with russian language using curl. if i echo text
I'm using curl to retrieve an external website and display it in a div...
This is a sample CURL, which is what I am using to try and

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.