@# 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 26 27 28 29 30 31 32



Comments:

<0> thanks man
<1> TimJR88: $text = str_replace(">", ">\n", $text);
<2> ty
<3> arpad, richardlynch, Pollita: thanks for help
<4> my php is sending bad headers, what can i do ? :X
<5> use ASP
<4> :S
<4> ASP ****s!
<1> MalMenPT: You'd have to define "bad headers" and then tell us which headers, and then maybe convince us they are bad and then tell me whether you mean just <?php phpinfo();?> or some package within php and...
<1> s/me/us/
<4> http://tracker.elite-project.net/info.php
<1> MalMenPT: And what are the bad headers?
<6> !tell MalMenPT about headers
<4> http://pastebin.com/709774 <- that code not work
<4> all files how i download are corrupt
<4> Accept text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 <- what is that ?



<1> MalMenPT: Open up the files in a text editor, or use "head" on command line in Un*x to see what they start with. If PHP error messages are getiting in there, the files are corrupted by that.
<1> MalMenPT: Content-type: should be application/octet-stream to force a download if you really care about being backwads compatible.
<1> MalMenPT: The content-disposition will not work in very ancient browsers, and you may want to consider making the links to the script end in $nome instead.
<4> not understud, if i download files by php, if i download by ftp the file saty cool
<1> MalMenPT: Read each of my messages above, one by one, and try to do what I asked...
<1> MalMenPT: If a text editor is giving you fits with large files, temporarily comment out the header() and readfile() lines and then reload to see if you have PHP error messages.
<7> can someone tlel me how i place a image link into my image column on mysql from this form upload i got? Cause on another page i have a gd library function that will retrieve thumbnails of the pictures uploaded?
<1> tdd1984: Your best bet is to store JUST the filename, and then leave the URL munging for your output process...
<7> so just have it upload into a folder on my web server, but then have the php gd script on the other page retrieve the image?
<1> tdd1984: upload into a folder, store the filename in the folder, and then, yes, have GD on other page retrieve just the filename, and do whatever with it
<8> richardlynch, so i still have to open all feeds at once?
<7> richardlynch: the thing is i have a login screen where the user has to sign in to upload the image
<7> and i want the ad that they posted with picture to be retrieved in the right ad
<8> err streams that is
<1> zinor: "At once" is a slight mis-nomer. fsockopen(..., $timeout) one after another and put them in an array.
<8> hrm but i have to open them all at one time
<8> like
<8> say i have 4 streams open, they're all doing whatever they do, and i want to open a 5th later
<7> http://indianacl***ifiedads.com/categories/cl***ifieds/foo.php?type=antiques click on testing at the top richardlynch, and you'll see the next page i want the thumbs nail to show up, and be clickable, but from that userid that posted the ad, and images, so it can show images of the product?
<1> zinor: You can always choose, somewhere inside your loop, to do: $open_streams[] = fsockopen(..., $timeout); or similar.
<8> hrm
<8> so basically
<8> im going to have to set everything in advance
<1> zinor: keep $timeout small to avoid sluggish application -- but risk slow servers not 'working'
<8> and then say start :)
<1> zinor: No. You can have a loop doing the stream-select, and within that loop, build up more and more streams to select on.
<8> hrm
<7> richardlynch: i got everything else posting into the db correctly like the userid, and itemid, and when you click on the description of the ad on the page before it just query the user information from what they put into the sign up form
<1> zinor: $open_streams = open_4(); while (count($open_streams)) { stream_select($open_streams); $open_streams[] = open_another(); if (done($open_streams[0])) unset($open_streams[0]));
<8> ya so basically
<8> open 5 streams for example
<8> and just do a while loop
<8> hrm
<1> zinor: This is how the other programs actually do it. There is no magical way to make a computer literally open up 2 streams at one exact time. (Unless you're talking something weird about 2 CPUs and sheer coincidence)
<7> Richardlynch: you there?
<7> ohh oka
<1> tdd1984: yes. Is there a question in all that?...
<8> ill go play w/ this
<1> zinor: My code could be chopped down with a huge chunk totally replaced by one stream_select call, basically. But it's all the same thing.
<8> ya so do you basically
<8> open all the streams
<8> stick the pointers in an array
<8> and do a while on stream select like i see in this comment
<8> and basically while stream select has results the streams are still there and open?
<8> and have data to read
<1> zinor: Yup.
<8> if all streams close
<8> does the stream select fail?
<1> zinor: I'd have to read the docs on that bit. I micro-managed it with my extra 100 lines of code. :-(
<8> hrm, alright well this helps a lot, i think it will work w/o changing my code much :)
<9> HI
<9> help me plz
<7> richardlynch: well my userid, and itemid is inserting into the database, but i need to know what i need to have inserted into the image column
<1> tdd1984: Whatever you used in move_uploaded_file for the second arg should go into the database.
<7> and i'll probaly have the files renamed automatically because i don't want 2 differfent users happen to upload the same file name
<1> tdd1984: or at least some portion of that filename.
<7> k
<7> hold on
<9> can somebody help me



<10> !tell tEhups about g1
<9> !tell xshad about g1
<10> omg
<9> xD
<9> o
<9> k
<9> this is an example of what i need, let's imagine there's a webpage in which every day a notice is published
<9> like news
<9> in somepart of that webpage
<1> zinor: I *think* that when they are all done, the streams have all been moved into $except...
<7> richardlynch: so if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
<7> echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded";
<7> so i need to set that up to go into the database
<7> and set the varialbe under the insert statement
<8> hrm
<9> there's a PHP cmd that get's some text of a web page and prints it on your web
<1> tdd1984: Yes, I would put $target_path into the database, or at least the part of it that changes from upload to upload. If they ALL go into /home/tdd1984/images/ then you really only need the last bit of $target_path
<8> The streams listed in the except array will be watched for high priority exceptional ("out-of-band") data arriving.
<10> tEhups www.php.net/file-get-contents
<1> tEhups: echo file_get_contents("http://php.net";); will let you pretend to be the PHP homepage.
<7> richardlynch: so just put $target_path into the insert query statement
<7> ?
<1> zinor: Sorry. maybe you have to check feof on each of them yourself. I've only been told off for using the hand-coded stupid way instead of the smart way, and never actually fixed my code... :-)
<1> tdd1984: Yup.
<1> With '$target_path' of course.
<8> hrm this will be interesting
<9> richardlynch
<1> zinor: Think of it as "fun" :-)
<7> okay
<9> but how do i ask or get the text i want
<7> richarlync: let me try it
<7> brb
<9> by it's name?
<1> tEhups: http://php.net/substr http://php.net/pcre http://php.net/explode http://php.net/dom ... Depends on your needs and your mood.
<11> ini_set('mind_meld', true);
<1> LOL
<9> yeap
<9> but you don't understand my q
<9> imagine it's http://www.myip.dk/ webpage
<9> i wan't to take the ip from there
<9> and print it on my web (Echo)
<9> how do i write that command
<9> i don't want anything more than doing that
<9> ...
<11> tEhups: patience is a virtue
<11> php.net/gethostbyname
<11> how about asking "I would like to get the IP address of a domain name"
<9> nooo
<9> haha
<1> tEhups: $html = file_get_contents('http://www.myip.dk/'); preg_match('/<title>Your IP: ([^<]*)<\\/title>/',$html, $ip); echo $ip[1];
<9> okk :D :D:D:D:D
<9> thankss!!
<1> tEhups: you could probably get the same info from $_SERVER['REMOTE_ADDR'] though.
<9> no no
<9> that page was just an example
<9> :) i know global var's thanks
<1> Well, then you got an example answer. :-)
<10> lol
<9> ok thx
<9> ([^<]*) ?
<9> :S
<9> what means ([^<]*)
<12> its a regex expression
<12> matches zero or more occurances of any character except <
<1> () means I want to catch this bit. [] means any of these characters. ^ means, not, NOT any of these charactes. < is just < as in the < in </title and * means repeat as many of the NOT < characters. http://php.net/pcre will explain it all, but you're in for some heavy skull sweat.
<12> that's a better explaination >.> lol
<7> richardlynch: its not doing it i tried what you said look at my script to see if im doing it right ? http://pastebin.com/709861
<1> Can you narrow down "not doing it" a bit...?
<7> richardlync: sorry
<13> tdd1984: you're missing a semi-colon
<13> mysql_query($query) or die("Error in query: $query. ". mysql_error())
<13> that needs a ; at the end
<7> k
<7> got it


Name:

Comments:

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






Return to #php
or
Go to some related logs:

#perl
#physics
avicat how to use
smartmontools fc5
#linux
load ibdata1 phpmyadmin
mysql automatic self-join
wmv totem-xine fedora
thewoops.com was moved
#math



Home  |  disclaimer  |  contact  |  submit quotes