logs archiveIRC Archive / Freenode / #php / 2006 / May / 14 / 1
piera
Ronald: we only help those who use php3
Ronald
itrebal: how to verify?
itrebal
Ronald: its when you created the database i think... i dunno, i havn't used mysql in ages
piera
itrebal: spend too much time on MS Access?
itrebal
piera: lol, i've been using pgsql
piera
itrebal: good cover up
itrebal
(Action) looks around nervously
Ronald
itrebal: using phpmyadmin i was able to insert a field properly (shows right in myadmin). Not getting that field back in utf8 in my own code though.
gannon
Any clue why I can't execute a php cli script in my code? ./script.php -S /tmp/phpRJjyI2 150 Error: 126
         

Ronald
myadmin uses mysqli though i think....
Stormchaser
wrong
itrebal
(Action) doesn't like myadmin
nor do i like pgadmin, but thats a diferent story
Stormchaser
console ALL the way :)
Ronald
yeah it uses mysqli :P
Kwerty
Hi. Could someone tell me what PHP's power operator (or function) is?
Ronald
Stormchaser: you rock, i prefer to think less and use myadmin. Happen to have a solution to fixing my own code, oh console master ?
Stormchaser
pow()
itrebal
Stormchaser: psh! are you kidding me? i have a link on all my websites to a root-access textbox with a script on the other end doing pg_query($_POST['query']);! now *that* is 1337
theDan
I wrote a newsletter script that saves a message to the database, then sends it to each user. It works with a test database, but when I use the real one, it doesn't even save the message to the database.. what should I do (short of suicide)
Stormchaser
(Action) bi**hslaps itrebal
itrebal
lol
Kwerty
thanks, Stormchaser
itrebal
i've gotta go to a fancy schmancy dinner thing....
kiliko
any one knows cvs browser written in php ? :)
Stormchaser
google does
Jezek
i have this function and at the first line i put $ob_start(); and at the end i put $this->dir_display = ob_get_contents();
when i do $jfolder->dir_listing(); it displays something, even though it shouldn't right?
oh i had to add ob_end_clean
Mindtzar
anyone here particularly good with regex for preg_match
[itrebal_fancy]
Mindtzar: many of us, just ask
Mindtzar
can you write one for detecting URLs like http://something.com/page.here
I tried some of my own
no luck :( and then some on the PHP user comments
none seemed to work at all
ereg("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", $crawler, $matches);
this line of code works
however it only retrives the first match it finds and puts it into $matches
thats why I need it to be preg_replace
         

wykis_
:O you're making a crawler
your ip is blacklisted soon
Mindtzar
it's not a spam crawler
that's just the term I used
since it crawls a certain page for URLs
b1n0ry
hey all
Mindtzar
which it then relays back to me
wykis_
:] yeah
that was a joke ;]
Mindtzar
thought it would be kinda for my PHP proxy :\
theDan
anyone here do freelance work
Mindtzar
oh okay
wykis_
Mindtzar: http://php.net/preg_match_all
there's a handul of examples
Mindtzar
thanks :)
wykis_
what you can do is really searhc inside href="" and src=""
[itrebal_fancy]
Mindtzar: look out for javascript and CSS - it will bite you in the ass
Mindtzar: i solved it, but i cannot tell you how (closed source project)
b1n0ry
[itrebal_fancy] hows it going, man?
[itrebal_fancy]
b1n0ry: i have a band banquet thing to go to in about 5 minutes... beyond that, great, you?
b1n0ry
not bad, pretty good actually
[itrebal_fancy]
good, will you be on in a few hours>
b1n0ry: 'cause i gotta go! cya
b1n0ry
possibly, you be back?
have a good one!
[itrebal_fancy]
cya, b1n0ry
Stormchaser
!tell theDan about jobs
ho, b1n0ry
urf... That should be 'hi'
b1n0ry
hey Stormchaser, long time, man
theDan
Stormchaser: alright
Stormchaser
b1n0ry: Where have you been?
ldas
hi, I'm trying to use phpDocumentor and I get this:
Fatal error: Cannot re-assign $this
Stormchaser
!+g10
php-bot
Guideline #10) We don't support script(s). We help you *write* PHP, not recommend or download and install/hack/modify/adapt/use pre-written scripts
b1n0ry
honestly? bought a new house and been busy with projects
ldas
this is the line: $this = &$c;
any idea what's wrong?
b1n0ry
yes, your question
is wrong
Stormchaser
ldas: Yes. It's a very old version of the software.
ldas
so I should use an older version of PHP?
Stormchaser
no ,the never version of the program
ldas
I think it's the latest
let me check
aio
hi..
:)
Stormchaser
woof
ldas
you're right
Stormchaser
b1n0ry: how much for the house?
ldas
it's v1.2.3
aio
i'm problem on "" escaped
b1n0ry
how much did we pay for it?
Stormchaser
hm?
aio
echo ('<tr><td>Responsável</td><td><input class=\"normal\" onBlur=\"this.className='norma';\" onFocus=\"this.className='sele';\" type="text" name="responsavel" style="border:1px solid #000000; width:200px"/></td></tr>');
Stormchaser
b1n0ry: yep
aio
not work
ldas
funny, I've installed it from pear
b1n0ry
just under $150k
Daskies
aio: echo '<tr><td>Responsável</td><td><input class="normal" onBlur="this.className='norma';" onFocus="this.className='sele';" type="text" name="responsavel" style="border:1px solid #000000; width:200px"/></td></tr>';
No '(
* '('
Stormchaser
b1n0ry: That's not _that_ expensive, is it?
aio
Daskiestks, i'm testing
Daskies
And "s don't get escaped when you start with '
b1n0ry
actually, it's pretty good. this is one of the lower cost real estate markets in the country here
Stormchaser
Daskies: yay for parse errors \o/
Daskies
Hmm?
Oh
b1n0ry
150k doesn't get much most places but we got 1658 sq ft, 3 brs, 2.5 bath, 1/4 acre, 2 car garage, full basement
Daskies
*\'norma\'
*\'sele\'
Stormchaser
b1n0ry: nice :)
b1n0ry
yep, needs a little bit of work but not a lot, private cul de sac so that was sweet
aio
Daskies not worl
work*
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in
hehehe
Daskies
Did you get my edits?
[14:36] <Daskies> *\'norma\'
[14:37] <Daskies> *\'sele\'
ljbuesch
ldas: I had that problem. I had to install the beta package
aio
ok
Daskies
You need to escape single quotes
ldas
ljbuesch: that's what I'm doing right now
aio
Daskies work ! :D
vandal
hello
Daskies
As it should
You only need to escape the type ofquote you started with
vandal
if i was using php to run some bash commands, how could i force my script to emulate the user pressing "y"
b1n0ry
ytf am i watching americas next top model?
Daskies
So: echo "I \"like\"";
Or: echo 'I \'like\'';
ljbuesch
Is anybody here familiar with the session_set_save_handlers()?
bujin
why i can use the escape character \n it doesnt work in my script
b1n0ry
bujin can you give an example?
bujin
b1n0ry, http://pastebin.com/715966
b1n0ry
bujin: because you're adding the new line to your "view source" window in IE/FF or whatever
bujin
b1n0ry, new line should appear in a new line right?
b1n0ry
bujin: the \n creates a new line in your html output
Spoom
if you're outputting html you need to use <br />, otherwise, it's \r\n on windows, \n on unix, \r on mac
b1n0ry
bujin: you want to output a <br /> (or <br>) to get the browser to hard line break
bujin
im using \n
Spoom
you could always use nl2br as well
bujin
ok thanks
b1n0ry
bujin: when you use echo("something\nnewline"); you just get the new line in your html outpu
bujin: if you want a break for the render, you have to echo("something<br>newline");
html
ljbuesch
bujin: if you want a \n to make a new line, make sure the HTML is inside of <pre> tags
bujin
oks ljbuesch now i get it
b1n0ry
remember, bujin, that php does not directly create browser output. it creates html source code.
« prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 next »