Im a newbie im trying to get a script to trigger another script with Curl in PHP but it dosent seem to be sending the paramaters.
Is there a seperate function to append parameters?
<?php
$time = time();
$message = "hello world";
$urlmessage = urlencode( $message );
$ch = curl_init("http://mysite.php?message=$urlmessage&time=$time");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);
?>
Could anyone point me in the right direction??
$ch = curl_init("http://mysite.php?message=$urlmessage&time=$time");Do this;$ch = curl_init('http://mysite.php?message=' . $urlmessage . '&time=' . $time);It's much easier to read, and you'll be a byte/8 safer. What if you had a variable$url, it could theoreticaly be used instead of$urlmessage.