Jump to content
xisto Community

8ennett

Members
  • Content Count

    435
  • Joined

  • Last visited

Everything posted by 8ennett

  1. I'm writing an online game but it's still quite some time from being finished, hopefully though I'll be a signing a massive sponsorship deal for one of my new sites (top secret) which should give me the cash to get my new web development and design company off the ground.
  2. This all seems very suspect if you ask me. Why on earth would you want to retrieve files from a locked out laptop and yet leave it in the exact condition it is now?If you had acquired this laptop and it is now yours I could understand you wanting to gain access and reset the password etc. but this is far too dodgy.I would have asked you to provide more details on why you wanted to access these files before helping you however it would seem FirefoxRocks and tansqrx have already provided you with a means to access this laptop.
  3. Using images found anywhere on the web is illegal without permission from the copyright owner, regardless of a watermark or not.Unless you created the image yourself then you are breaking the law using someone elses images (unless it is clearly stated you may reproduce them without consequence or you have permission to reproduce them).Obviously there is a high chance the copyright owner will never stumble across your site and see their image, however if they did then you would be liable and may very well find yourself in the middle of a law suit.Better to be safe than sorry, only use freely distributable images and images you have created yourself.
  4. err frazz, Xisto is a free webhost with all those features and more. And as for this mccodes thing, I know someone who was stupid enough to buy it after I told him not to, the coding is a complete mess (yes I'm talking about v2). I could have written it in a day and it offers very limited unique functionality when compared to other online rpg's. They say it's a great starting point for beginners, yet you would have to be a minimum of intermediate before you can start properly using the engine. I'm going to be writing a full tutorial on creating an advanced text-based online rpg soon and will be posting it in the tutorials section. It will show serious developers how create their own rpg, will definately blow mccodes out of the water, and best of all it will be free.
  5. Ok Ive uploaded the file to the following location: http://forums.xisto.com/no_longer_exists/ Also the updated file contains the amendment mentioned above.
  6. I've noticed a lot of people are all wanting to create their own rpg games using php so i've decided to write that tutorial using this system as a basis.I will get around to finishing the web community tutorial, however this is the perfect start to an rpg game as well.
  7. If you don't know how to connect to mysql through php then I suggest you go through a tutorial on how to write php and its many different functions. You can't just jump in to making a text-based rpg without learning the different programming languages you're going to be using.Writing your own rpg is a big project and requires coding skills and up-to-date security techniques to protect your users.I'm going to be writing an article in the tutorials section on writing a basic rpg game. Keep an eye out for it.
  8. Yes you can change the line: return '<img src="./'.$randir[$getrandir].''.$imgarray[$rand].'" width="600" align="top">'; to: return '<a href="http://forums.xisto.com/no_longer_exists/; target="_blank" border="0"><img src="./'.$randir[$getrandir].''.$imgarray[$rand].'" width="600" align="top"></a>'; This will open randomizer in a new tab (or window) however if you want it to load on the current page remove target="_blank". Also we set the border to 0 so that default blue square isn't around the edge of your image (the kind that turns purple once you have visited that link). Also great to hear you are reading that tutorial, how's it going?
  9. I had a hard time deciding on my inventory system, but I found the following to be the best way. Decide on the size you want a users inventory to be and create a new table called inventory with the rows ID, USER, ITEM. In your php select all their inventory SELECT * FROM INVENTORY WHERE user=USERID, to get the amount of inventory slots used use mysql_num_rows(QUERY) so: $invsize = 10;if (mysql_num_rows(mysql_query("SELECT * FROM INVENTORY WHERE user=USERID")) < $invsize){echo 'You still have inventory space';}else {echo 'Your inventory is full!';} Hope that helps you!
  10. Agreed, change the action to randomizer.php. Also the reason why the image isn't showing up is because of that extra slash at the beginning. If you change the slash to ./ then it should work fine (globally understood by all browsers). For example <img src="./'.$randir[$getrandir].''.$imgarray[$rand].'" Also, just a bit of useful advice. Remember that when running your server on a linux machine then it is essential to have all file names and extensions name with proper casing. When I was building a site, in the php file i referred to an image called "image1.png" however the real name of the file was "image1.PNG" but because I didn't write the extension in uppercase then linux couldn't find the file. So basically what was once <img src="image1.png" /> wouldn't work but <img src="image1.PNG" /> would work because the real image was named like that. Not really relevant to this topic but something your MUST remember.
  11. Yeah i think I know what you mean, add this to the end of the <img> tag in randomizer.phpalign="top"or failing that tryalign="texttop"It's because of the adverts either side of the image, just change the image alignment and it should work fine. eg.<img src="blah.jpg" align="texttop" />
  12. You probably should learn how to use databases with php as it is probably one of the most powerful and flexible ways to create any kind of website that stores user data. Try going through the tutorial here When I first decided to learn php it was this tutorial I used, I managed to go through the entire thing within 24 hours and by the time I had finished it I knew everything I needed to know about using PHP and MySQL together. It taught me all the basics of securing my site and its contents, how to use custom functions and classes, if statements and loops, arrays and sql data. Everything you need to make life so much easier for yourself. It would be easiest for you to do it this way and learn how to do it, that way you won't have to approve every single image uploaded using information sent to your email (it will get very old very fast, trust me). Instead the whole system will be automated (including adding credit to images on your site etc.) and all you will have to do is click a single button everytime an image is uploaded to approve it.
  13. It's looking good, as long as it works lolSo next what are you going to do with the rest of the data the user has submitted? It uploads the image file ok, but the user fills out the rest of the form yet you don't store any of that data. You give them the option to credit them, don't credit them, and for some reason credit them on the forum which you don't seem to have yet.Are you going to be putting this information in to a database? Or even just storing it in a text file?
  14. I've been looking all over for an app (preferably a firefox add-on) which shows in real time the current bandwidth consumption of a site.Basically I'm wanting to measure the amount of data being transmitted from the site while I have an AJAX script running and i'm having trouble locating anything like that. It's just so I can predict overall bandwidth consumption for X amount of users at any given time and adjust the refresh rate to compensate (currently refreshing 10 rows of MySQL data every 1,000 microseconds during testing).There are tonnes of add-ons for firefox that measure your current bandwidth speed and so on but that's not what i'm looking for so please don't post anything like that. Just an add-on that shows current consumption, not speed.Thanks guys, night all.
  15. Hmm, Caron it would appear you are taking code snippets from all over the web and are wanting us to piece them together for you as with the previous uploader and random image viewing scripts I helped you out with today.It's not that i'm not willing to help, i'm more than happy to help, however the best way to learn is through practical examples. Looking above it isn't going to be very hard to combine the two scripts, just have a look through them. It does seem like a rather simple process, I will give you a quick idea, place the contents of the upload.php in to your mailform.php and not the other way around (placing the contents of upload.php in the same else statement as the mail() function). Place your upload form in to your mail form, removing the image_source element from the original mail form first.If you haven't been able to accomplish this by the morning then I'll help you out with it, but practice will be the best thing for you i'm sure.
  16. I put those damn [0] in again, sorry here is the modified code for the getRandomImage(); return '<img src="'.$randir[$getrandir].''.$imgarray[$rand].'" width="'.resizeImage($randir[$getrandir].''.$imgarray[$rand], 'width', 100, 100).'" height="'.resizeImage($randir[$getrandir].''.$imgarray[$rand], 'height', 100, 100).'">'; Or you can use vhortex's method above, however I have found on some touchscreen phones that can cause errors.
  17. Yes not a problem, simply use this function: function resizeImage($originalImage,$return,$toWidth,$toHeight){// Get the original geometry and calculate scaleslist($width, $height) = getimagesize($originalImage);$xscale=$width/$toWidth;$yscale=$height/$toHeight;// Recalculate new size with default ratioif ($yscale>$xscale){$new_width = round($width * (1/$yscale));$new_height = round($height * (1/$yscale));}else {$new_width = round($width * (1/$xscale));$new_height = round($height * (1/$xscale));}if ($return == 'height'){return $new_height;}else {return $new_width;}} You use it like this, if you want your image to be a max height of 100 and a max width of 100 then you would type this in to your html: <img src="yourimage.jpg" width="<?php echo resizeImage('yourimage.jpg', 'width', 100, 100); ?>" height="<?php echo resizeImage('yourimage.jpg', 'height', 100, 100); ?>" border="0"/> So if you wanted to add this function in to your randomize.php file then add the image resize function and then change the <img> tag at the bottom of the random image function to the following: return '<img src="'.$randir[$getrandir[0]].''.$imgarray[$rand].'" width="'.resizeImage($randir[$getrandir[0]].''.$imgarray[$rand], 'width', 100, 100).'" height="'.resizeImage($randir[$getrandir[0]].''.$imgarray[$rand], 'height', 100, 100).'">';
  18. My mistake sorry, on the line where is says:$dir=opendir($randir[$getrandir[0]]);Change that to:$dir=opendir($randir[$getrandir]);And also change the next line:return '<img src="'.$randir[$getrandir[0]].''.$imgarray[$rand].'" width="170" height="137">';to:return '<img src="'.$randir[$getrandir].''.$imgarray[$rand].'" width="170" height="137">';I forgot to remove the [0] from both lines
  19. Ok, had a look through all the code, very simple to do. The images in your http://forums.xisto.com/no_longer_exists/ (random001.jpg to random167.jpg) need to be put in a new folder and we will call this folder http://forums.xisto.com/no_longer_exists/ Now here is the MOST important part. If you are INCLUDING randomizer.php in a different php document in the base directory, then change your images directories to the following: $randir[0] = 'picturearchive/archive/'; $randir[1] = 'picturearchive/useruploads/'; However, if the user will be going to http://forums.xisto.com/no_longer_exists/randomizer.php directly then change the directories to: $randir[0] = 'archive/'; $randir[1] = 'useruploads/'; That's it, it should all work now without any problems.
  20. Right, ignore all that above, sorry I'm not long out of bed and haven't had any coffee yet.The problem is the directories you have set it to. It needs to be a relative path not an absolute path. Also like I said you can't have any other files apart from images in the same directory as the images, but I will re-write the code as needed if there is no other way.Now move your randomizer.php to the base directory and change the directory lines to the following:$randir[0] = './picturearchive/';$randir[1] = './picturearchive/useruploads/';Instead of working on little *BLEEP*-bits I've got a better idea, if you want to add the contents of the picturearchive directory: randomizer.php 16-Aug-2010 07:13 722 rotate.php 16-Aug-2010 07:07 5.5K upload.php 16-Aug-2010 07:03 3.2K to a rar archive and PM me the link then I'll go through and restructure the entire directory and PHP code so it will work and is efficient.Just working on one problem at a time as they come up can take forever and leave you with some very messy code!
  21. Right I know what the problem is, i'm guessing that the folder that contains all the images also contains other files as well such as php documents?If that's the case it may be prudent to slightly restructure your site and keep the images in a seperate folder to any other files, however if that's not possible then just let me know and I'll rewrite the function again to ONLY pick up images (the reason I said try restructuring first is because modififying the code for images only is going to be annoying lol but i'll do it if need be)*EDIT*Hold on, scrap all that, I can see the problem, the directory entered isn't valid. Show me what you have replaced the images/randomdirectoryX/ with and I'll see wuts up. setting the php file as the source would mean using the gd2 library and putting the image in the header, it's a completely different set of code, I'd stick with just echoing the function for now.
  22. Something rather annoying about this post being stretched out like this, but never mind lol Ok I'm going to write a function below for you so you can select a random image from a random folder each time the function is called. What I have done is basically taken the coding example from here (so the credit really goes to that person) and just added a bit of extra functionality too incorporate multiple folders. function getRandomImage(){// Change directories to your image directories, you can also add more if you wish eg. $randir[2] = 'images/randomdirectory3/'; just remember to add the trailing slash$randir[0] = 'images/randomdirectory1/';$randir[1] = 'images/randomdirectory2/';$getrandir = array_rand($randir, 1);$dir=opendir($randir[$getrandir[0]]);$i=0;while($imgfile = readdir($dir)){if (($imgfile != ".") && ($imgfile != "..")){$imgarray[$i] = $imgfile;$i++;}}closedir($dir);$rand=rand(0,count($imgarray)-1);if($rand >= 0){return '<img src="'.$randir[$getrandir[0]].''.$imgarray[$rand].'" width="170" height="137">';}} So now all you have to do is change the following lines: $randir[0] = 'images/randomdirectory1/'; $randir[1] = 'images/randomdirectory2/'; to the directorys you want to pull a random image from and like I stated in the comments, you can add more directories if you wish. So now you have changed your directories all you need to do is echo the function and it will display your image. echo getRandomImage(); I haven't tested the modified code but looking over it there shouldn't be a problem, let me know if it works.
  23. If you want to setup phpmyadmin on your own server then you will have to write your own config file containing the username and password. There is an install script that comes with phpmyadmin that can help you with this however I've never used it. You can use this config to simply define the username and password then phpmyadmin assumes the default host is localhost, however you can define many different config settings in this config file to change that. If you are wanting to setup a local copy of phpmyadmin however are wanting it to connect to your database on a hosted account somewhere on the web etc. then you will have to be careful as this can be both a massive security threat and also impossible in some cases as certain web hosts do not allow external connections to mysql and all access must be done locally. A good working example of how to create your config file can be found here http://forums.xisto.com/no_longer_exists/
×
×
  • 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.