Jump to content

Parse Error in T_Return


BillyBoB

Recommended Posts

I get:

Parse error: syntax error, unexpected T_RETURN in /var/www/html/test.php on line 15

 

Code:

$o027asdf04qvnola==""?return"lkas45n87x02xhy";

 

I just started using the short code for if's and so on. Thats probably where my error is can anyone help me out?

Link to comment
Share on other sites

what?

 

lol ive never wseen that short code before, if your assigning a variable depending on a true or false if statement try this:

 

$variable = ($var1 == $var2)? "var1 == var2" : "var1 != var2";

 

 

hope this helps :P

 

(T_RETURN means the string "return" after the ? symbol in your syntax btw. its fine with the ? but not anything after that...

Link to comment
Share on other sites

beat me but oh well ill post this anyway:

 

hmm, try:

<?php
function checkit($arg){
return ($arg == null)? "lkas45n87x02xhy" : $arg;
}

$o027asdf04qvnola = "test";
echo checkit($o027asdf04qvnola);

echo("<br>");

$o027asdf04qvnola = "";
echo checkit($o027asdf04qvnola);

// echoes: 
// test<br> 
// lkas45n87x02xhy

?>

this function, you want to "return" the string so im assuming this is inside a function, just take the return .... line and put it instead of the return in your function.... im sure you wil understand it ;)

Link to comment
Share on other sites

are you going to be realeasing your source code? if so it wont really matter what you do with it php is extremely easy to hack if they have the source code...

 

if your going to compile this script into a .exe then it will still be reasonably easy to decompile/dissasemble and hack,

 

for serial-key validation i would use c++ or visual basic, and add a lot of routines to throw them off... for more information look into assembly language and how it works (extremely complicated for beginners).

 

maybe someone has some more ideas about serial-key validation in php... (maybe store a list of known serial-keys in a secure db),

-------

what is this serial0key for? a php script? or a windows program?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.