Jump to content

KingOfHeart

Members
  • Posts

    222
  • Joined

  • Last visited

Everything posted by KingOfHeart

  1. I'm not sure this is happening but everything looks yellow on my computer screen. It happened yesterday. Today when I start my computer it looked fine but within 2 min it turned yellow again. I think it's slightly looks worse. Any way I can fix this? I ordered a new screen (and having a new computer come soon... not because of the screen) but in the mean time can I fix this?
  2. It's on a computer so I can't use php. So you can colorize pre areas?
  3. I'm not sure if it's possible or not but I'd figure I should ask. I'm going to show some scripts in my tutorial. I need it to colorize certain words. Also I need it to display it by the amount of spaces and go to a new line when I press the enter key. In HTML it removes extra spaces unless if I use and it removes line breaks unless if I use <br>. So what is possible?
  4. Well, I found one script but it made it too fancy. I just want the image to show up at x/y position. No frames, no borders, no designs. I might just skip it and have the image 100% size or open in a new tab. So far I just need it for three images.
  5. On the computer itself. Remember, everything is downloaded to their computer. So the .exe file and the tutorial is already on their computer. I just wanted to make it really easy to find by opening it just by clicking.
  6. Ok, so should I link to a bat file instead? I might have a bat file that opens up a program, but off hand would anyone know the script?
  7. I need a simple script to have an image be displayed on the page. When I hover my mouse on image1, I need it to display it again on the screen. My image will only be 25% in size, so that's why I want a second image to show up. Javascript or Css, it doesn't matter to me.
  8. I'm making a little tutorial for users to download. This tutorial is for a game making program which comes with it. So when the user clicks on the link for the program, I need the program to open up. Does javascript work on all basic computers? Because my basic menu uses a bit of javascript. The first thing I will teach you is how to make a new quest. Make sure your desktop is set to 16-bit color otherwise it will not function properly. Click on your <a href = 'Quest Designer' target="_blank">Quest Designer folder</a> and open the <a href = 'Quest Designer/Quest Designer.exe'>Quest Designer.exe</a> program. Right now it's tells it to save for Quest Designer.exe, but I just want it to run.
  9. How come it works for me if I choose yes?
  10. Someone can't use our javachat because they get this error. Startup Error : java.lang.Error: Unable to load interface pixx : java.lang.SecurityException.tru http://openzelda.thegaminguniverse.com/chat.php This works fine for me, so what needs changing/addition to work for them?
  11. After searching the web, I found a script. function Download($file) { if (file_exists($file)) { header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename='.basename($file)); header('Content-Transfer-Encoding: binary'); header('Expires: 0'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); header('Content-Length: ' . filesize($file)); ob_clean(); flush(); readfile($file); exit; } } So far this script works fine.
  12. Is there a function to download a file that is normally blocked by .htaccess When a user uploads a file, I don't want it to be accessible until after it's approved. If there is no function, maybe I can copy the file, force a download, and delete it?
  13. I have a function in the file global.php which is located on the main directory of my site. this function checks the folder "test" Now when I include global.php (I use include because there's more to it then just functions) from the same directory everything is fine. Now what's the best method to use this function from a subfolder and still have it check the "test" folder?
  14. Ahh, so that's why it didn't work. I had a longer script and never noticed that comma being there so thanks.
  15. I'm getting this mysql error and I don't know why. "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' Values('test')' at line 1" ....................... Anything wrong with this line below? mysql_query("Insert INTO Uploads (username), Values('test')") or die(mysql_error());
  16. <?php $inbox_text_only = true; include "global.php"; if(isset($inbox_msg)) { header("Content-type: image/png"); $im = imagecreatefrompng("images/msgbox.PNG"); $color = imagecolorallocate($im, 220, 0, 0);//0,0,0 imagestring($im, 4, 5, 3, $inbox_msg, $color); imagepng($im); imagedestroy($im); return; } $data = "http://stats.thegaminguniverse.nl/inchat.php?chan=oz"; $contents = file_get_contents($data); $str = explode("\n",$contents); $count = $str[0]; $users = $str[1]; $users = str_replace("&Zelda", "", $users); $users = str_replace(",","", $users); $ozcount = $count - 1;//ignore zelda //ignore MiniKouruu and StatsBot if(strpos($users, 'MiniKouruu')) { $users = str_replace(" @MiniKouruu", "", $users); $ozcount -= 1; } if(strpos($users, 'HickBawt')) { $users = str_replace(" @HickBawt", "", $users); $ozcount -= 1; } if(stripos($users, 'StatsBot')) { $users = str_replace(" +StatsBot", "", $users); $users = str_replace(" StatsBot", "", $users); $users = str_replace(" +Statsbot", "", $users); $users = str_replace(" Statsbot", "", $users); $users = str_replace(" +statsbot", "", $users); $users = str_replace(" statsbot", "", $users); $ozcount -= 1; } if($ozcount == -1) $ozcount = 0; $title = "Members in #OZ (" . $ozcount . ")"; if($count >= 2) { $advertise[0] = "Just ask anyone of the members with ~ or &"; $advertise[1] = "beside their name for some help with Open Zelda."; $advertise[2] = "Click on this image to join the #oz chat!"; } else { $advertise[0] = "Sorry there are currently no members in the OZ chat."; $advertise[1] = "at this time."; $advertise[2] = "Click on this image to join the #oz chat!"; } $users = wordwrap($users, 45, "*"); //edit this line if the users stretch too far or to little on image. $users = explode('*',$users, -1); header("Content-type: image/png"); if(isset($_GET['pressed'])) $im = imagecreatefrompng("images/inchat.png"); else $im = imagecreatefrompng("images/inchat.png"); $bg = imagecolorallocate($im, 255, 255, 255); $bg2 = imagecolorallocate($im, 200, 255, 200); $color = imagecolorallocate($im, 0, 0, 0);//0,0,0 $color2 = imagecolorallocate($im, 0, 0, 0);//0,0,0 $px = (imagesx($im) - 6.3 * strlen($title)) / 2; $px = (imagesx($im) - 5.9 * strlen($uv)) / 2; imagestring($im, 3, $px, 5 , $title, $color2); $px = (imagesx($im) - 7.8 * strlen($users[0])) / 2; //if(strlen($users[0]) > 0) //imagefilledrectangle ($im,$px,26, $px + strlen($users[0]) * 8, 40,$bg2); imagestring($im, 4, $px, 27 , $users[0], $color2); if($count < 2) { $px = (imagesx($im) - 6.3 * strlen($advertise[0])) / 2; imagestring($im, 2, $px, 34, $advertise[0], $color2); } //imagestring($im, 4, $px + 2, 27 , $users[0], $color); $px = (imagesx($im) - 7.8 * strlen($users[1])) / 2; //if(strlen($users[1]) > 0) // imagefilledrectangle ($im,$px,41, $px + strlen($users[1]) * 8, 55,$bg2); imagestring($im, 4, $px, 42 , $users[1], $color); $px = (imagesx($im) - 7.8 * strlen($users[2])) / 2; //if(strlen($users[2]) > 0) //imagefilledrectangle ($im,$px,56, $px + strlen($users[2]) * 8, 70,$bg2); imagestring($im, 4, $px, 57 , $users[2], $color); $px = (imagesx($im) - 7.8 * strlen($users[3])) / 2; //if(strlen($users[3]) > 0) // imagefilledrectangle ($im,$px,71, $px + strlen($users[3]) * 8, 85,$bg2); imagestring($im, 4, $px, 72 , $users[3], $color); $px = (imagesx($im) - 7.8 * strlen($users[4])) / 2; //if(strlen($users[4]) > 0) // imagefilledrectangle ($im,$px,86, $px + strlen($users[4]) * 8, 90,$bg2); imagestring($im, 4, $px, 87 , $users[4], $color); /*$px = (imagesx($im) - 6.3 * strlen($advertise[0])) / 2; imagestring($im, 2, $px, 95 , $advertise[0], $color2); $px = (imagesx($im) - 6.3 * strlen($advertise[1])) / 2; imagestring($im, 2, $px, 105 , $advertise[1], $color2); $px = (imagesx($im) - 6.3 * strlen($advertise[2])) / 2; imagestring($im, 2, $px, 130 , $advertise[2], $color2);*/ imagepng($im); imagedestroy($im); break; ?> That's my old code, but the site no longer updates. http://api.dproj.info/oz.xml I'm going to try this next, but not sure how to extract this data.
  17. I never understood preg at all. Even though I was linked to documents and such, I never got the hang of it. So can you help create that part of the script?
  18. I need to get some data off of a website. <!-- Generated by DeviBOT --> <!-- 0 = Normal --> <!-- 1 = Voiced --> <!-- 2 = Half-Op --> <!-- 3 = Op --> <!-- 4 = Admin --> <!-- 5 = Owner --> − <userlist> <count>7</count> − <user> <nick>Janus</nick> <prefix>5</prefix> </user> − <user> <nick>Dandel</nick> <prefix>4</prefix> </user> − <user> <nick>Zelda</nick> <prefix>4</prefix> </user> − <user> <nick>bayle</nick> <prefix>1</prefix> </user> − <user> <nick>Chris_Miller</nick> <prefix>1</prefix> </user> − <user> <nick>Deviance</nick> <prefix>1</prefix> </user> − <user> <nick>DeviBOT</nick> <prefix>1</prefix> </user> </userlist> I want to return the number of users, and the usernames. Then I want to draw a character depending on the prefix value. I'm thinking of using filegetcontents, and explode. Then I guess, use an array to replace the prefix number with a symbol. BTW the possible symbols are + % @ & ~ (regular gets no symbol, voice gets +, and so on). So how would you do this?
  19. Will it know that the upload option was selected? A user could choose an upload, switch the radio to a link and then submit. So I want to make sure it knows which one is selected.
  20. Well what about 1000KB for now? The script works good so far. Now I want to have it upload the file if the upload radio is selected, if not I just want to return the file name of the link. Is more javascript required to figure out which one is enabled, and which one is disabled?
  21. if(file_exists($file)) { $fh = fopen($file, 'r'); $fr = fread($fh, 1024); fclose($fh); echo $fr; return; } This doesn't seem to work on php files. I'm assuming it's because of all the HTML and php data. How do I just print everything as text?
  22. I have three tables. Forum_ID, Forum_Info, and Account BTW, these are not the actual names, but it will do for answering my question. I want to do a search for Forum_ID. Then when it finds the row in Forum_ID, I want it to list the data. The Forum_Info has most of the info I need, but some of the fields match with Forum_ID. In Forum_Info it has the account's ID. The username would have to be read from Account. Now I could do one while loop search, and slap the other two tables within the search, but I'd rather do one search line. Get what I'm saying? No, I can not change the fields or tables.
  23. I want to create an option for them to either paste a link or upload. How can I have them select one, and disable the other. I know it has something to do with "radio" When it comes to uploading, I like to give a 1MB upload limit as well.
  24. I came up with my own method which seems to solve my problem so far. function urlcheck($flink) { $link = str_replace(" ","%20",$flink); $url_parts = @parse_url( $link ); if(substr($url_parts["path"],2,27)== "openzelda.thegaminguniverse") { $ozfile = substr($url_parts["path"],34); if(file_exists($ozfile)) return true; } if ( empty( $url_parts["host"] ) ) return( false ); if ( !empty( $url_parts["path"] ) ) $documentpath = $url_parts["path"]; else $documentpath = "/"; if ( !empty( $url_parts["query"] ) ) $documentpath .= "?" . $url_parts["query"]; $host = $url_parts["host"]; $port = $url_parts["port"]; if (empty( $port ) ) $port = "80"; $socket = @fsockopen( $host, $port, $errno, $errstr, 30 ); if (!$socket) return false; else { fwrite ($socket, "GET ".$documentpath." HTTP/1.0\r\nHost: $host\r\n\r\n"); $http_response = fgets( $socket, 50 ); if ( ereg("200 OK", $http_response, $regs ) ) { fclose( $socket ); return true; } else return false; } } To me it's simple and I easily understand it.
  25. Anything more simplified? I don't see the point of complicating things just to see if a file exists.
×
×
  • 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.