error help - Dynamic Image
Posted on
16th Feb 2014 07:03 pm by
admin
I've been working on making my site less cluttered in the directories and more secure lately. In an attempt to prevent bandwidth theft from other people using images, I decided to switch all my site images to a dynamic image file. I've written a small test code to iron out as many bugs as I can BEFORE I impliment it fully.
Code:
Code: <?php
if ($_SESSION['i'] != "yes"}
{
$im = "theft";
}
else
{
$im = $_GET['i'];
}
switch($im)
{
case 'theft":
$image = imageCreateFromJPG('/theft.jpg');
break;
case 'logo':
$image = imageCreateFromJPG('/logo.jpg');
break;
}
imageJPG($image);
imageDestroy($image);
?>
When using it in the test copy of my site's index page (calling for the logo image) it works fine.
When I try opening the page (with the GET['i'] set to logo, theft, and not set at all), I get the following error:
QuoteParse error: syntax error, unexpected T_IF in /home/ck9/public_html/media/images/site.php on line 3
I tried setting the current If...else as a long comment and re-writting it another way, but that didn't fix the issue. I tried looking up the error in the PHP manual, but the information presented wasn't helpful to me.
Thanks in advance for any help you guys can provide (and the help here has always been great
No comments posted yet
Your Answer:
Login to answer
58
42
Other forums
Looking for help reading a .txt or .ini file and outputting the info.
I have a file called Info.ini and It has the following info:
Code: [General]
Online=0
I wou
User registration and login
I don't know whether this is the correct forum, if not i apologise but am pretty desperate at the mo
some questions
Hello,
I am looking for the answers for following questions:
1) Does PHP support overl
CURL question
i am wondering if it's possible to use multi curl with login something like
login once to web
Buggy registration system
Hey, I just started scripting in PHP, and I ran into a few problems.
Code: <?php
includ
unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_
Can anyone view my code and tell me why im getting the error:
Parse error: syntax error, unexpect
Mail functionality from localhost to server
Hi
I am facing problem of mail functionality.
When i tested mail functionality in my
Problem with the Update command used with a sqldataadapter
I'm connected to a database on an SQL Server and I'm using a sqldataadapter, sqlconnection, sqldatas
quotes changing
hi all
in my content
opening quotes " changes to “
close qu
getting weird error..
okay, I'm getting an error on this particular function, something about the syntax in the mysql LIMI