-
Posts
9,409 -
Joined
-
Last visited
-
Days Won
1
Everything posted by MadTechie
-
Since when has ripping your hair out been "rewarding" JK (just kidding) But its true it does get easier with time!
-
Sending form values to a form on a different site.
MadTechie replied to luked23's topic in PHP Coding Help
erm.. GET & POST can be passed between domains! -
$user_id = $row; should be $user_id = $row['id'];
-
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");
-
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!
-
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
-
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!
-
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));
-
if your outputing to error.txt while its inuse it will fail. (that down do the OS not PHP)
-
Try on another computer, (or host your script an ask someone to test it) First try deleting all your IE8 cookies.
-
Okay well if your not going to give me anything useful then what can i say! Works here
-
echo dirname(__FILE__);///=full path to this file
-
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)?
-
[SOLVED] Check if shorts tags are on in ini file?
MadTechie replied to Xu Wei Jie's topic in PHP Coding Help
if short tags are on then <? is allowed <?php is always allowed if(ini_get("short_open_tag")) { //short tags are on } -
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']; ?>
-
instead of killing 2 birds, use a better design to stop the birds and thus saving your stones! LOL
-
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!
-
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 ?
-
$bytes is the file size! as you requested.. i don't know what you what to do with it!
-
i probably messed that up. $newSize = 500; if($height > $width) { $width =($width/$height)*$newSize; $height = $newSize; }else{ $height =($height/$width)*$newSize; $width= $newSize; }
-
you could try $bytes = curl_getinfo($curl_handler, CURLINFO_CONTENT_LENGTH_DOWNLOAD);
-
try this $day=30; $month = 2; $year=2009; if(!checkdate($month, $day, $year)) { echo "the date you selected is non existent, dumbass"; }