@# 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



Comments:

<0> zircu: from 1 to 10, 257
<1> yep
<1> i mean i like it ruff, but damn
<1> think of a school girl going antimatrix
<2> so she is a concern of yours?
<3> does someone know how i should load a webpage (http://mywebsite/page1.php) in a variable ($mypage) ?
<0> "anti"?
<1> typo
<1> :)
<0> xinul: file_get_contents()
<3> RagingStorm: Thanks i will have a look
<4> evening :)
<3> file_get_contents() load a non interpreted files, how can i have load an interpreted webage into a variable ?
<2> xinul: so http://mywesite/page1.php results with raw php code?
<3> i would like the html output
<3> i'm affaid for my p***word :)



<2> xinul: huh?
<2> what does p***words have to do with the situation?
<3> zircu: as it show my php sources, i find it dangerous
<3> but http://mysite/page1.php doesn't show me anything
<2> xinul: well, you provide a very confusing case
<2> well mysite probably doesn't resolve properly
<2> xinul: define your problem again?
<3> $fichier=file_get_contents('http://localhost/pdf-render/p***wd.php');
<3> echo $fichier;
<3> doesn't show me anything
<3> but the page really exist, i can point on it by firefox
<2> what does http://localhost/pdf-render/p***word.php display in the source of the browswer
<3> the source is :
<3> <?
<3> $p***wd="071280";
<3> echo "you can't see the p***wd";
<3> ?>
<3> (not my real p***wd ;) )
<5> xinul: What is that the p***word to?
<6> xinul: well, then echo $fichier should show "you can't see the p***wd"
<7> how would i rotate the row colors. like i want for one <a href cl***="dark" and for the next one down <a href cl***="light"
<2> xinul: you are really confusing me
<7> http://jezek.gtlvideos.com/
<3> for nothing, just a test
<3> yes and it does in firefox
<7> do i do a for loop and check if the value is odd or even?
<3> but not with file_get_contents
<0> yes
<6> Jezek: yes
<5> Jezek: odd = true; if ($odd) { do_something(); $odd = false; } else { do_something_else(); $odd = true; }
<2> Jezek: what I do is before the loop i define an array like $evenodd('even', 'odd'); and a counter $i =0;
<7> ok
<8> does PHP have a function that will convert 32-bit intgers into 8-bit?
<4> I've got an interesting scenario.. I have a large filesystem, file location is stored on a sql cluster in a table, and there are a few copies of the files for redundancy on different file server clusters... i'm writing php code to go on a 'download' system. one of many that will let people who have access, borws the files, and download. If someone requets a file, it needs ot quickly copy the file from the file server cluster to local
<4> problem is.. it has to begin streaming the file to the user requesting, because the client wont wait very long for the data transfer to start. so it has to stream off of a file thats being written.
<2> Jezek: then in your loop: <a <?php cl***="<?php echo $evenodd[$i++]">foo</a>
<7> oh ok thanks man
<2> errr.. echo $evenodd[$i++%2]
<0> zircu: yay for parse errors \o/
<2> RagingStorm: well i was more concerned with the idea than parsing
<5> xinul: I don't think anybody understands what you're trying to do. You're probably approaching the problem incorrectly. Can you please describe, in broad terms, what you hope to accomplish? Are you connecting to a database or something?
<5> Ukyo: Many download sites approach that problem by redirecting the browser to the appropriate file server. Are you opposed to doing that?
<7> so do i have to put this in a for lop or can i just put it in the while loop that is already there?
<4> CWhiz: problem is, this is for ftp. :)
<3> not at all i simply want to catch the result of the html output of a webpage into an $webpage
<4> I am doing a shamefull thing, and writing an ftp server in php-clu
<4> er cli
<2> Ukyo: so you are trying to implement a cache system type thing as well as send the file to the client at the same time?
<4> yeah
<4> its for a very customer application
<4> and its going to get a _lot_ of use/abuse
<5> xinul: Why?
<4> so it has to be extremely flexable
<2> Ukyo: well, what you can do is open the remote file, open a local cache copy, then in chunks send to user, write to local file
<4> zircu: i dont think ftp clients will take the file in chunks tho :)
<2> Ukyo: oh i missed your ftp comment above
<4> I have to watch myself and stick to the ftp rfc's
<3> CWhiz: for making a pdf transformation
<4> what I am considering
<9> does preg_match_all work cleanly across lines?
<9> like does the whole pattern have to be on the same line?



<4> is having the ftp server, tell the client to expect the file transfer from a diff server ip that has a copy of the file
<5> xinul: Okay, the simplest way would be to generate your PDF using the same data and a different conversion function; if you don't want to do that, check the PHP manual here: http://www.php.net/manual/en/ref.outcontrol.php
<3> CWhiz: ok thanks ;)
<10> mm i want to make an application that i can add "modules" too, but im a bit stumped on how to start
<10> kind of like php nuke, but better
<2> Ukyo: it sounds like you really just want the ftp server to proxy over to the other server, trying to do this in php sound problematic
<5> maskd: Many applications that support plugins tend to have a directory that you drop the plugin file into. The plugin itself would be a cl***, with a defined interface, named the same as the file.
<10> ohh ok
<10> thanks
<4> zircu: i have a few ideas now. thanks to those who msgd
<2> i find it odd that people msg about this stuff... why not voice it here?
<5> maskd: If you want to get fancy (and potentially more efficient), you can consider the different types of plugins that will be installed and figure out ways to prevent the need to include them en m***e.
<5> zircu: People are intimidated by the speed of the scrolling text.
<2> CWhiz: why would they by here then.. might as well join /#me
<10> CWhiz: yeah, ive got a few people that would like websites that all use user authentication, but they would like different things, so i figured i'd create the user auth section, and somehow "add" sections onto it
<5> zircu: Because they need help :)
<7> http://jezek.gtlvideos.com/ yay!
<5> zircu: And many don't realize how painful it can be for the helpers to have to work in a different message window for every user.
<7> thx zircu
<4> how hard would it be to start a thread, open a file handle to start reading in file data, and then write a file at the end without closing the handle, and having another thread read from that file handle at the same time ?
<2> Jezek: wooh... i helped ya? my short term memory is very short tonite
<7> hha yeah. a while ago
<2> Ukyo: sort of diffucult to open a thread
<5> Isn't that what sockets do?
<2> no, a socket opens a communication channel, much like a standard fopen
<11> telnet
<2> instead of reading from a static file, you are reading from a file that can send data all the time
<5> Hmm, I know what a socket is, but I'm thinking that what Ukyo is proposing sounds familiar. Maybe I'm thinking a pipe...
<11> CWhiz you smoke pot from a pipe
<4> LOL
<11> CWhiz haven't you ever heard of pipe dope before?
<11> $5 from any hardware store
<5> Named pipe?
<2> CWhiz: well yeah, but the same concept is still involved, open the source file, read it... open the target file, write to it, send data to client
<11> Hey well if you want to get personal with your pipe and give it a name. you must be smoking some crazy **** man
<2> caching the data is a different story
<4> zircu: what i am looking at doing now
<4> just have the code stream the file from a script on the fileserver, re-direct the stream to the user
<2> i like gl*** pipes
<4> and queue the file for cacheing
<4> or add it to the queue for caching while doing that
<4> its less error prone to redirect a stream, then to write to a file, and read from it while writing to it
<2> Ukyo: i think your making it more difficult
<4> and i wouldnt need threads then
<4> problem is, i don't want users connecting to the file system cluster servers
<4> they need to stay on the private network
<5> The app servers are going to take a beating if they have to proxy all the data from the file servers, though.
<4> not all
<4> just the first time that file is requested
<4> once requested, the system pulls 1 additional copy to cache
<4> and holds it there for 3 - 7 days
<2> Ukyo: so client request file.. you check to see if you have an upto date local copy.. if not then open the remote file, while !eof(of remnote) read remote; write to local; echo to client end while.. record local file so it is in sync with the remote file.
<4> and luckily, the file server cluster is easy to expand. I can quickly toss up another pair of servers a & b copy, and have it re-balance/distribute the file load
<2> if you have an upto date file send localfile
<4> actually
<4> i was thinking if I did it that way
<4> it would be harder
<2> harder than what?
<4> cause the ftp client wont wait for 'write to local'
<4> 350 - 700 gig files
<4> can take a while
<4> even on a gigabit internal network
<5> Did I mention that the file servers should be doing the serving directly? Just saying.
<2> Ukyo: so you have php responding via ftp as well?
<4> thats what this is
<4> ftp server written in php-cli
<4> CWhiz: then i would have to hand 20 - 40 copies of the filesystem cluster
<4> to handle all the requests
<2> CWhiz: i can see cases where the file server shouldnt do it directly... you have 5 webservers feeding data
<4> rather then ftp and web cacheing frontend servers
<4> and when were talking 20TB file server clusters
<4> :P
<5> Here's a question. What's the simplest way to organize multiple copies of files to allow for time-based diffing of them? I have several gigabytes worth of tar.gz files and I don't know whether I should extract them to separate folders, the same folder with a timestamp appended, or ...?
<2> Ukyo: i dont know a better way of caching besides the idea i gave above


Name:

Comments:

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






Return to #php
or
Go to some related logs:

login form vbasic example
ubuntu resident memory
dependencies coputer
ddcxinfo-knoppix amd64
hibarnate tutorial
#debian
supaplex gentoo
#math
php.net reverse ereg
debian mpg123 ALSA: underrun, at least 0ms.



Home  |  disclaimer  |  contact  |  submit quotes