laffin
Members-
Posts
1,200 -
Joined
-
Last visited
Everything posted by laffin
-
u give the result of the md5, that's what i'm talking about. not the function. if someone were to see the md5 hash of a password, they got 2 keys to a puzzle of a user acct. 1) The username 2) the md5 hash itself (the result of md5) now they can run a routine offline to hack that acct. u want to make things harder, reason to use md5 hashes instead of plain text passwords. not defeat the purpose of md5 hashing
-
Want to call php as a module in my home-grown server
laffin replied to tekaweni's topic in PHP Coding Help
Actually i was looking for a way to do this as well, but from what i have researched, a few others have tried and there was no successful end result. It wud be great to have php as an embedded language like lua. but ya may want to look at lua as an alternative if you will be embedding a scripting language into yer application. anoter project u may look at is RoadSend PHP compiler although not complete it looks promising -
and why wud u do that? now you have given away a great deal in cracking the pw. the md5 hash shudn be made available to the user at all. with this hash someone can generate new hashs, and come up with a password that isnt the same as the original password, but gives the same md5 hash.
-
Look at the include('xxxx') statements in the files as said replace them with include_once('xxxx'); now look thru the files that were referenced in these includes and do the same thing. notice that the excrepts ya show us dun actually show the script that is causing the problem.
-
shure thing, tell me how yer project is coming.
-
exactly, the db can also state if pricing goes by square feet (such as sheets) or by pieces (such as tiles). and adjust the calculators to follow suit.
-
preg_match("@^\[(\d{2}.\d{2}.\d{4} \d{2}:\d{2}:\d{2})\] (.+?) killed (.+?) with (.+) Damage:(\d{1,})$@i",$file,$matches); shud return $matches[1] date/time $matches[2] killer $matches[3] killee $matches[4] damage done
-
oh, i took a quick look at it. yep, php, prolly tied to a db.
-
use something like a preg_match statement to check for valid email addresses. /** Checks is the provided email address is formally valid * @param string $email email address to be checked * @return true if the email is valid, false otherwise */ function valid_email($email) { $regexp="/^[a-z0-9]+([_\\.-][a-z0-9]+)*@([a-z0-9]+([\.-][a-z0-9]+)*)+\\.[a-z]{2,}$/i"; if ( !preg_match($regexp, $email) ) { $_obweb->addErr("Email address is not correct\n"); return false; } return true; }
-
it's done using javascript. u can find some examples here
-
no problem, it's good to test one skills against problems/challenges posed by others. it keeps yer skills developing
-
okay than are u checking the text file for valid email addresses before passing them onto the mail function?
-
u might be better off converting to time() format. than it wud be easier to calculate
-
looks good to me. prolly a copy and paste error on my part.
-
[quote author=DarkPrince2005 link=topic=178525.msg799195#msg799195 date=1201543414] ini_set('send_from','addy.co.za'); for some reason this dun look like a valid email address
-
I think it's the amount of reciepents. 299 is a bit ecessive for 1 email. break em into 20-25 reciepents per mail
-
u need to get rid of this for($i = 0; $i<= 4; $i ++) { and its ending } it was looping 5 times (0, 1, 2,3,4) create a counter $ctr=0; now ya want 4 pics at the beginning of the foreach loop add if(!$ctr) echo "<TR><TD>"; $ctr++; now at end of the foreach loop (still within the loop) add if($ctr==4) {$ctr=0;ECHO "</TD></TR>";} after the foreach loop if($ctr!=0) {$ctr=3-$ctr; echo "</TD><TD SPAN=$ctr>nbsp;</TD></TR>";} u may have to tweak the last portion, but ya shud be able to figure it out from here
-
<?php function urlencodebase64($matches){ $url = urlencode(base64_encode($matches[2])); return "<a href=\"http://www.ballywhonews.com/dev/test/testlink.php?url=".$url."\">"; } function urldecodebase64($url) { return base64_decode(urldecode($url)); } // put it together $string = 'This is a string with a url in it <a href="http://www.google.co.uk/search?q=php&num=100&hl=en&safe=off&start=200&sa=N">http://www.google.co.uk/search?q=php&num=100&hl=en&safe=off&start=200&sa=N</a><p>Not only that, but here is another one <a href="http://www.aol.com">America Online</a></p>'; $new_string = preg_replace_callback('/(<a\s+.*?href\s*=\s*"([^\s"]*)".*?>))/i','urlencodebase64',$string); // echo it so we can click the links for testing header("Content-type: text/plain"); echo "$string\n"; echo "$new_string\n"; // after the link is clicked and the page is reloaded if(isset($_GET['url'])) { $url = urldecodebase64($_GET['url']); echo '<p>'.$url; } ?> changed the preg statement a little
-
lol php never ceases to amaze me by sheer amount of functions it has for doing things.
-
reason u use fgets ur not loading the entire file into memory, you are parsing it a section at a time fgets gets one line from the file
-
SELECT SUM(payment) as tpayments FROM payment WHERE client_number=$c just migt be easier to let Mysql do the summation of that field That is if yer not displaying the history of payments
-
download it parse it store entries in a db use functions fopen/fgets/fclose fgets grabs a single line from the file, so u can explode it into an array. $entry=explode(';',$row); than store it in a local db Mysql/Sqlite or similar
-
Yep, for linux that is a lot of system. Even the feather distros (DSL,Puppy,FreeSCO,SmoothWall) it exceeds the minimum reqs. u can prolly use any standard linux distro, just dun load it down with a bunch daemons and other niceties. I was running a 700Mhz 10GB 256MB router with FreeSCO, I used it as a server rather than a workstation. but on that system was running apache/mysql/samba/firewall/ftp/telnet clients. it handled it very nicely (better than windows with apache/mysql/php)
-
whatca mean by Fields escaped by: \
-
Want to call php as a module in my home-grown server
laffin replied to tekaweni's topic in PHP Coding Help
there are no php hooks, as u say. php is an executable. u can make a module to export environment variables for php to access. which u can get from <?php phpinfo();?> now fastcgi with php is something altogether different, as it keeps a copy of php-cgi in memory. i dunno how the interface works, but u wud do good looking at this module from apache.