-1
Why does the connection to my code close? I didn’t write in the code to close it, I would like it to remain open. Sorry anything I’m new, but I want to make a request/GET connection with a url, and that it did not close, remain open or connected for 1 hour, I did the following code:
// URL para onde será enviada a requisição GET
$url = "https://meusiteaqui";
// Inicia a sessão cURL
$ch = curl_init();
// Inicia conexão
curl_setopt($ch, CURLOPT_URL, $url);
Please clarify your specific problem or provide Additional Details to Highlight Exactly what you need. As it’s Currently Written, it’s hard to Tell Exactly what you’re asking.
–
Welcome to Stack Overflow! Please explain the problem better, and if possible include a example of code that reproduces what is happening, because your question is not noticeable. See Help Center How to Ask.
– Icaro Martins
But what’s the point of keeping a request open?
– JhowBhz
What are the parameters
CURLOPT
that have been defined? (I suggest you see [Mre]) 'cause if there’s anything likeRETURN_TRANSFER
when storing all data the connection is obsolete, if there are no notes (Locations) it closes yes, but what would be the need to keep open?– gleisin-dev