xymalf Posted July 26, 2012 Share Posted July 26, 2012 <body> <?php $root_path = str_replace('/public_html', '/uar', $_SERVER['DOCUMENT_ROOT']) .'/includes/'; include $root_path.'environment.php'; include $root_path.'status_messages.php'; include $root_path.'validate_data.php'; include $root_path.'api_config.php'; include $root_path.'parse_data.php'; include $root_path.'sort_data.php'; include $root_path.'calculate_stats.php'; include $root_path.'html_template.php'; $app_title ='Network Viewer'; $twitter_username = ''; $twitter_password = ''; $form_response = ''; $submit_button_label = 'identify yourself'; $show_message = ''; $show_info = ' style="display:none"'; $followers = ''; $mutuals = ''; $following = ''; $form_error = 0; $twitter_username = $_POST['twitter_username']; $twitter_password = $_POST['twitter_password']; $submit_button = $_POST['submit_button']; $this_dir = getHTTPpath($_SERVER['HTTP_HOST'],$_SERVER['REQUEST_URI']); list($master_username,$cURL_source) = prepAPI(); $cURL = prepRequest($app_title,$twitter_username,$twitter_password); $form_error = checkInput(array( 'submit_button' => $submit_button, 'twitter_username' => $twitter_username, 'twitter_password' => $twitter_password, ),$cURL,$cURL_source); if ($form_error == 0) { $show_info = ''; $submit_button_label = 'Refresh Network'; $user_detail= str_replace("[id]", $twitter_username, $cURL_source['show_user']); list($cURL_status, $twitter_data) = apiRequest($cURL, $user_detail); if ($cURL_status > 200) {$form_error = 14;} else { #parse the XML file try { $authors = parseXML($twitter_data); foreach ($authors as $author) { $author_id = $author['user_id']; $author_username = $author['user_name']; $author_fullname = $author['full_name']; $author_avator = $author['avator']; $author_location = $author['location']; $author_description = $author['description']; $author_url = $author['url']; $is_protected = $author['is_private']; $total_followers = $author['followers']; $total_following = $author['following']; $total_tweets = $author['tweets']; break; } $author_profile = "<a href='http://twitter.com/$author_username'>$author_fullname</a>"; $followers_pages = ciel($total_followers/100); $followers_pages = ciel($total_following/100); }catch (Exception $e) {$form_error =15; } } if ($form_error == 0) { $follow_net = array(); for ($i=1; $i <=$followers_pages; $i +=1) { $follow_net = str_replace("[id]", $twitter_username, $cURL_source['follower']); $follower_net .="?page=$i&count=100"; list($cURL_status, $twitter_data) = apiRequest($cURL, $follower_net); if ($cURL_status > 200) {$form_error = 14;} else { try{ $followers=parseXML($twitter_data); $x= -1; foreach ($followers as $follower) { $follow_net[$follower['user name']. ''] = array ( 'follow_net' => $x, 'author_username' => $follower['user_name'], 'author_fullname' => $follower['full_name'], 'author_username' => $follower['avatar'], 'author_username' => $follower['location'], 'author_username' => $follower['description'], 'author_username' => $follower['url'], 'is_protected' => $follower['is_protected'], 'total_followers' => $follower['followers'] ); } } catch (Exception $e) {$form_error = 17;} } } ?> Dreamweaver is saying i have a syntax error on a line that is below closing php statement ?> ?> Link to comment https://forums.phpfreaks.com/topic/266305-syntax-error/ Share on other sites More sharing options...
Pikachu2000 Posted July 26, 2012 Share Posted July 26, 2012 And that would be correct. Match up your curly braces; there are some missing. Link to comment https://forums.phpfreaks.com/topic/266305-syntax-error/#findComment-1364709 Share on other sites More sharing options...
jazzman1 Posted July 26, 2012 Share Posted July 26, 2012 And that would be correct. Match up your curly braces; there are some missing. Two missing in the end Link to comment https://forums.phpfreaks.com/topic/266305-syntax-error/#findComment-1364710 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.