logs archiveIRC Archive / Freenode / #php / 2006 / May / 18 / 1
winmutt
Kog: curl isnt designed for downloading things?
ho ho i disagree
otherwise FTP wouldnt be one of the main protocols
TML
It's not designed "only for..."
Kog
TML++
TML
wget is pretty much oriented to a single task
winmutt
(Action) argues semantics
this is true
TML
As is pavuk, as another example
winmutt
but it will also login :)
EvanCarroll
Thats like saying php is designed for high volume enterprise level security.
winmutt
pavuk?
lol evan
lmfao
         

TML
It's like wget on steriod
xpowerstudios
lol
TML
s/$/s/
roue
hola
winmutt
come es tas?
sse2
english
EvanCarroll
french.
winmutt
(Action) speaks spanglish with an american accent
xpowerstudios
swedish :P
winmutt
german
german/american
xpowerstudios
just got to mexicali subarea
EvanCarroll
black.
xpowerstudios
you get a free lesson
lol
EvanCarroll
I mean african.
TML
EvanCarroll: o.O
roue
I'm trying to grab a url, take the contents and dump it into an array (each line a new element in that array). I thought that curl_* functions would be the way to go but it's dumping the results to stdout (not what I need). Am I going about this the wrong way? thanks.
TML
roue: $f = file($url);
roue
no kidding. :)
EvanCarroll
roue: Yes you are.
_arpad
roue: there's CURLOPT_RETURNTRANSFER to return it, but file() is much simpler if you don't need the advanced stuff in curl
..and if you have allow_url_fopen on
         

EvanCarroll
You should use LWP and HTML::TreeBuilder
roue
thanks for the help.
HolyGoat
unless you need https, I believe
CarlH
Anyone here know a way that you can cause any .php that loads within a specific directory, to output its contents *within* a pre-set html template?
HolyGoat
CarlH: Yes, you can use auto_prepend_file/auto_append_file for that.
CarlH
Ok for example, I go download a forum script --- that has no capability to change templates etc, and it has its own template. Now, I have a template for my site (specific header, footer, sides, etc) -- and I want to cause the forum to load *within* that look and feel. I could use an iframe, but then I get two scroll bars, so I am trying something a bit more complex --- mainly to cause the .PHP echo'd contents to somehow get stored t
HolyGoat: Is there a way to cause that to ONLY apply to the files in a certain dir ? that may be a it
may be it :)
HolyGoat
CarlH: And you can set them from e.g. a .htaccess as such, php_value auto_prepend_file "myfile.php"
CarlH
ah...
HolyGoat
So, that answers your next question.
CarlH
good mind reading :)
HolyGoat
well you said "within a specific directory"
So I was just being accurate.
CarlH
HolyGoat: Seems there is one problem with that, if the php script in question does cookies/headers/etc -- then it wont work since the prepend-file will effectively negate that. Any way to say inside the prepend file something along the lines of "Wait for headers to be sent" ?
HolyGoat
CarlH: You could a) use output buffering b) set variables holding the content, which you spit out after other HTTP headers (such as cookie headers)
CarlH
b sounds great
grendal_prime
ok how do i unset the $_SERVER['PHP_AUTH_USER']
is it empty $_SERVER['PHP_AUTH_USER']
HolyGoat
unset($_SERVER['PHP_AUTH_USER']);
grendal_prime
no sh*t
?
HolyGoat
no sh*t.
mikefoo
NO SHIT!
hoy sh*t, no sh*t?
xpowerstudios
sh*t, no?
HolyGoat
sh*t no
xpowerstudios
:P
enygma
there's no issues with compiling in libxml2 into the 4.4.x series, right?
HolyGoat
I have never tried that.
xpowerstudios
don't think so enygma aslong it finds it
grendal_prime
HolyGoat, didnt work
hmm
HolyGoat
I stopped compiling 4 after 4.3.*, it was 5 from then on :) And now I don't get to compile PHP on our production machines.
Dereck_away
hey. how do i specify where to put an uploaded file from a form thing
Kog
HolyGoat: I listened to a nice argument in #apache yesterday about that
HolyGoat
grendal_prime: It should set it to nothing.
Kog: About what?
grendal_prime
this is php4 that make a diff?
HolyGoat
grendal_prime: do var_dump($_SERVER['PHP_AUTH_USER']); after unsetting it, and see what it says.
grendal_prime: No not really.
Kog
HolyGoat: "proper" compilation of PHP
HolyGoat
Kog: Ah, what were the arguments?
Kog
HolyGoat: and the nice banter between the AF and ##php about whose fault 2.2 not working with PHP is
insin
Dereck_away: your PHP config determines where the uploaded file will go and you use the move_uploaded_file function to move it to wherever you want
Kog
HolyGoat: I told the guy I compile PHP all the time - he asked if I had the "proper" way
HolyGoat: I told him it seems to work on 2.0.58 for me
HolyGoat: he said the latest 5 doesn't
HolyGoat
Kog: We/I still use apache 1.3.*, I'm not very familiar with the issues with 2.*
Kog
HolyGoat: I run php4 and php5 on apache httpd 2.0.5x just fine
xpowerstudios
2.2 working good here
Kog
HolyGoat: although, 2.2 isn't... well, there you go
xpowerstudios: what OS and loadout?
grendal_prime
well i dont need to vardump it becasue the page that gets loaded next echos it to the top..sooo it still shows the user auth
HolyGoat
Kog: Security department at work are way too conservative to run apache 2 :)
Maniaman
I am using getimagesize() to get the size and type of an image. I have an array atthe top of my script that defines the valid image types and gives them extensions. How would I check that the type returned by getimagesize() is in the array? Is it just as simple as if ($image_type in $valid_types) { ?
grendal_prime
<?
session_start();
unset($_SERVER['PHP_AUTH_USER']);
header('location:index.php');
?>
Kog
HolyGoat: what's wrong with 2 over 1.3?
HolyGoat: OpenBSD users?
HolyGoat
grendal_prime: Do _not_ paste more than 3 lines or I'll have to kick you.
xpowerstudios
debian linux, php 5.x asfc
Kog
xpowerstudios: wow, a debian user building something new? I'm bout to die of surprise ;)
HolyGoat
Kog: Nothing I guess. No, they're all running debian. But they run a heavily patched apache 1.
xpowerstudios
:P
grendal_prime
oops
HolyGoat
grendal_prime: And you're expecting $_SERVER['PHP_AUTH_USER'] to be unset on index.php?
Kog
HolyGoat: usually it's the OpenBSD guys
grendal_prime
sorry
Kog
HolyGoat: or people who are convinced 2 lacks a proper module
grendal_prime
well if i unset it...its a global type varriale isnt it?
i mean...
HolyGoat
Kog: We have our own package server in the network, the security guys patch software all the time, we hardly ever run "original" debian packages.
Kog
HolyGoat: I was talking to xpowerstudios
grendal_prime
what i want to do is clear the varriable out so it then promts the user to log back into the site
HolyGoat
ah
xpowerstudios
HolyGoat: its getting outdated too often though so i don't blame them
grendal_prime
sorry about the past thing
piera
hi all.. quick question.. if i have a client that wants a chat software installed .. does it need to connect to an irc server per se?
Jy
piera, no
piera
Jy: thank you :)
HolyGoat
grendal_prime: If you do HTTP authentication like that, the browser will keep sending those headers untill you close the browser.
piera: Not really. There are some cool php/ajax chat thingies out there nowadays, too, although you'll have to google for those
grendal_prime: If you want logout functionality, it's much easier to just use PHP's session mechanism.
piera
HolyGoat: the site is done in flash.. and this particular retard of a client wants chat on his site.
HolyGoat
piera: Well you could use Flash's sockets perhaps.
grendal_prime
ok got a quick on on how to do that?
HolyGoat
grendal_prime: Google for php session tutorial.
It's pretty simple once you're into it.
grendal_prime
kewl thanks
piera
HolyGoat: beyond my capabilities.. i'd just install phpopenchat and be done with it
Kog
grendal_prime: just make sure that session_start is always the first header sending thing in the document
HolyGoat
There you go. Is phpopenchat xmlhttprequest based?
Kog
grendal_prime: I usually put it as the very first line in anything... if there's a line before <?php session_start() ?> it'll start rendering HTML and give a header error
grendal_prime
ya Kog that is in there..
Jax
gahhh i will evil fpdf
HolyGoat
Hehe. My first blog post in 5 months. That's very bad.
TML
What?
evil is a verb now?
piera
HolyGoat: bope i don't know what your talkikng about hahaha cause Im not php mind oriented.
Jax
didn't bush introduce that one? ;)
HolyGoat
TML: Yes it's apparently like "to hex" (Beavis & Butthead)
"I will hex you"
Jax
it's not possible to make pages with different sizes >;/
HolyGoat
piera: xmlhttprequest is the object usually used for ajax applications
piera: Make sure that you're not running a high performance website if you're using a "polling chat system" (like phpopenchat is, apparently)
(or, well, don't use such a chat system in a high performance situation ;))
caffinated
HolyGoat: pfft, xmlhttprequest ... KNOW how hot that refreshing iframe is! :D
piera
HolyGoat: im just confused
HolyGoat
caffinated: Hehe refreshing iframe
Jax
it's seriously about time you start using flash
« 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 next »