Centova Technologies Forum
		Centova Cast v3 => General discussion => Topic started by: leand.regg on June 07, 2016, 09:05:34 pm
		
			
			- 
				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!
			 
			
			- 
				<?php
simplexml_load_file('http:/IP:2199/api.php?xm=server.stop&f=json&a[username]=test&a[password]=test' );
?>
			 
			
			- 
				same problem for me (simplexml_load_file) only run on same server, i need run php script on external hosting server
			
 
			
			- 
				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
			 
			
			- 
				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