| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
Comments:
<0> maybe delphi <0> romans5n1 h/o i'll try <1> playgue: then I'd suggest checking out PHP Patterns <2> and put it in parentheses ($visitormail != "") && .... etc <1> playgue: funnily enough .... www.phppatterns.com <0> like this !($visitormail != "") or (!$visitormail != "")? <0> Psykick sweet I'll check it out <1> like this ($visitormail != "") <0> so I leave the ! out of the parenthesis <1> playgue: that is part of a control structure ... <1> ok ... ! = not && = and || = or <1> these are operators <0> ok <1> you can learn alot from www.php.net <2> playgue: now that I look at it... use preg_match instead <0> lol I'm so lost
<1> you can download the manual from there .... but download the manual and user examples <0> k <1> plague: your best starting at php.net and then going to phppatterns.com <1> if you want more examples there is plenty to choose from <0> thing is although I want to learn php I have to get this website finished <0> and i have verything done but the damn php script :\ <1> playgue: use preg_match as suggested by romans5n1 <0> how do i do that? <1> let me just find you a email validation function <0> ok ty <1> you can add the code to the file ... and then call the function in the if statement <2> something like: if (!preg_match("/^[^@]+@[^\.]+\.[a-z]{2,4}/i",$visitormail)) { ... } <1> romans5n1: perfect <0> still won't work I think the whole script is fubared <1> lol <0> got off a websit <1> do we have a pastebin? <2> pastebin.com? <0> h/o I'll copy what I have <1> playgue: use http://php.pastebin.com <3> romans5n1: You don't have to escape . inside [] <3> romans5n1: I realize it's a pittance in a regex such as you demonstrated, but every little bit helps. <0> http://pastebin.com/533382 <2> oh... haha, yeah your right... i just get so spastic with the backslashes :) <0> wait thats not good, I'll repost the entire script.... <3> romans5n1: Also, a lot of people find "(.+?)@" to be more readable than "[^@]+@" <3> But YMMV <3> I find not having to repeat the negative-matching symbol to make it easier to read. <0> ok this is the whole thing (i customized it a little) <0> http://php.pastebin.com/533384 <2> now, that I didn't know... I know just enough regex to get the job done <3> playgue: Are you using PHP as a CGI, or as an apache module? <2> i'll have to use that in the future <0> CGI <1> playgue: I'm not entirely certain why ... but just before that first if statement there is a ( <1> oops <1> other way ) <0> where? <3> ---> ) if(!$visitormail == "" <3> Line 40 <1> thanks TML <3> playgue: When using multiple logical operators in a single test, do everyone a favor and use () liberally <3> ( ((thing1) && (thing2)) || (thing3) ) <4> ok <4> hello <1> ok ... quick fire question <0> TML I'm a total noob to php and this is a script I took of the internet, sorry :\ <4> i need help with php sapi <0> anyway I removed that ) and it's still broken <1> who here loves doing truth tables? <1> what's the error playgue <3> playgue: Next, you need to have the same number of ('s and )'s <3> if(!$visitormail == "" && (!strstr($visitormail,"@") || !strstr($visitormail,"."))) <-- where'd all those )'s come from? <4> i want to know an explanation of certain field into the _sapi_module_struct <0> Psykick http://php.pastebin.com/533385 <--- error <3> Nevermind, I misread. They're balanced...but again, use () better to seperate logical test. <3> s/test/tests/ <1> TML: no he has too many I believe <1> TML: nope your right <3> playgue: But I think your primary problem is that your script expects register_globals to be on <5> TML: Have you reported anything to CERT before?
<3> !tell playgue about vars <2> playgue: it's not a very good idea to use a script that you don't fully understand... especially one you just "found" on the net... besides going through people's code is a great way to learn... <0> thats what I'm trying to do :) <3> Jymmm: No. I went to do it once, but during the step where you check to see if it's been reported already, I found someone had beaten me by about an hour. <2> anything you don't understand, lookup over at php.net <1> playgue: TML is right ... that script does expect register globals to be on <1> playgue: register globals = BAD!! <0> lol <5> TML: I just tried to on us-cert.GOV, my entry is too long =( <3> Psykick: You know, you don't need to say I'm right. It's understood. Ask the bot. <3> !+TML <6> TML is always right. Do not argue. Nonono... I don't care what you think you know, just don't argue. Period. <0> lol :) <0> ok this is pretty much doomed... <7> LOL <8> !+loe <8> i want that action :P <1> playgue: register global allows people to overwrite variables within your script <0> what? why would anyone want that? <3> playgue: php-bot sent you a bunch of links in a private message that discuss register globals <5> !+loe <6> loe is a poopoohead! <3> Jymmm: >:I <1> playgue: its was kinda what made php easy to learn back in PHP 3 and earlier <0> TML yeah I got them I'm going through them right now, thanks <8> pry get an php-bot action that autokick/bans on !+loe lol <0> hmmmm <3> php-bot: forget loe <6> i didn't have anything called 'loe', TML <1> playgue: so I take it you just want a nice basic email script <5> TML HA! <0> yup... for the contact section of a website <2> i think register globals just started off as nicety for lazy programmmers, it's not evil in itself... it just had a *huge* unconsidered security flaw <0> lol <1> playgue: I'll do a quick script for you <1> playgue: but learn from what I've written <3> Jymmm: I should have checked the bot log first. You didn't beat me by all that much, though. :) <0> Psykick thank you so much man, I will, I'm reading on register globals as we speak :) <5> TML bull pucky! <3> If you just want something that sends emails to a particular address from a webpage, look at formmail or formmail.php <0> Psykick most important thing is that the e-mail address which the msg is being sent to is not avialable to the users, only like a "Send Mail" button or smoething <3> It's a relatively well-solved problem and there's no reason to reinvent the wheel on it. <2> playgue: you can do a search on google for "php contact form tutorial" as well... lots of good resources there <0> sure, thanks man <2> gives you the code, so you don't have to do the work, but also walks through the code, so you can understand it... nothing better :) <1> formmail is probably the most widely used email contact form <0> romans5n1 yeah, I just saw it it's great, thanks man! <2> you know, I think that was my first little php project as well ( a contact form )... probably was jumping off point for lots of people, huh? <0> I hope so :) <2> i learned the most though, just simply reading the function lists at php.net... i'd look until I found something interesting, then try it out :) <1> playgue: i've got your modified script <0> Psykick wow that was fast <1> I'll paste it onto paste bin for you <0> k ty <0> it's 9am over here, I sarted working on the site at around 11 last night, so close to finishing :) I need sleeeeeeeeeeep <1> playgue: http://php.pastebin.com/533389 <5> Anyone want a virus ? <0> Psykick what's the $attn? <5> TML: how in the hell to you email a virus securely? <1> one secplaygue <1> one sec playgue <0> sure <9> Jymmm, cryptographically sign it, encrypt it, in a word, gpg :-P <5> masquerade: I dont want to install pgp =( <9> people use pgp? <5> oh hell, I'll zip it up <5> masquerade .GOV do <9> bah, they're still on DES ;-) <5> masquerade nope, they give their PGP key <5> masquerade but their reporting form is limited in size?! <9> heh, governmnet smokes crack <3> Anyone remember the name of that service that was popular a few years back that would take an English word or phrase and p*** it back and forth through different translation engines until it was wholly muddled? <5> elmer fudd?
Return to
#php or Go to some related
logs:
mysqldump display precision float compviz solaris snd_ich kl understanding bonnie++ results loading isolinux: disk error 80 ubuntu #dns mozilla-launcher howto #python #lisp #math
|
|