Hi guys new comer to the forum and a new php scripter. I have searched this error and found all the simple fixes like semicolon and such but I can't find any issues. It might be good to have someone else look at it in case I am missing something. This was taken from a script to parse rss feeds to twitter. The error is PHP Parse error: syntax error, unexpected T_VARIABLE in /var/www/ericvanderveer/tweets/tools/las.php on line 24
Here is the script
<?php
$consumer_key = '*****************';
$consumer_secret = '**************';
$oAuthToken = '**************';
$oAuthSecret = '*****************';
require_once($_SERVER['DOCUMENT_ROOT'].'twitteroauth/twitteroauth.php');
include('parse.php');
$connection = new TwitterOAuth ($consumer_key ,$consumer_secret , $oAuthToken, $oAuthSecret);
$newpost=1;
while ($newpost>=0)
{
$feed = "http://ericvanderveer.com/index.php?option=com_ninjarsssyndicator&feed_id=8&format=raw";
$rss = new lastRSS;
if ($rs = $rss->get($feed)){
$title = $rs[items][$newpost][title];
$url = $rs[items][$newpost][link];
} else { die('Error: RSS file not found, dude.'); }
$bitly_call = file_get_contents("http://api.bit.ly/shorten?version=2.0.1&longUrl=" . $url . "&login=*****************&apiKey=*****************");
$bitlyinfo=json_decode(utf8_encode($bitly_call),true);
$tiny_url= $bitlyinfo['results'][$url]['shortUrl'];
$title = str_replace("&", "and", $title);
$las = "New Linux Action Show ";
$status = $las . " " $title . " " $tiny_url;
if (strlen($status)>140) {$status = substr($title,0,136-strlen($tiny_url)) . "... " . $tiny_url; }
echo $status;
$parameters = array('status' => $status);
$connection->post('statuses/update',$parameters);
$newpost--;
}
?>
As you can see I added the string $las and wanted to append it to the $status string. Any ideas?
Eric Vanderveer
www.ericvanderveer.com