Home
Products
Support
Company
Clients
Locale
English (US $)
English (CAD $)
English (GBP £)
English (EUR €)
English (BRL R$)
Español (EUR €)
Español (MXN $)
Forums
Exec PHP API
Exec PHP API
Forums
Centova Cast v3
General discussion
Exec PHP API
Register
Login
Username:
Password:
Duration:
1 Hour
1 Day
1 Week
1 Month
Forever
Forgot password?
Topic
Print
1
(current)
Exec PHP API
Read 11061 times
leand.regg
Newbie
Posts: 1
Logged
June 07, 2016, 09:05:34 pm
Exec PHP API
I need help to exec the URL from PHP.
I have de URL http:/IP:2199/api.php?xm=server.stop&f=json&a[username]=test&a[password]=test
If I go to this url in the browser, it works. But, I cannot make it works in PHP.
Someone have an example code?
Thanks!
My Auto DJ
Sr. Member
Posts: 489
Logged
June 08, 2016, 04:19:23 am, #1
Re: Exec PHP API
<?php
simplexml_load_file('http:/IP:2199/api.php?xm=server.stop&f=json&a[username]=test&a[password]=test' );
?>
My Auto DJ
Orlando, FL USA
Quality SHOUTcast Hosting
http://myautodj.com
SHOUTcast Widgets
http://shoutcastwidgets.com
edinsof
Newbie
Posts: 22
Logged
June 27, 2016, 07:01:04 am, #2
Re: Exec PHP API
same problem for me (simplexml_load_file) only run on same server, i need run php script on external hosting server
My Auto DJ
Sr. Member
Posts: 489
Logged
June 27, 2016, 07:37:00 am, #3
Re: Exec PHP API
It may be disabled on your web server,
allow_url_fopen needs to be on in your php.ini
OR you can also use CURL.
http://stackoverflow.com/questions/11553678/read-xml-data-from-url-using-curl-and-php
Last Edit: June 27, 2016, 07:43:30 am by My Auto DJ
My Auto DJ
Orlando, FL USA
Quality SHOUTcast Hosting
http://myautodj.com
SHOUTcast Widgets
http://shoutcastwidgets.com
edinsof
Newbie
Posts: 22
Logged
June 27, 2016, 10:00:02 am, #4
Re: Exec PHP API
allow_url_fopen is enabled on webserver and centovacast server
im test with CURL from web server to
http://micentovahost.com
and works but when test from web server to
http://micentovahost.com:2199/api.php
it dont connect, 2199 por is open on server firewall but dont reply
if i use XMLHttpRequest this works but i need to het working with PHP
1
(current)