Hi
I need once again you help guys,
I have a php script that should call and url on the local-server, when i call the script from the browser it just prints the $str and it doesn't call the url, but when i execute the script from the shell (php sentdata.php) it works.
I checked the apache logs and there are not errors.
My server details are:
PHP 5.3.2 (cli) (built: Apr 27 2010 17:55:02)
Zend Engine v2.3.0
Linux xxxxxxxxxxx 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686 i686 i386 GNU/Linux
Server version: Apache/2.2.15 (Unix)
Server built: Apr 10 2010 11:21:07
PHP Code:
<?php
$user = urlencode('user');
$password = urlencode('pass');
$var1 = urlencode('zzzzzz');
$var2 = urlencode('yyyyyy');
$var3 = urlencode('xxxxx');
$str= "?username=".$user."&password=".$password."&var1=".$var1."&var2=".$var2."&var3=".$var3;
print $str;
$ch=curl_init();
curl_setopt($ch,CURLOPT_URL,'http://localhost:12812/cgi-bin/incomming'.$str);
curl_exec($ch);
curl_close($ch);
?>
Thanks in advance