Jump to content
xisto Community

Stenno

Members
  • Content Count

    22
  • Joined

  • Last visited

1 Follower

About Stenno

  • Rank
    Newbie [Level 1]
  1. Yeah i probably can make you one indeed. Just tell me the details, for which pupose are you using it and so on.
  2. The most important part is to be very carefull with input from the visitor, always check it. All the $_GET's the $_POST's make sure they won't be able to use bugs in your code to get in. Because 80% of all sites can be hacked because of bugs in their scripts.take a look at the following functions:htmlspecialchars();is_numeric(); // very helpfull with $_GET['id'];also take care of the include methods and upload and file management systems. So they can't fake files, by changing their extentions and so on. Lots of articles about it on the net. Please watch them
  3. Ouch, this will get you hacked easily. They create a file x.php and put this in it: for example: <?$fHandle = fopen($fileName , 'r+');while (!feof ($handle)) { $buffer = fgets($handle, 4096); echo $buffer;}?> They just run their script after they created it and it gives them login info from your database and so on. It's very important to built in a safety check, so you can check their code first before they can run it. They could also create a injection bug on purpose in the script: <? $page = $_GET['page']; include($page);?> Makes them able to include every file on your server, even files that aren't in that specific map. So watch out with it Make sure only you can run the script, so for instance make a login for it.
  4. Your code is fine, but you could also do it this way: SELECT * FROM `users`, `events_attend` WHERE users.userid != events_attend.ea_user_id I guess this has the same output
  5. <? if(preg_match("/ /", $_POST['user'])){ echo "The user name have spaces"; }else{ echo "The user name is correct"; }?> This is exactly the same result in way shorter code. Besides to remove the spaces and to set the username and password to lowercase [when you have case-insensitive login system] and to prepare them for inserting to the database just use this code: <?$username = htmlentities(strtolower(trim($_POST['user'])),ENT_QUOTES);$password = htmlentities(strtolower(trim($_POST['password'])),ENT_QUOTES);?>
  6. Yes there is away to select info from mutiple tables out your database. This is the way: SELECT p.date, p.time, o.name, o.blabla FROM `preformance` AS p AND `organization` AS o WHERE o.id = p.org_id; or SELECT preformance.date, preformance.time, organization.name, organization.blabla FROM `preformance` AND `organization` WHERE organization.id = preformance.org_id; But as you can see the first method is way more efficient. Good luck with it
  7. I already found the method to retrieve an image indentifier with only the weird code. It's like this: <? $data = 'iVBORw0KGgoAAAANSUhEUgAAABwAAAASCAMAAAB/2U7WAAAABl' . 'BMVEUAAAD///+l2Z/dAAAASUlEQVR4XqWQUQoAIAxC2/0vXZDr' . 'EX4IJTRkb7lobNUStXsB0jIXIAMSsQnWlsV+wULF4Avk9fLq2r' . '8a5HSE35Q3eO2XP1A1wQkZSgETvDtKdQAAAABJRU5ErkJggg=='; //$data is the base64_encoded weird data$data = base64_decode($data);$im = imagecreatefromstring($data);if ($im !== false) { header('(anti-spam-content-type:) image/png'); imagepng($im);}else { echo 'An error occurred.';} ?> Thanks for your help though, and sorry for the weird explenation
  8. And i don't have a file, i only have a string with those weird chars. Or maybe there is some function to create a file first and then use imagecreatefromjpeg() ??
  9. Ohw sorry, thanks for warning. But that's not my question. It's just a quick sample script to explain my question better. Please read it carefully: i would like to know how i can recreate an image with only the weird data (in the quotes).
  10. Hey fellow coders, I'm having a problem. If you output a im indentifier in php with gd libary. With this method for example: <?header("(anti-spam-(anti-spam-(anti-spam-content-type:))) image/png");$imgWidth = 50;$imgHeight = 50;$image=imagecreate($imgWidth, $imgHeight);$colorBlack = imagecolorallocate($image, 0, 0, 0); // first color you define with colorallocate is also the color of the background of your imageimagepng ($image);imagedestroy ($image);// This gives you a page with a black image of 50x50 pixels.?> If i look at the source code of that page, i see: I get something similair to that. Now my question: How can i get back the image indentifier (the var $image in the sample code above), with only this weird code ?? Thanks very much in advance, Though i fear not many people here know how this can be done
  11. Yeah Heroes of Might and Magic indeed is a very cool game, I used to play it with 3 other friends in groups. So we could lan 2vs2. Real fun times! My favourite factions were humans and elves - I believe - because they had the best archers. Crossbow men, Monks (humans) and Elves.The idea of the game is very good, it's a turn based game. Meaning you can walk in a certain range, then build something in your fortress and when your finished you can click "Next Day" and then the opponents can do their things. You have a big vairity of maps and with map builder you are also able build your own maps. Though the graphics suck *bottom*, i would recommend to all of you guys that love strategie games, it's one of the best!
  12. I'm a real bad designer and i'm active on a lot of different forums for a long time now. So I think it's time for a sig And i could really use some help with it, from a decent designer I have no favours, but it would be very nice if the theme would be Lord of The rings, for example: Legolas. I hope someone can help me out, i have seen lots of great stuff in the showoff forum So push yourself to the limit! Thank you very much in advance.
  13. It indeed is a very good First person shooter. TBH i have been addicted for a real long time: it just gave me a kick especially when i was on a real high killingspree or i was winning 2vs1 fights or at least fights/battles in which i was outnumbered.Real good game and totally free, great and active community.
  14. I really like Lord of The Ring Battle For Middle Earth I, in short: LoTR BFME I. I and almost all of the BFME I players prefer BFME I over BFME II, which is why BFME I still has a very active community. You can find the official ladder on this page: Official BFME I ladder Site and the official strategies and replay site here: http://forums.xisto.com/no_longer_exists/ My nickname is called: Topalov, currently ranked 17th from all the 230,000 players [once i was ranked 6th]. My favourite faction to play with is Gondor. Any other guys, playing BFME ??
  15. K well first of all you posted in the wrong section, you have PHP code there and this is the HTML/XML section.Secondly you don't need ( if you make an echo statement. echo("</form>"); Better is: Echo "</form>";. Finally, if you want to grab info from an url you need the super global $_GET. For example you have: index.php?age=7&blabla=nothing echo $_GET['age']; // gives 7 as output echo $_GET['blabla']; // gives nothing as output hope this will help you out. PS. could an admin or moderator move this too PHP section
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.