taith
Members-
Posts
1,514 -
Joined
-
Last visited
Everything posted by taith
-
or make a splash screen... and have javascript set a cookie... retrieve it when you go to your index page... if cookie exists, its enabled... else... nope!
-
yup! just find the ones that are past the expirey dates, pull them into the loop, delete all relevent information from all your tables/files, delete user, can even send em an email if you want :-) telling them the account has gone poof :-)
-
personally... i'd only allow files to last for 1 day... so... $day=date(z); $query=mysql_query("SELECT * FROM `files` WHERE day!='$day'"); while($row=mysql_fetch_assoc($query)){ unlink($row[filepath]); mysql_query("DELETE FROM `files` WHERE `id`='$row[id]' LIMIT 1"); }
-
http://www.m-software.de/thumbshots-simple.php?url=http%3A%2F%2Fwww.google.com anybody know how to make a image like that? its obviousally created via php... as far as i can tell... it uses somin like file_get_contents() to grab the source of the page... but how do you tell an image, to process html code?
-
[SOLVED] Grabbing text from files/strings/etc
taith replied to iLLeLogicaL's topic in PHP Coding Help
i jus made this... you can scrap the text outta that string too with this... <?php function strip_text($string){ $tag=false; $strlen=strlen($string); for($i=0; $i<$strlen; $i++){ if($string{$i}=='<') $tag=true; elseif($string{$i}=='>'){ $out.=$string{$i}; $tag=false; } if($tag==true) $out.=$string{$i}; } return $out; } ?> so.... $file=file_get_contents('url.html'); $inputs=strip_tags(strip_text($file),'<input>'); echo $inputs; #may contain '<input type=textbox name="" value=""><input type=submit><input type=file name="">' -
[SOLVED] Grabbing text from files/strings/etc
taith replied to iLLeLogicaL's topic in PHP Coding Help
sorry... by file i mean string... $file=file_get_contents('url.html'); $inputs=strip_tags($file,'<input>'); echo $inputs; #may contain '<input type=textbox name="" value="">asdfasdf<input type=submit>there could be a paragraph or two in here...<input type=file name="">asdfadf' -
[SOLVED] Grabbing text from files/strings/etc
taith replied to iLLeLogicaL's topic in PHP Coding Help
well... gotta start somewhere... $file=file_get_contents('url.html'); $inputs=strip_tags($file,'<input>'); that'd give you all the input tags... then you gotta filter them somehow... prolly regex... -
nono... you action="" to one php page, on that page, do you query/updates/unsets/ect, then redirect to the homepage...
-
i... think thats what you mean? need the enctype... else we need the code that moves the file to whatever directory you'v set :-) <form method=post name="form" ENCTYPE="multipart/form-data">
-
[SOLVED] how to make a multidimensional array flat
taith replied to madrazel's topic in PHP Coding Help
i JUST made this... enjoy :-) <?php function array_flatten($array){ $out=array(); foreach($array as $k=>$v){ if(is_array($array[$k])){ $out=array_merge($out,array_flatten($array[$k])); }else{ $out[]=$v; } } return $out; } $array[]=array('test','test2'); $array[]='test5'; $array[][]='test3'; $array[][][]='test4'; print_r(array_flatten($array)); ?> -
just at the top of your pages... put a... <noscript><span style="font-size:24px;color:red;">You need to have javascript on to view this page</span><div style="display:none; visible:hidden;"></noscript>
-
besides... text is sent through the mail($text...) field... files are sent through headers ;-)
-
... not... exactly... you create a boundary... so it knows that part of the email is file, other part is text/html
-
ya... but it doesnt keep the same hash every time you refresh... which is 100% useless for testing passwords... lol ok... think i found a use for it... perhapss... licencing? so you install on one server, goes to your sever, checks to make sure licence is valid, then will install... but not for passwords...
-
[SOLVED] Upload script suddenly produces error
taith replied to fluteflute's topic in PHP Coding Help
ya.... i wish... lol just use a program like notepad++ which autocolours your text... makes debuging a breeze! -
on the popup... do your query, if it finds the id... show it, else, error... showing on the page would require refreshing the page, making the popup pointless...
-
ya... thats... not md5... every time you refresh it, it gives you a new hash... and it doesnt work, if you dont put the origional text in...
-
um... pregmatch only checks if the string is typed in properly... it wouldnt check if the server is up or down...
-
[SOLVED] Upload script suddenly produces error
taith replied to fluteflute's topic in PHP Coding Help
it means that it expected another )... but hit a { first... and said... "HEY! thats not supposed to be there!" -
[SOLVED] Upload script suddenly produces error
taith replied to fluteflute's topic in PHP Coding Help
if($ext !== (".gif") { you have an extra ( in there... drat! chocopi beat me to it! lol -
$header.="Content-Type: text/html\n";
-
that is assuming that you dont skip any numbers
-
if you print_r($files); after the natsort... how's it sorting it?
-
if you glob() the folder... you can easily grab all the files into an array... $files=glob('path/file*.png'); natsort($files); $high=$files[count($files)-1]; chigley - my way's faster ;-)
-
sure its possible... http://ca.php.net/manual/en/function.func-get-args.php