search for: stream_context_create

Displaying 5 results from an estimated 5 matches for "stream_context_create".

2018 Sep 14
2
AGI timeout option
I don't know AGIspeedy, but I have some PHP scripts where I set a connect timeout using streams. Example using https, but should be easily adaptable to non-s http.: $pbxsh_bin = @file_get_contents("https://blah.blah.blah", FALSE, @stream_context_create(array('https' => array('timeout' => 5, "verify_peer"=>false, "verify_peer_name"=>false)))); On 09/14/2018 01:40 PM, Carlos Chavez wrote: > On 9/13/2018 8:04 PM, Patrick Wakano wrote: > >> Hello list, >> Hope you all doing  well! &...
2018 Sep 18
2
AGI timeout option
...I don't know AGIspeedy, but I have some PHP scripts where I set a >> connect timeout using streams. >> >> Example using https, but should be easily adaptable to non-s http.: >> >> $pbxsh_bin = @file_get_contents("https://blah.blah.blah", FALSE, >> @stream_context_create(array('https' => array('timeout' => 5, >> "verify_peer"=>false, "verify_peer_name"=>false)))); >> >> On 09/14/2018 01:40 PM, Carlos Chavez wrote: >> > On 9/13/2018 8:04 PM, Patrick Wakano wrote: >> > >> >&g...
2018 Jan 23
0
Now playing (PHP example)
...; 'Icy-MetaData: 1', 'user_agent' => $ua ] ]; if (($headers = get_headers($streamingUrl))) foreach ($headers as $h) if (strpos(strtolower($h), 'icy-metaint') !== false && ($interval = explode(':', $h)[1])) break; $context = stream_context_create($opts); if ($stream = fopen($streamingUrl, 'r', false, $context)) { while($buffer = stream_get_contents($stream, $interval, $offset)) { if (strpos($buffer, $needle) !== false) { fclose($stream); $title = explode($needle, $buffer)[1]; return substr($titl...
2018 Jan 23
2
Now playing (PHP example)
Wow, thank you so much! I completely forgot about the status-json.xsl file... :D 2018-01-23 15:38 GMT+01:00, unosonic <un at aporee.org>: > Danijela Popović: >> Hi all, >> Basically there's my question in the subject. I need a simple example >> of now playing artist, song, and listeners. Can somebody write it down >> for me? > > no time, sorry >
2018 Sep 14
3
AGI timeout option
Hello list, Hope you all doing well! Recently, I had an issue with a FastAGI PHP script, which under some specific situation would run into an infinity loop, consuming all CPU resources. This also was preventing Asterisk to terminated the call properly because it was waiting for the AGI to return... The application uses AGIspeedy to process the AGI calls, not sure if this can be affecting this