how do i make a get request without a redirect in php?
How do i make a GET request using curl without making a redirect? I want
the request sent in the background. Here is my code:
$curl_handle = curl_init();
curl_setopt( $curl_handle, CURLOPT_URL, 'http://www.example.com/?test=123' );
curl_exec( $curl_handle ); // Execute the request
curl_close( $curl_handle );
I want something that sends the request in the background like this:
<img src="http://www.example.com/?test=123">
The get request is issued from www.example1.com to www.example.com, the
problem is it redirects to www.example.com, i want it to stay on
www.example1.com and send the request in the background silently. Thanks
to anyone who can help. This should be pretty simple but i'm not sure how
to achieve it. I know it's possible when dealing with post data but i'd
appreciate an example with get requests. Thanks to anyone who can help.
No comments:
Post a Comment