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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T09:27:16+00:00 2026-05-24T09:27:16+00:00

I am trying to use cURL and SimpleHtmlDom to post a 13-digit value and

  • 0

I am trying to use cURL and SimpleHtmlDom to post a 13-digit value and pull some data from this site :
http://www.hcad.org/records/Real.asp?search=acct

After posting a 13-digit value i want to get this redirected page :
http://www.hcad.org/records/details.asp?crypt=%94%9A%B0%94%BFg%85%8E%84%82pg%8El%88tXt%5FW%9E%99%A2%D3%89%95%C2e%7CU%8A%7D%86%C0%AB%A8%AD%86%5E&bld=1&tab=

on which i will apply simplehtmldom to parse some data

i have searched some site to make this code snippet

<?php
$urltopost = "http://www.hcad.org/records/Real.asp?search=acct";
$datapost = array(
"searchval" => "1158830010007",
);
$ch = curl_init ($urltopost);
curl_setopt ($ch, CURLOPT_POST, true);
curl_setopt ($ch, CURLOPT_POSTFIELDS, $datatopost);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
$returndata = curl_exec ($ch);
echo $returndata;
?>

but its not providing me the redirected page i want .
what should i do now to do it correctly ?? waiting for any kind of help .

Thanks in advance

  • 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-24T09:27:17+00:00Added an answer on May 24, 2026 at 9:27 am

    You need to set the CURLOPT_FOLLOWLOCATION option for the curl to follow a redirect or it just returns the page data (if any) without redirecting.

    curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );
    

    Edit: I have looked at the source code on the page, you should modify your code accordingly:

    $urltopost = "http://www.hcad.org/records/SelectRecord.asp";
    $datapost = "searchval=1158830010007&TaxYear=2011&searchtype=strap";
    

    You should have been posting to the page that the form submits to (see above $urltopost). Also, you should use a query string as your post data.

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

Sidebar

Related Questions

I'm trying use mod_rewrite to rewrite URLs from the following: http://www.site.com/one-two-file.php to http://www.site.com/one/two/file.php The
I'm trying to use cURL to post data to the form on this URL:
I'm trying to use cURL to post data to the form on this URL:
I'm trying to use curl to get some data from the web. What I
I'm trying to use some data from another site as a news feed on
I'm trying to use curl to post data to a script which is posted
I have application that received data via HTTP POST requests. I'm trying to use
Hi I'm trying to use this script to return a value from another php
I'm trying to use curl in order to follow this google redirection, but i
i'm trying to use curl with jruby to get some response times for webpages/files.

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.