Hi, my webhost just turned off "allow_url_fopen" command for security reasons, and all my {URL} tags crashed. Essentially, I was calling a directory article listing from my index page.
My initial URL command : {URL:http://mysite.com/index.php?press}
Can someone advice how to go about embedding that URL alternatively?
First thing I tried to do was to use the [PHP] function to try to include that page, and wrote this: [PHP]include('/index.php?press');[/PHP] but am getting a parse error.
( Parse error: parse error, unexpected ')' in /home/.quinette/mysite/mysite.com/include/inc_front/front.func.inc.php(2307) : eval()'d code on line 1 )
Can someone help please? How do I do this correctly?
thanks,
VR
Please advice on article embedding problem!
Also, when I type
[PHP]include 'index.php?press';[/PHP]
I get this error :
Warning: Unknown(index.php?press): failed to open stream: No such file or directory inhome/.quinette/mysite/mysite.com/include/inc_front/front.func.inc.php(2307) : eval()'d code on line 1
Warning: (null)(): Failed opening 'index.php?press' for inclusion (include_path='.:/usr/local/lib/php') in /home/.quinette/mysite/mysite.com/include/inc_front/front.func.inc.php(2307) : eval()'d code on line 1
And when I try {PHP:index.php?press} it also does not work, but gives no error message.
[PHP]include 'index.php?press';[/PHP]
I get this error :
Warning: Unknown(index.php?press): failed to open stream: No such file or directory inhome/.quinette/mysite/mysite.com/include/inc_front/front.func.inc.php(2307) : eval()'d code on line 1
Warning: (null)(): Failed opening 'index.php?press' for inclusion (include_path='.:/usr/local/lib/php') in /home/.quinette/mysite/mysite.com/include/inc_front/front.func.inc.php(2307) : eval()'d code on line 1
And when I try {PHP:index.php?press} it also does not work, but gives no error message.
I figured out a secure way to link to web pages, though CURL function.
So now it works if I type:
[PHP]
$curl_handle=curl_init();
curl_setopt($curl_handle,CURLOPT_URL,'http://mysite.com/index.php?press');
curl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,1);
curl_exec($curl_handle);
curl_close($curl_handle);
[/PHP]
While it works, the users of the cms wont be able to write this every time, so Im wondering, is there a way to edit the phpwcms code itself so that every time I use the {URL} function, it uses this CURL function under the hood?
I think generally it would be a good idea to add this to the future phpwcms releases, for better security.
thanks,
Vrain
So now it works if I type:
[PHP]
$curl_handle=curl_init();
curl_setopt($curl_handle,CURLOPT_URL,'http://mysite.com/index.php?press');
curl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,1);
curl_exec($curl_handle);
curl_close($curl_handle);
[/PHP]
While it works, the users of the cms wont be able to write this every time, so Im wondering, is there a way to edit the phpwcms code itself so that every time I use the {URL} function, it uses this CURL function under the hood?
I think generally it would be a good idea to add this to the future phpwcms releases, for better security.
thanks,
Vrain