Here is my php script , i want to know if is possible to post my result from : wesite/folder/script.php?id=$i to Twitter , Facebook or other site like this two .
Result are like : name , description and link
thanks and sorry for my bad English
Result are like : name , description and link
thanks and sorry for my bad English
Code:
<?
$con = mysql_connect("localhost","base","base");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("base", $con);
$result = mysql_query("SELECT * FROM cronjob");
while ($row = mysql_fetch_array($result))
{
$lastcheck = $row['lastcheck'];
$addvideo = $row['addvideo'];
}
$i = $lastcheck;
$end = $lastcheck+$addvideo;
$result = mysql_query("UPDATE cronjob SET lastcheck='$end'") or die(mysql_error());
do {
echo "<font color=green> $i > $end </font>";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "wesite/folder/script.php?id=$i");
curl_setopt($ch, CURLOPT_USERPWD, "admin:admin");
curl_setopt($ch, CURLOPT_HEADER, false);
curl_exec($ch);
curl_close($ch);
++$i;
}
while ($i <= $end);
?>