Jump to content

oni-kun

Members
  • Posts

    1,984
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by oni-kun

  1. If I'd be correct, try adding it to the <head> section of your script, and it may work (experiment. JS usually is able to take care of these things, I don't think anyone knows how to insert someone else's script in, it's just not an easy thing to ask unless it's on their forums.
  2. / Means document root, so if it is not then for compatibility it should be removed. A valid example would be /usr/home/htdocs/folder/cf.php
  3. Or even worse, for ($i=0;$i=20;$i+=$i); { $select['$i']; }
  4. Hm, I looked on a newly created Notepad++ file, and it only contained 0D, Not 0A. Wow, I can't believe it'd do that to me.. I'll have to look it up, Grrrr.. blasphemous notepad.
  5. What do you mean place it on your main page? You can link to it: <a href="feedback.php">Feedback</a> Or use header to send the location to it, but not sure what you're going for. This is really more an HTML question. EDIT: Oh I see what you mean.. There should be tutorials from where you got it from, this isn't really a PHP question.
  6. No problem. At the bottom left of this thread should be a 'topic solved' button, You should press it to declare it solved.
  7. Refer to my last post, I edited it to read from the file if no GET is defined, or read from the GET itself.
  8. You'd have to do more than that, I'll assume data.txt will always be there, but you can do this.. <?php if(isset($_GET["data"])) { $data=$_GET["data"]; file_put_contents("./data.txt",$data); $string = $_GET['data']; } else { //If no GET was defined, read from data.txt $string = file_get_contents("./data.txt"); } $width = strlen($string)*8; $my_img = imagecreate( $width, 15); $background = imagecolorallocate( $my_img, 255, 255, 255 ); $text_color = imagecolorallocate( $my_img, 0, 0, 0 ); imagestring( $my_img, 4, 0, 0, $string, $text_color ); header( "Content-type: image/png" ); imagepng( $my_img ); imagecolordeallocate( $text_color ); imagecolordeallocate( $background ); imagedestroy( $my_img ); ?> EDIT: Fixed the code to work..
  9. Were you transferring in binary, ascii, or auto? I left it at auto, Although I assume it should transfer it ascii as there's nothing special in the file. In my hex editor, it returns: 0D0D0A (Return, Return, Line terminator). Is that a possible error (it not liking my Windows return lines) and accidental conversion? Hmm..
  10. You'd need to extend the conditional statement, IE: <?php if(isset($_GET["data"])) { $data=$_GET["data"]; file_put_contents("./data.txt",$data); $string = file_get_contents("./data.txt"); $width = strlen($data)*8; $my_img = imagecreate( $width, 15); $background = imagecolorallocate( $my_img, 255, 255, 255 ); $text_color = imagecolorallocate( $my_img, 0, 0, 0 ); imagestring( $my_img, 4, 0, 0, $string, $text_color ); header( "Content-type: image/png" ); imagepng( $my_img ); imagecolordeallocate( $text_color ); imagecolordeallocate( $background ); imagedestroy( $my_img ); } else { trigger_error('Data variable not defined.'); exit; } ?>
  11. Post your form code, and the results of: echo '<pre>'; // Formatting echo print_r($_POST) . "<br/>\n"; echo print_r($_GET) . "<br/>\n"; echo print_r($_REQUEST) . "<br/>\n"; Should give you a better idea of what's going on. <html> <body> <form action="form.php" method="post"> Name: <input type="text" name="fname" /> Age: <input type="text" name="age" /> <input type="submit" /> </form> </body> </html> <?php //ini_set('display_errors',1); //error_reporting(E_ALL); echo '<pre>'; echo print_r($_POST, 1) . "<br/>\n"; echo print_r($_GET, 1) . "<br/>\n"; echo print_r($_REQUEST, 1) . "<br/>\n"; ?> Returns: As expected. Again, purely depends on your form code, browser and PHP.
  12. I used FileZilla for awhile, but I noticed (for whatever reason) uploading files made with Notepad++, added two newlines, so my code that is on the site, is spaced to hell and too annoying to compress again (macros won't help much in this case), I switched to FlashFXP, very similar and works great.
  13. Some people (such as off of google data centers) have over 100MiB/second throughput, but it does not mean it will download at that speed. Your 6MB/s could be throttled down, or the clients may not be able to even put more than 30KB/s out.
  14. I'm sure .it torrent search engines will list localized torrents, Remember, You are downloading from random peers/seeds, which can be near you or thousands of miles away, speed may also be affected by the ISP/server filtering that is possibly performed and general infrastructure performance. I'm sure localized sites will have atleast a few local peers.
  15. http://www.krazypickem.com/new_kp/forgot.php?account=19&key=1961212151622242525&pw=reset Which leads to: http://www.krazypickem.com/new_kp/forgot.php?
  16. You can create your own set script on server side using passthru or similar, log traceroute along with ping.
  17. Tis why I put a link in my sig.
  18. $select = mysql_fetch_array(mysql_query("select * from user where username = '$username' and password = '$pass'")); ? Double negative!
  19. No, It'd be recommended to sleep for example 10ms between execution of mail() to guard against problems, another use of sleep() can be to delay execution of a set of commands, such as $fp = fopen('?doCronjob', 'r') sleep(1000); //Wait for reply file_get_contents(/usr/var/cronlog.log);
  20. It seems to parse something, then just gives an empty $_GET variable, may be a problem on the code.
  21. This is a good idea. I'd recommend this as (dynamic charts) are either creating client side code, or using an advanced GD class to generate the image data and place it on an image, which is really pointless.(And requiring a lot of memory consumtion, Let google do that for you!)
  22. If I'm not mistaken: if (isset($_GET['success'])) { //... header("Location: /cf.php?success"); Will cause an infinite loop, You are saying 'IF success = true, go to ?success', and it will go 'if success=true, go to ?success'. And no, Permissions will not be relevant to mail() unless your MX records for your domain are not set up (May require contact to support department to check)
  23. Statements without blocks, It's annoying to even look at (save 3 key presses!), such as: if ($foo == $bar) DoThis(); echo 'Where does If end?!'; People assuming there are no errors being displayed, means there code is 'correct' and supposed to work. People using session_register();. Was the internet around in the 90's? Where are these PHP tutorials coming from? People including files with a .inc extension without using .htaccess to parse it as PHP. It can be included, but what if you view site.com/includes/header.inc, You're screwed. And last but not least, or die("Uh oh, a query malfunctioned"); //Give out a useful error for debugging Just rambling.. hehe.
  24. The following would be in .htaccess format: php_value upload_max_filesize 500M php_value post_max_size 500M For your further reference.
×
×
  • 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.