Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. Since when has ripping your hair out been "rewarding" JK (just kidding) But its true it does get easier with time!
  2. erm.. GET & POST can be passed between domains!
  3. $user_id = $row; should be $user_id = $row['id'];
  4. I agree with what conormacaoidh said, as thats quite secure, however it also boils down to what you don't want them to download for example if you ONLY wanted them to download files of the types you have listed to could change default: $ctype="application/force-download"; to default: die("Error: downloading");
  5. so something link this <?php $dir = "/path/to/files/"; if (is_dir($dir)) { if ($dh = opendir($dir)) { while (($file = readdir($dh)) !== false) { //if the file modified time + 1 week is less than the time now then unlink if(filemtime($dir.$file)+(7*24*60*60) < time() ) { echo "unlink(".$dir.$file.")<br>"; #unlink($dir . $file); //uncomment to use } } closedir($dh); } } ?> EDIT: note this will not delete the files but only echo them.. check its correct first!
  6. phpretard read the manual substr if it don't make sense keep reading.. if your still stuck (even after Example #1)! find some tutorials ie PHP 101: PHP For the Absolute Beginner if you don't want to spend the time then try the freelance section! No offence intended! EDIT: PHP doesn't use null-terminated strings, PHP stores the integer length of the string as well as the data itself, so it knows how long the string is, and doesn't get fooled by NULL bytes part-way along the string
  7. Okay your getting 15 but expect what ? also on $hour2 your not using sum so i assume you have a loop.. as you havn't posted any of your results code its kinda hard to say what the problem is!
  8. it looks fine to me, apart from the fact $startdate isn't set! also maybe try changing curl_setopt($ch, CURLOPT_POSTFIELDS, "startdate=$startdate"); to curl_setopt($ch, CURLOPT_POSTFIELDS, array("startdate"=>$startdate));
  9. if your outputing to error.txt while its inuse it will fail. (that down do the OS not PHP)
  10. Try on another computer, (or host your script an ask someone to test it) First try deleting all your IE8 cookies.
  11. Okay well if your not going to give me anything useful then what can i say! Works here
  12. echo dirname(__FILE__);///=full path to this file
  13. OKay if you want to post test code then please post some usefuil test code i don't see where your outputting anything Does the code i supplied work on your also you use IE8 beta (as that had bugs)?
  14. if short tags are on then <? is allowed <?php is always allowed if(ini_get("short_open_tag")) { //short tags are on }
  15. PHP is server side so not affected by client browser.. However, without seeing your code theirs not much we can say, does this code work (in its own file) ? <?php session_start(); if(isset($_SESSION['online'])) { $_SESSION['online']++; }else{ $_SESSION['online'] = 1; } echo $_SESSION['online']; ?>
  16. I thought it would be something like that, solved ? (if so please click solved)
  17. can you post the code that check what radio box is choosen
  18. instead of killing 2 birds, use a better design to stop the birds and thus saving your stones! LOL
  19. if your refering to the bold <br> then your need to post the correct code.. the code posted doesn't even have the <tbody> and as the break are before that, it would seam you need to check earlier code!
  20. try adding a value $emailmessage = $emailmessage . "<input type=\"radio\" name=\"newvalue\" value=\"YES\" CHECKED>YES "; $emailmessage = $emailmessage . "<input type=\"radio\" name=\"newvalue\" value=\"NO\" >NO</td></tr>";
  21. You can load any true type font in so you don't need to use a plain one You can't use photoshop filters but you can re-create the effect ie drop shadow is basical the same text in black behind the font but a few extra pixels down and right! Its possible (to a degree) but not easy.. (due to your questions i assume no, on the following) 1. Have you created a font before ? 2. do you know the font format spec for TTF's ? 3. Have written font creation software before ?
  22. $bytes is the file size! as you requested.. i don't know what you what to do with it!
  23. i probably messed that up. $newSize = 500; if($height > $width) { $width =($width/$height)*$newSize; $height = $newSize; }else{ $height =($height/$width)*$newSize; $width= $newSize; }
  24. you could try $bytes = curl_getinfo($curl_handler, CURLINFO_CONTENT_LENGTH_DOWNLOAD);
  25. try this $day=30; $month = 2; $year=2009; if(!checkdate($month, $day, $year)) { echo "the date you selected is non existent, dumbass"; }
×
×
  • 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.