Jump to content

jege

Members
  • Posts

    28
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

jege's Achievements

Member

Member (2/5)

0

Reputation

  1. Ok, this is my code: $ini_array = parse_ini_file("$file"); foreach($ini_array as $bans){ echo "<tr>"; echo "<td><i should get the username here></td>"; echo "<td>$bans</td>"; echo "</tr>"; } I'm totally terrible with arrays, how can I get the username there? Heres a piece of the array: Array ( [gamegazelle] => Grief [JamesRB] => Grief)
  2. Hey. I got a file like this: #First line some random comment someplayername=Stealing andanother=\u00A7cAsshat The filetype is .properties So, how could I read the file, so the player name, the word before the "=" would be stored somewhere and displayed, and the reason, which is after = would be stored and displayd on the page. That's a banlist of a Minecraft server, so It would be a table like "Player name: john" Reason: "Asshat" also, as you can see the Asshat has "\u00A7c" i'm not sure what "language" or "markup" it is, but i know it stands for light red color. So the script should ignore the light red tags if possible. Thanks in advance.
  3. jege

    Explode help

    Yea, it did work It just gave a error on another plug-in. Anyway, my next problem is. How could I save it to the file again? I took all of the data, inserted them to like 10 textfields and then "true / false" values to a dropdown, any tipa? Should I just use fopen / fsave w/e and other similar functions?
  4. jege

    Explode help

    Works like a charm, only problem. The file has true and false values. It ignores all false values and doesn't print them and converts true to 1. edit: the file doesn't work when I add the "" (The software can't read it anymore)
  5. Hey. I got a file like this: #A Comment #And another comment level=My Level name=The servers name! world=world1 flying=false The file is like that but there is around 20 more settings. How could I make that the script gets the contents after = I tried with explode and using = but it always gave the second line until =. Any ideas. Also, I want to insert the data to an textarea (This I can do myself when I get the values somehow) Thanks.
  6. But that doesn't either work, is it possible to make it run the bat itself, since it has the console also. So it would run similar if it would an human would open it with his mouse.
  7. Hey, I'm trying to make a script which runs an .bat file. Currently ive used exec('c:\WINDOWS\system32\cmd.exe /c START <path here>'); but doesn't work like I want. The .bat file runs my minecraft server, if you have ever run one you need to run a .bat file which executes then a .jar file. This is the content of the .bat file java -Xms1024M -Xmx1580M -jar craftbukkit-1.2.5-R3.0.jar pause If there anyway when I run that it will start that .bat file. The .bat file and the webserver is on the same machine. Tho Xampp is in C:/ drive and the server on D:/ Thanks.
  8. Ok, It works after I tweaked it a little for my purpose. Thanks! I would now want to do an like &function=<something here> eg, an moderator would have an button to remove the profile like, profile.php?id=1&function=delete So, I tried to do this but It didn't really work. I did if(@$_GET['function']=='delete'){ bla bla bla, checking if hes moderator etc etc. } But it didn't really work, since it could be run anywhere in the profile.php file. How could I make it work properly?
  9. Haha, thanks Ill try it now Im quite new to php so yeah.
  10. Hello. I got a table which has userprofiles, they are like. id, username, nickname, email, skype, bla bla bla. So, like many websites has its like eg: profile.php?id=xxx I would want to create something similar to that. (I'm not master at php but,) I believe it should be done. Converting the database content to an array, and making an foreach of the array, and make the foreach loop something like this. if($_GET['id']=='<the id from database>'){ the data here. skype, email etc. } If you could help me make this. Thanks in advance.
  11. Thanks for your help I managed to do what I wanted with this: if($_GET['site']=='news'){ require ('news.php'); }elseif($_GET['site']=='info'){ require ('info.php'); }elseif($_GET['site']=='location'){ require ('location.php'); }else{ require('index.php'); } I guess there is more ways to do this but this worked for me really easily
  12. When I clicked your link it just gave an webpage with 1 tutorial or so. Ill try it again
  13. If you are aware of some tutorial for this, I would be more than pleased to get it
  14. Thanks, I'm really new to php so I just guessed how it might work
  15. Hello. I'm coding myself an small webpage, In the internet you can see that there is pages like index.php?id=223923 <- for example or index.php?=news. So, I'm trying to create similar to that myself. I tried googling and searching youtube how to do this but didn't really find anything. I figured it out that it needs some database etc. I tried myself doing some table in my mysql db. And in the table some 'id, title, content' and in the id would be the url, (index.php?='id') the title would be the <title> </title> and the content would be all the code inside the webpage. I got no idea how to link these to an php or whatever it should be done So would anyone kindly tell me howto do this or give some link to an tutorial?
×
×
  • 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.