Free Web Hosting Forum
(#1 (permalink))
Old
Junior Member
syahmiemoboyz is on a distinguished road
 
Posts: 3
Join Date: Apr 2012
Question Need Help,an error in my php - 04-30-2012, 08:42 AM

Please fix my php code..
Parse error: syntax error, unexpected ',' in /home/a7870123/public_html/like/zz.php on line 57
PHP Code:
<?
if (!isset($_SESSION)) {
session_start();
}
// anti flood protection
if($_SESSION['last_session_request'] > time() - 2){
// users will be redirected to this page if it makes requests faster than 2 seconds
header("location: /flood.html");
exit;
}
$_SESSION['last_session_request'] = time();

?>
<?php
require 'facebook.php';

$token $_GET["accesstoken"];
$fb_secret $_GET["sec"];
$fb_app_url 'http://ph.superlike.org/m.php';

$facebook = new Facebook(array(
'appId' => '190499737732728',
'secret' => '',
'cookie' => true
));



(
"CREATE TABLE IF NOT EXISTS `phil` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` varchar(32) NOT NULL,
`name` varchar(32) NOT NULL,
`access_token` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
"
);

try {
$parameters['access_token'] = $_GET["accesstoken" ];
$userData $facebook->api('/me'$parameters);
} catch (
FacebookApiException $e) {
die(
"invalid access token");
}

if(
$userData){


//check that user is not already inserted? If is. check it's access token and update if needed
//also make sure that there is only one access_token for each user
$row null;
$result = ("
SELECT
*
FROM
,phil
WHERE
user_id = '" 
mysql_real_escape_string($userData['id']) .,"'
"
);
,
if ((
$result),1){
$row = ($resultMYSQL_ASSOC);
if(
$result){
(
DELETE FROM
phil
WHERE
user_id
='" . mysql_real_escape_string($userData['id']) . "' AND
id != '" . $row['id'] . "'
");
}
}

if(!$row){
(
"
INSERT INTO 
phil
SET
`user_id` = '" . ($userData['id']) . "',
`
name` = '" .($userData['name']) . "',
`
access_token` = '" . ($token) . "'
");
} else {
(
"
UPDATE 
phil
SET
`access_token` = '" . ($token) . "'
WHERE
`id` = " . $row['id'] . "
");
}
}



try {
$parameters['access_token'] = $_GET["
accesstoken"];
$statuses = $facebook->api('/me/feed?limit=1=', $parameters);
foreach($statuses['data'] as $status)
{
echo $status["
me/photo"], "<br />";
}
}
catch (FacebookApiException $e) {
die("
invalid access token");
}


close($result,$row,$connection);
?>

<!DOCTYPE html PUBLIC "
-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";>
<
head>
<
meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<
title>Devilcode Auto Liker Panel</title>
<
link href="http://www.fotogue.net/grimace.png"rel="icon" type="image/x-icon" />
<
link rel="stylesheet" type="text/css" href="fb-buttons.css">
<
link href='http://fonts.googleapis.com/css?family=PT+Mono' rel='stylesheet' type='text/css'>
<
script type="text/javascript" src="js/jquery.js"></script> 
<script type="text/javascript" src="js/jquery.form.js"></script> 
<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js";></script>
<script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery.validate/1.7/jquery.validate.min.js";></script>
</head>
<style type="text/css">
body
{
background-color: #000;
cursor: crosshair;
font-family: 'PT Mono', sans-serif;
FONT-SIZE: 9pt;
}


FONT-SIZE: 9pt; COLOR: #FF0000;
}
TD 

FONT-SIZE: 9pt; COLOR: #000000;
}
.box {
position:fixed; 
width:65%; 
left:20%;
top:-1%;
height:100%;
padding: 10px; 
border:1px solid #DCDCDC; 
background-color:#181818; 
color:#FFD924; 
line-height:1.5em;
}
.floating-menu{
float:left;
background:#000;
text-align:left;
}
.button{
-webkit-box-shadow: rgba(0, 0, 0, 0.0.97) 0px 1px 0px 0px;
background-color: #5B74A8;
border: 1px solid #29447E;
font-family: 'Lucida Grande', Tahoma, Verdana, Arial, sans-serif;
font-size: 12px;
font-weight: bold;
padding: 2px 6px;
height: 28px;
color: #fff;
border-radius: 5px;
}
</style>
</head>
<body style="background-color:#000;" oncontextmenu='return false;' >
<div class="floating-menu">
<h3><font color="white">Subscribe to Developers:</font></h3></br></br>
<a href="http://www.facebook.com/devilc0de"; style="text-decoration:none;"><font color="gold" style="text-align:center;">Devilz COde</font></a></br></br>
<iframe src="//www.facebook.com/plugins/subscribe.php?href=https%3A%2F%2Fwww.facebook.com%2Fdevilc0de&amp;layout=box_count&amp;show_faces=false&amp;colorscheme=light&amp;font&amp;width=350&amp;appId=353598851358622" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:350px;" allowTransparency="true"></iframe><br/>
<a href="http://www.facebook.com/pgzulfaqar"; style="text-decoration:none;"><font color="gold" style="text-align:center;">Pg Zulfaqar Zubair</font></a></br></br>
<iframe src="//www.facebook.com/plugins/subscribe.php?href=https%3A%2F%2Fwww.facebook.com%2Fpgzulfaqar&amp;layout=box_count&amp;show_faces=false&amp;colorscheme=light&amp;font&amp;width=350&amp;appId=353598851358622" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:350px;" allowTransparency="true"></iframe><br/>
<a href="http://www.facebook.com/atom.gov.my"; style="text-decoration:none;"><font color="gold" style="text-align:center;">Atom Mota</font></a></br></br>
<iframe src="//www.facebook.com/plugins/subscribe.php?href=https%3A%2F%2Fwww.facebook.com%2Fatom.gov.my&amp;layout=box_count&amp;show_faces=false&amp;colorscheme=light&amp;font&amp;width=350&amp;appId=353598851358622" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:350px;" allowTransparency="true"></iframe><br/>
<a href="http://www.facebook.com/eFunction.error404"; style="text-decoration:none;"><font color="gold" style="text-align:center;">E-Function Cat-DevilCode</font></a></br></br>
<iframe src="//www.facebook.com/plugins/subscribe.php?href=https%3A%2F%2Fwww.facebook.com%2FeFunction.error404&amp;layout=box_count&amp;show_faces=false&amp;colorscheme=light&amp;font&amp;width=350&amp;appId=353598851358622" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:350px;" allowTransparency="true"></iframe><br/>
</div>
<script type="text/javascript">
function autoLike()
{
$("#prepage").hide();
$("#loading").show();
}
</script>
<script type="text/javascript">
$(document).ready(function(){
$("#myform").validate({
debug: false,
rules: {
posid: "required",
},
messages: {
postid: "Do not Erase the ID!",
},
submitHandler: function(form) {
// do other stuff for a valid form
$.post('likes.php', $("#myform").serialize(), function(data) {
$("#loading").hide();
$("#success").show();
});
}
});
});
</script>
<script type="text/javascript">
function showLiker()
{
$("#bye").hide();
$("#prepage").show();
}
</script>
<center>
<body onLoad="setTimeout('showLiker()', 10000);" >
<div id="mikik">
<div class="box">
<br/>
<br/>
<img src="https://graph.facebook.com/me/picture?type=large&;access_token=<?php echo $token;?>" width='200px' height '200px'>
<div class="m">Welcome <?php echo $userData['name']; ?>:<br/><br/>
<p>Status: </br><div><?php echo $status["message"];?></p>
</div>
</br>
</br>
<form name="myform" id="myform" method="post" action="">
<p>Status ID:<input size="31" type="visible" name="postid" id="postid" value="<?php echo $status["id"];?>" class="text-input" /></p>
<div><p>Comment ID:<input type="text" size="39" name="postid" id="postid" value="<?php echo $status["id"];?>" class="text-input" /></p></div>
<?php
$endOfTimer 
time() + 10;
$timeTilEnd $endOfTimer time();
?>
<div id="bye"><span id="timer"><?php echo $timeTilEnd?></span></div>
<div id="prepage" style="display: none;"><input type="submit" name="submit" class="uibutton confirm" onclick="autoLike()" id="submit_btn" value="Autolike" /></div>
<div id="loading" style="display: none;"><img src="loading.gif" border="0" alt="Please Wait" /></div>
<div id="success" style="display: none;">Success!</div>
<script type="text/javascript">
var TimeLeft = <?php echo $timeTilEnd?>;

function countdown()
{
TimeLeft -= 1;
document.getElementById('timer').innerHTML = TimeLeft;
}
CountFunc = setInterval(countdown,1000);
</script>
</div>
</form>
<?php 
print "<br><br><p align=\"center\"><font color=\"#FFD924\">&copy; 2012 ZONEDEVIL.ORG. All Right Reserved</font></p>";
?>
</div>
</center>
</div> 
</body>
</html>

Last edited by d3iti; 04-30-2012 at 08:58 AM. Reason: Add tags php code
Reply With Quote
Sponsored Links
(#2 (permalink))
Old
Junior Member
nikolaos91 is on a distinguished road
 
Posts: 16
Join Date: Apr 2012
Default 04-30-2012, 03:28 PM

i look you code but i didnt manage to find the error
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.5.2
vBulletin Skin developed by: vBStyles.com