IRC Networks
Irc Logs Stats
Start date: 2007-09-27 02:48:27
Last update: 2008-10-24 20:19:38
Channels: 41
Logged Lines: 6230436
Size: 1982.49 MB
Powered by
Channel Info
Network: freenodeChannel: #php |
Search in www.irclog.org
Log from #php at freenode 2006-05-18
Pages: 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
30
31
32
33
34
Next >
[00:01]<wygduvv>Kog: curl isnt designed for downloading things?
[00:01]<wygduvv>ho ho i disagree
[00:01]<wygduvv>otherwise FTP wouldnt be one of the main protocols
[00:01]<tml>It's not designed "only for..."
[00:01]<kjr>TML++
[00:01]<tml>wget is pretty much oriented to a single task
[00:02]<wygduvv>this is true
[00:02]<tml>As is pavuk, as another example
[00:02]<wygduvv>but it will also login :)
[00:02]<evzgczzzjff>Thats like saying php is designed for high volume enterprise level security.
[00:02]<wygduvv>pavuk?
[00:02]<wygduvv>lol evan
[00:02]<wygduvv>lmfao
[00:02]<tml>It's like wget on steriod
[00:02]<wljwnzsvumyjs>lol
[00:02]<tml>s/$/s/
[00:02]<zjun>hola
[00:02]<wygduvv>come es tas?
[00:03]<ssnq>english
[00:03]<evzgczzzjff>french.
[00:03]<wljwnzsvumyjs>swedish :P
[00:03]<wygduvv>german
[00:03]<wygduvv>german/american
[00:03]<wljwnzsvumyjs>just got to mexicali subarea
[00:03]<evzgczzzjff>black.
[00:03]<wljwnzsvumyjs>you get a free lesson
[00:03]<wljwnzsvumyjs>lol
[00:03]<evzgczzzjff>I mean african.
[00:03]<tml>EvanCarroll: o.O
[00:03]<zjun>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.
[00:04]<tml>roue: $f = file($url);
[00:04]<zjun>no kidding. :)
[00:04]<evzgczzzjff>roue: Yes you are.
[00:04]<_zzlzm>roue: there's CURLOPT_RETURNTRANSFER to return it, but file() is much simpler if you don't need the advanced stuff in curl
[00:04]<_zzlzm>..and if you have allow_url_fopen on
[00:04]<evzgczzzjff>You should use LWP and HTML::TreeBuilder
[00:04]<zjun>thanks for the help.
[00:07]<hjfdgjrv>unless you need https, I believe
[00:07]<czzfh>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?
[00:09]<hjfdgjrv>CarlH: Yes, you can use auto_prepend_file/auto_append_file for that.
[00:09]<czzfh>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
[00:09]<czzfh>HolyGoat: Is there a way to cause that to ONLY apply to the files in a certain dir ? that may be a it
[00:09]<czzfh>may be it :)
[00:09]<hjfdgjrv>CarlH: And you can set them from e.g. a .htaccess as such, php_value auto_prepend_file "myfile.php"
[00:10]<czzfh>ah...
[00:10]<hjfdgjrv>So, that answers your next question.
[00:10]<czzfh>good mind reading :)
[00:10]<hjfdgjrv>well you said "within a specific directory"
[00:10]<hjfdgjrv>So I was just being accurate.
[00:12]<czzfh>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" ?
[00:13]<hjfdgjrv>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)
[00:13]<czzfh>b sounds great
[00:13]<zzggdzf_lzydg>ok how do i unset the $_SERVER['PHP_AUTH_USER']
[00:14]<zzggdzf_lzydg>is it empty $_SERVER['PHP_AUTH_USER']
[00:14]<hjfdgjrv>unset($_SERVER['PHP_AUTH_USER']);
[00:14]<zzggdzf_lzydg>no shit
[00:14]<zzggdzf_lzydg>?
[00:14]<hjfdgjrv>no shit.
[00:15]<dycnpjj>NO SHIT!
[00:15]<dycnpjj>hoy shit, no shit?
[00:15]<wljwnzsvumyjs>shit, no?
[00:15]<hjfdgjrv>shit no
[00:16]<wljwnzsvumyjs>:P
[00:16]<rrdrdr>there's no issues with compiling in libxml2 into the 4.4.x series, right?
[00:16]<hjfdgjrv>I have never tried that.
[00:16]<wljwnzsvumyjs>don't think so enygma aslong it finds it
[00:16]<zzggdzf_lzydg>HolyGoat, didnt work
[00:16]<zzggdzf_lzydg>hmm
[00:17]<hjfdgjrv>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.
[00:17]<dnznrc_rwrd>hey. how do i specify where to put an uploaded file from a form thing
[00:17]<kjr>HolyGoat: I listened to a nice argument in #apache yesterday about that
[00:17]<hjfdgjrv>grendal_prime: It should set it to nothing.
[00:17]<hjfdgjrv>Kog: About what?
[00:18]<zzggdzf_lzydg>this is php4 that make a diff?
[00:18]<hjfdgjrv>grendal_prime: do var_dump($_SERVER['PHP_AUTH_USER']); after unsetting it, and see what it says.
[00:18]<hjfdgjrv>grendal_prime: No not really.
[00:18]<kjr>HolyGoat: "proper" compilation of PHP
[00:18]<hjfdgjrv>Kog: Ah, what were the arguments?
[00:18]<kjr>HolyGoat: and the nice banter between the AF and ##php about whose fault 2.2 not working with PHP is
[00:18]<ygsyg>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
[00:18]<kjr>HolyGoat: I told the guy I compile PHP all the time - he asked if I had the "proper" way
[00:18]<kjr>HolyGoat: I told him it seems to work on 2.0.58 for me
[00:19]<kjr>HolyGoat: he said the latest 5 doesn't
[00:19]<hjfdgjrv>Kog: We/I still use apache 1.3.*, I'm not very familiar with the issues with 2.*
[00:19]<kjr>HolyGoat: I run php4 and php5 on apache httpd 2.0.5x just fine
[00:19]<wljwnzsvumyjs>2.2 working good here
[00:19]<kjr>HolyGoat: although, 2.2 isn't... well, there you go
[00:20]<kjr>xpowerstudios: what OS and loadout?
[00:20]<zzggdzf_lzydg>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
[00:20]<hjfdgjrv>Kog: Security department at work are way too conservative to run apache 2 :)
[00:20]<drgyrdrg>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) { ?
[00:20]<zzggdzf_lzydg><?
[00:20]<zzggdzf_lzydg>session_start();
[00:20]<zzggdzf_lzydg>unset($_SERVER['PHP_AUTH_USER']);
[00:20]<zzggdzf_lzydg>header('location:index.php');
[00:20]<zzggdzf_lzydg>?>
[00:20]<kjr>HolyGoat: what's wrong with 2 over 1.3?
[00:20]<kjr>HolyGoat: OpenBSD users?
[00:20]<hjfdgjrv>grendal_prime: Do _not_ paste more than 3 lines or I'll have to kick you.







