logs archiveIRC Archive / Freenode / #php / 2006 / February / 5 / 1
nihil_
i need a hint on where to look for ways of using "functions written in C" in PHP
Stormchaser
nihil_: pecl.php.net
zaemis
nihil_, http://www.php.net/manual/en/internals.php
koosty
how can i get mysql last_insert_id() into a $var
do i have to do a mysql query
nihil_
thank you zaemis; Stormchaser
zaemis
you'rewelcome :)
lig
(Action) starts to get hungry
zaemis
good luck
Stormchaser
(Action) hands chips to lig
         

lig
thanks Stormchaser
chou-chou
quick simple question. How do i combine a variable.. ie i have something as $phoneheader right now, and i want to do like $sect = "phone"; then do $sectheader where its value of variable + header if i just do a . in between that doesnt seem to work.
nihil_
hm.. is there a function that receives "\n\r" terminated TCP messages..
yet? :D
macOnki
nihil_, if it is terminated then I expect it will be with \0
nihil_
well, yeah.. "\n\r" is some other "pseudo standard"
but in the end it all depends on the protocol
lig
(Action) grabs some cereal for breakfast
Stormchaser
um... Ther isd no "\n\r"
*is
!+nl
php-bot
Newlines are hidden (not normally visible) control characters that distinguish the end-of-a-line of text and are different for each platform as follows: [Windows=\r\n] [*nix=\n] [Mac=\r] And can be seen as: [LF (linefeed) = \n, 10d, 0x0A, 0001010b] [CR (carriage return) = \r, 13d, 0x0D, 0001101b]
CHIEF
Im using a bumper redirect script
$url = "http://$url";
the code cant handle the ://
So what can I do to replace it?
Drakas
CHIEF : maybe $url already contains http:// ?
punkstar
Right, I am making a script that will fetch a file from one server and then save it on the server taht the script is operating on. I have noticed that when I use file_get_contents() it takes a long time.. i am guessing this is because it is sending the data to the browser.. that was my only guess.. is there a way to miss the browser our.. and make it faster.. I mean I should get 100mbps download speeds.
CHIEF
it doesnt
punkstar
$url = "http://".$url;
FaerN
need advice. gentoo tells me i need to compile with dba support if i want berkdb. should I use both or none?
Drakas
or $url="http://{$url}";
punkstar
(Action) points at his question =)
Drakas
punkstar how fast is it and how fast do you expect it to be?
punkstar
liek 30 seconds for a flash file.
Drakas
whhaaa
punkstar
which is way too long.
I am right in thinking that it shouldnt be sent to the browser right?
its all on the server.
         

HolyGoat
(Action) curses XSL
Drakas
punkstar upgrade your php
punkstar
im on 5.something
Drakas
punkstar browser shouldnt get anything from the files, should it?
punkstar
I shouldnt think so.
Nothing is outputted.
Bah, let me make the script again.
Stormchaser
punkstar: Um... You have 100M line?
punkstar
On my dedi yah.
Drakas
hmm punkstar maybe your script takes long time becuase you are in a loop or somehting
punkstar
I'll check it out.
I looovovee making turnkeys =D
Stormchaser
That's about what... max 12M/s which is optimum... But usually it's much less...
punkstar: How big is the file?
punkstar
yeah, but still. ~30s for an average flash game
2-3mb
Just to get this clear, client u/d speed doesnt affect it.. right?
Drakas
that should take around .25 secs
punkstar even if it would, the speed would be below 1sec.
punkstar is the line in use a lot?
:)
Stormchaser
punkstar: Um... Wrong?
punkstar
Lol, no it isnt.
Stormchaser: ?
HolyGoat
whoever designed xsl was an idealistic dumbass
Stormchaser
punkstar: if that dedicated 100M isn't affected, then you have 100M PLUS thespeed with which the client downloads...
punkstar
OOhh sweet.. just remember.. another driving lesson tomorrow. w00! Get off the damn roads.
Stormchaser
HolyGoat: Heh... I was never fond of XML-related stuff :)
HolyGoat
Stormchaser: Well XML in itself is fine I guess. And the concept of XSL is fine as well, its spec sucks very bad though.
Stormchaser
lol
HolyGoat
I have a book that states that "programmers are too busy to write XSL", meaning, "it's so simple, other people could do it". Big mistake.
It's harder than 3gl programming.
absentia
(Action) gts 6MB/sec download. ... ... at my colo. :-) I was spoiled in nyc with > 600KB/sec with my cable modem.. here in florida, I can't get much more than 200 with my dsl and 300 with my cable modem, but the cable drops to like 40KB during peak hours.
punkstar
My line can only support 512k, so I am stuck with ~50kpbs
kbps
absentia
KB
Stormchaser
HolyGoat: 3gl? you mean OpenGL?
HolyGoat
no, a 3rd generation language
Stormchaser
which is?
punkstar
php, ruby, vb
come on man, i do this in school.
lig
higher langs
Stormchaser
ah
punkstar
1st = Machine Code (Binary), 2nd = ASM, 3rd = Everything Else
Stormchaser
I never went to programming school, so I wouldn't know that :)
HolyGoat
http://en.wikipedia.org/wiki/3rd_Generation_Language
punkstar
3rd could mean C++.. but we're not onto 4th are we?
Isnt the PHP compiler written in C?
Pollita
Don't forget 4gl languages
Judge
Hi all... how do I check if the first char of a string is a # withouse using regular expression?
Stormchaser
punkstar: Um... php doesn't have 'compiler'... Just 'interpreter...
Pollita
Judge: if ($str{0} == '#')
Stormchaser
Delphi is a language?!?!? Since when???
punkstar
Thats what I meant.. dude. thats what I said in my head :-S
Pollita
Stormchaser: Only among those who embrace blasphemy
Stormchaser
lol
Judge
Pollita in this case the string is $split_it[1].. so it'd be $split_it[1]{0} ?
Pollita
Sure
Judge
thanks very much
Stormchaser
Judge: Keep in mind {} will be kicked out in PHP6... So use [] instead...
punkstar
hmm.. 4th and 5th. Never heard of them before. Though we did discuss objective based programming.. which seems pretty sweet.
Stormchaser
Pollita
Stormchaser: Another blasphemy
Judge
Stormchaser in php6 it'll be $split_it[1][0] ? but what happens if split_it was a vetor
Stormchaser
Pollita: You can't win them all :)
Pollita
Judge: Then it'll access the first element of the vector
Judge
Stormchaser I mean.. with a single value on position [1][0]
umm
Pollita
Judge: BTW, $split_it[1][0] will work now too
Judge
and the usefull {} will be lost
ah ok
thanks guys.. good noght all
Pollita
It's always worked, right along-side {}
Doesn't make it "right" though
Judge
=]
Pollita
(Action) chuckles at f4ng's signout message
great adaptation of that quote
Stormchaser
Pollita: At least it's PCRE :)
lith
thats a pretty versitile hammer though ;)
Stormchaser
lol
lith
omg i'm about to pop a frickin forehead vane... some how apache is tapping into ether world to pull out a non-existant httpd.conf file to setup apache-ssl!!!
I've renamed every httpd.conf file on my system to avoid confusion, but its still showing up... If ever... in my time being an adult i've wanted to throw a temper tantrum its right now... I need a beer
lig
(Action) notes she needs to put back down her bad habits
Jymmm
lig I am not a bad habit
lig
men are the worst kind Jymmm
Jymmm
lig Same goes for the female of the species
lig
Amen to that
Drakas
i am stuck with 800kbps :D
on an 8Mbit line
jiggy|laptop
thats almost what i have!
Judge
how do I remove the first char of an string?
I'm trying to create my irc bot.. but irc server always send data prefixed with an :
Stormchaser
Judge: $str[0] = '';
Judge
i need to remove the collon
Humm
tks
lig
Judge, php.net/substr
Judge
=]
BigE
(Action) looks in
Judge
tks
=]
Stormchaser
(Action) looks out
jiggy|laptop
ltrim($str,':'); :P
Jymmm
(Action) moons BigE
Stormchaser
o.O
lith
hehe storms got fans ;)
jiggy|laptop
multitude of ways to remove a colon
surgery is sometimes needed
lith
jiggy: lol you stole my joke !
jiggy|laptop
lol
lith
usually though, you just need a good ol' cleaning
jiggy|laptop
sorry
« prev 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 next »