@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
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



Comments:

<0> I think I got that all figured out.
<1> hello
<2> woof
<3> arpad: When you say one step afterwards, you mean in a foreach or something?
<1> i would like to make a mail function that sends a socket to telnet 0 25 and uses this service for sending mail. can you help me with some more intel about this?
<2> eIf: Sure. Use phpmailer
<1> Stormchaser what's phpmailer?
<1> a pear module?
<3> google
<3> :)
<4> foo: no, like $file_list = preg_grep('/(?<!\.src)\.rpm$/i', $file_list);
<3> arpad: ahhh, thanks. I'll check that out.
<1> but anyway, i would really love to use just a simple function, i'm sure i would manage to realise this with fsockopen
<1> i just don't recall what commands should i use in order to send a message to a recepient from a sender, with a subject and a message
<5> Is there any simple thing to escape " and / characters in a variable?
<6> hi



<6> why the MDB2 dont catch de values of the sql query? http://phpfi.com/119093
<2> !+pear
<7> [PEAR] PHP Extension and Application Repository, a framework and distribution system for reusable PHP components. ##PHP does not support PEAR, please see http://pear.php.net/support.php.
<8> who use pear anyway
<5> preg_quote is turning <img src="img/29.gif" alt="Smiley#29" /> into \Smiley#29
<4> sloloem: use addcslashes() for that
<5> Hm
<3> arpad: So that regex basically says, "Return all elements that end in .rpm but do not end in .src.rpm." I think that's what it ends in... some of that regex is a tad out of my knowledge. hmm
<5> What if I want " in the charlist for addcslashes?
<4> foo: right
<5> I need to escape it in the list?
<4> sloloem: php.net/types.string
<5> Yes would've worked
<3> Can I do mysql_query("QUERY 1; QUERY2"); ?
<2> no
<5> How does this charlist work?
<3> Stormchaser: Thanks
<5> do I just put the characters right in a line or delimit them or what? Nothing's simple enough in the manual.
<8> Stormchaser, are you really sure about this ?
<5> Why are these functions stripping off half of my bloody string?
<2> vinadelmar: I am, documentation is, and developers are... Any more questions?
<9> http://byster.net/?page_id=48 <--- really cool function speed comparison thing
<4> sloloem: if you're looking at it in a web browser it's probably being interpreted as html
<5> Just noticed that...preg_replace is still complaining about it though
<8> Stormchaser, yes one more : what is the meaning of life?
<10> 42 *rolls eyes*
<4> sloloem: oh i didn't realise you're putting it into preg_replace(), what's the whole line?
<8> there is no man pages for life :/
<11> vinadelmar: Because you're not supposed to be alive to read them.
<5> Which line? I'm setting pattern in a var then calling preg_replace like $retval = preg_replace($pattern, $iconlink, $retval);
<8> that ****s :)
<4> sloloem: but you're escaping the whole pattern?
<5> I'm escaping...I don't know
<8> well if you do not expect resource, i thought you could put more than one update statements in a row :/
<5> $pattern = "/" . addcslashes($happy,"\"<>") . "/";
<10> pah, i was told to shorten a string using an array yesterday, i could have done the same using substr
<11> ...
<4> sloloem: why aren't you just using str_replace() ?
<5> Because I've yet to figure out what I'm doing
<4> sloloem: forget preg_replace() unless you need regex
<5> Guess I don't need it at this stage, a straight match this time around...
<12> sloloem...
<5> dot dot dot?
<12> my code = http://www.mypastebin.com/?code=1798558244
<12> sorry...
<12> anyway
<12> it works now when i use my 1st user in the table, harleyg
<12> but if i try the 2nd or 3rd it doesnt
<12> mmm? any ideas?
<11> Stormchaser: Do you go by "Whitehawk Stormchaser?"
<3> Alright, I'm all about automation. If it can save me time, then let's do it. This is what I am thinking: A way to get form input into a database as easy as possible. How about having form elements with something in the format of name:tablename=thename ... where name = the name of the function, tablename=the name of the table, and thename= thename... or I could even do name=tablename, actually. Then I could have a foreach go through $_POST and add the variables wi
<2> kuja: yes
<11> Stormchaser: Oh okay, was just browsing through the amaroK credits and thought that name might be yours.
<12> oh no wait.. it works now
<12> seriously wtf :|
<2> kuja: :)
<12> ok no problems
<2> harleyg: Apparently the second username / p***word yeilds 0 results.
<12> not anymore :)
<3> Stormchaser: I'd like your input on something like that, as I see you very knowledgeable with this PHP stuff :)
<2> foo: ask kuja.



<5> str_replace isn't complaining but it's not working either
<5> Wait got it
<13> http://hashphp.org/pastebin?pid=6788 i get an error Warning: mysql_fetch_***oc(): supplied argument is not a valid MySQL result resource in /home/drunknig/public_html/images/index.php on line 45
<13> or should i ask in
<13> a mysql channel?
<3> kuja: What do you think about something like that?
<14> likid: Your query is failing, check that the query succeeded before attempting to traverse the result set.
<5> drunknig_images?
<2> foo: just ASK, dammit... Don't spend time and energy asking people if you can *ask* them :P
<3> Stormchaser: haha, I asked already :)
<14> foo: If you're interested in the opinion of a mere mortal I'd say you probably want to be giving as little away about your internal architecture as possible. Also, where would the for commit to?
<11> foo: Sorry, I just got back from a smoke.
<13> sloloem: yes? o.o
<11> foo: Rephrase.
<14> foo: Would you be having one single entry point to handle all database updates? If so, this could get a little complicated, if not, I don't really see the advantage.
<14> s/for/form/g
<3> kuja: Alright, my task is to make data going from a form to a database as easy as possible. I would have a form that would contain different input types with names in the format of fieldname=table-row ... where table is the mysql table and row= the row. I would then on the following page have a functiont foreach's through $_POST, explodes by = and - ... and creates a query that will be executed .
<3> bubblenut: ^^ Is that more clear? HM
<11> foo: Sounds like a bunch of insecure crap.
<3> Oh, shoot. I didn't even consider the possibilities of someone changing those names...
<3> kuja: Bleh, scratch that, then. Thanks for the insight
<5> str_replace is eating far too much of my string
<10> I need to learn OOP, but not many places explain it well
<15> Can anyone here help me with libssh2 ?
<15> I installed it and tryin to run a basic php script and I get this
<15> Fatal error: Call to undefined function: ssh2_connect() in /home/crap/public_html/p86/dovid.php on line 2
<15> ?
<8> bullrage, i suggest that you invest in some books then
<10> vinadelmar: I have the Professional PHP 4 book, but it decides to use starting a car engine as its example
<8> uh?
<10> exactly
<8> i mean, learn OOP itself first
<15> Can anyone help me with libssh2 ?
<10> oh just in general, not OOP in PHP or Java etc
<10> any books you suggest vinadelmar?
<8> nope, ask kuja
<10> kuja: any suggestions on books for learning oop?
<11> bullrage: No, I've never learned programming methodologies from books (let alone programming languages)
<11> bullrage: OOP is a simple concept.
<10> ok...
<5> GAH!
<11> bullrage: You have an object, and object has methods. Methods are functions that are called on an object that tell the object to do something. A method is a message, the message is delivered to the object. For example, $car = new Car(); $car->startEngine(); // Here we're telling the car to start its engine.
<8> that's a short intro
<11> It's the most relative.
<11> Singleton and friends are more irrelevant.
<8> after, you go on design patterns and there you get totally screwed up
<10> ok, i understand that..
<10> it's putting it into practice ill struggle with :)
<11> bullrage: Objects also contain properties. A property is like a variable, except the object holds it. For example, $car->fuel = 100; // Here we're setting the car's fuel.
<8> the main idea behind the design patterns is that there is no spoon
<11> Just like methods are functions called on an object, properties are variables kept in an object.
<11> bullrage: That's really as simple as PHP's OO model gets.
<10> ok i understand that so far
<11> Other languages may get a bit more complex and pure with OOP.
<8> like... VB
<16> or ruby
<2> o.O
<17> kuja: what about visibility
<8> i deserve a kick
<18> Hi. I have a site that uses variables in the URL (site.com?action=AboutUs), and I'm making a Contact page. I want to use the $_POST method, but will it be safe linking to the form handling page, if I use a variable in the URL? Like, the contact page would be ?action=Contact, and the form handling page would be ?Action=Submit
<8> no kick?
<2> no kick
<11> schmalls: Visibility isn't important.
<8> it's because you are lazzy to turn into an evil op...
<10> so basically.. if i was to make a polling system, id have methods like.. get_results, post_results, display_poll etc? :s
<19> OO design is all about encapsulating entities into easy-to-understand chunks. rather than having a car abstract data type and a bunch of functions which take pointers to car structs or whatever, you attach the car-manipulating functions to the car data type directly
<11> bullrage: Something like that.
<10> oh, thats not too difficult kuja
<17> kuja: what do you mean not important
<11> $car->changeEngine(new V8Engine());
<11> schmalls: Visibility is not important. That's what I mean.
<11> Python makes a good example of that.


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #php
or
Go to some related logs:

freenode SET SECURE
#debian
#osdev
ubuntu libretto 110 ct
SELECT * WHERE IN
xmms-mad tutorial
pipe prozy
already mounted or /media/hda1 busy
ssh session localization linux
#linux



Home  |  disclaimer  |  contact  |  submit quotes