logo

Live Production Software Forums


Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Henny  
#1 Posted : Tuesday, October 9, 2018 4:43:28 AM(UTC)
Henny

Rank: Advanced Member

Groups: Registered
Joined: 5/14/2013(UTC)
Posts: 140
Man
Location: uk

Thanks: 2 times
Was thanked: 24 time(s) in 20 post(s)
Hi all

I have a PHP script that sends some data to a title in vmix then triggers that title as an overlay , see below

Code:
$newtitle = htmlspecialchars($_GET["radio_off"]);
$apiurl = 'http://192.168.0.88:8088/API/?Function=SetText&Input=subs&Selectedindex=3&Value=';
$result = file_get_contents($apiurl . urlencode($newtitle), FALSE, NULL);

$newtitlea = htmlspecialchars($_GET["radio_on"]);
$apiurl = 'http://192.168.0.88:8088/API/?Function=SetText&Input=subs&Selectedindex=4&Value=';
$result = file_get_contents($apiurl . urlencode($newtitlea), FALSE, NULL);

$apiurl = 'http://192.168.0.88:8088/API/?Function=OverlayInput1&Input=subs';
$result = file_get_contents($apiurl , FALSE, NULL);


As you can see I'm having to send three commands, one for each line of the title and one to fire the title.

Is there a way in the Vmix API syntax to send it all in one go as currently, PHP waits for each file_get_contents to timeout before running the next line, so slowing the whole process down, as a bodge in the top of my script i set
Code:
ini_set("default_socket_timeout", 1);
to at least try and keep things down to a few seconds overall.

Also whilst I'm at it what is the best PHP function to use to send to Vmix file_get_contents seems a bit of a clunky way of doing it .

cheers

Ian
Users browsing this topic
Guest (2)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.