@# 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> Left the last place because of trust issues with management.
<1> What are the security considerations to be done when sending a file using user variables? ie: send($idefinebasedir.'/'.$_POST['dir'].'/'.$_POST['filename'])
<0> duanear: Are you talking about using a script to deliver a local file to a client?
<2> How do I ask about a referrer from a site? like if I want a hit counter only to add a hit if its coming from a certain site
<0> Magnus`: $_SERVER['HTTP_REFERER']
<2> so an if then else type thing?
<2> if(referer == digg.com) { add hit code} ?
<2> referer being the code you just gave
<0> Magnus`: Look into using what I gave you in combination with the function parse_url(). You'll figure it out.
<2> thanks
<1> Elazar: yep
<0> duanear: Do you have register_globals disabled?
<2> Elazar, one last question, if the url is.. say "example.com" does the parse url work for all sub links/domains? as in, "example.com/links" and if someone clicks on a link from that subdomain it will still recognize it?
<0> Magnus`: Go read the docs on parse_url() and see what it does for yourself.
<2> I did read them



<0> lig: PHP Life?
<3> Elazar: http://www.phplife.org/strip/
<2> there was one page with very little and one code example
<0> Magnus`: If you want the hit counter to increment only if the domain hasn't referred to your site before, check the domain parse_url() parses from $_SERVER['HTTP_REFERER'].
<0> lig: Heh.
<2> I want it to only COUNT hits that came from a certain site, not people visitng it on their own.. I'll figure it out
<4> But people can change their HTTP_REFERER.
<4> ...Just most don't know how. :)
<1> can a file in linux have a / in the filename? ie: dir/Filename / Stillfilename.ext
<1> ?
<4> You'll have to escape it.
<4> \/blah.
<0> Magnus: freeone3000 does raise a valid point.
<2> Yes, but most people do not know how
<5> lol
<0> duanear: No.
<2> so the code should basically be if(parse_url($_SERVER['HTTP_REFERER']) == $url);
<0> Magnus: OK, I can _tell_ you haven't read the docs.
<0> Magnus: Go read them.
<2> http://www.php.net/manual/en/function.parse-url.php this doc? I have
<0> Magnus: Obviously you haven't, or you wouldn't have to ask me these questions. I'm not vain, but I think you're insulting my intelligence.
<2> Ill re-read em
<2> im sorry
<2> That was obviously not my intent
<0> Magnus: Try pointing to this script you're writing from another page and do a print_r(parse_url($_SERVER['HTTP_REFERER']))
<0> Magnus: The example in the docs isn't great, granted, but try to be resourceful enough to do further discovery on your own. I've saved you the trouble of finding the function on your own.
<2> Yes. thank you
<6> Is there a way I can determine what PHP script is causing high cpu usage?
<7> devicenull: top
<6> windows server
<0> devicenull: CLI or CGI?
<8> MySQL 5, Apache 2.0.55 and PHP 5 are spitting quotes and curly apostrophes and stuff out as funky characters
<8> like A with a caret over it
<8> and euros and trademark symbols
<8> charsets are set to UTF8 everywhere
<8> it was working fine until we upgrade Apache to 2.0.55
<0> webavant: #apache
<8> maybe
<9> anyone here use xjax?
<8> ajax?
<9> xajax
<8> Pat Xajax?
<9> http://www.xajaxproject.org/
<8> Spin the wheel Vanna!
<10> Hi all!
<11> Hi! I want to know if I must specify MAX_FILE_SIZE in a file upload form
<0> werw: No.
<11> Ok thanks!
<8> anyone seen the funky characters I'm talking about though?
<12> if i am looping through $_FILES, how do i get the input type=file name="THISFILENAME" from the $_files array without making it multidimensional?
<13> i'm trying to match new lines with ereg()... how do i do this? i've tried (\r|\n|\r\n) and the like... i'm using it to get rid of the new line character whenever i read a line from a text file
<0> omnipresence: Um... huh? Try calling print_r($_FILES)
<14> Is counting "online visitors" with sessions a matter of using a session ID and then regexping files from /tmp that match the ID?
<12> i guess i cant really explain what im trying to do
<0> Avochelm: 1) Don't use ereg, use preg. 2) Try this: preg_replace("/[\r\n]+$/", "", $string)
<15> kimmoa: most implementations of that just flag the last access time for a visitor by session, then list the number of accesses within the last minute or whatever
<13> ta
<14> Xyphoid: That still requires me to grab the files, doesn't it?
<15> easier to have a DB table, if you're using a DB at all
<14> Naturally I am, but that sounds wastelike.
<9> anyone know which file I have to edit to basically add to the path for apache?



<9> e.g. if someone wants "blah.html" from the root directory, I also want apache to search another directory for blah.html
<14> I am already displaying lists of the real members that are online, but for a simple "non member visitors count", it feels like I should count session files. :S
<6> uh
<6> zend optimizer didnt do much to fix the cpu usage :/
<14> Was that their free tool?
<6> yea
<14> I don't even remember what it was supposed to do.
<14> I don't even dare to use eAccelerator...
<6> I'd be happy to figure out where the cpu usage is coming from
<14> Trojans? :/
<14> Be paranoid...
<6> nope
<6> goes away when I stop apache
<6> dont suppose theres any extrenal program to find where its coming from
<16> Guys, how do I enable php to work with apache? When I run my index.php file I just see the code , there's no display at all
<17> i have have <input type="file" name="userfile"> then i have a script that just uses $_FILE['name'], $_FILE[type]....... how do i obtain the "userfile" value?
<18> hello all
<19> thsaintlivn, $_POST['userfile']
<14> rebelfallen: That's covered in the basic installation instructions.
<19> ***uming your form uses method=POST
<16> KimmoA: I know I have tried what it suggests to no avail
<19> rebelfallen, what os?
<14> Did you restart the server?
<16> freebsd 6
<20> What's the proper way to p*** -fPIC to php? Compiling on amd64 and it's telling me to add -fPIC
<4> php -fPIC
<4> Or: ./configure -fPIC
<20> to compile php
<20> hrmm...
<20> oops, I just realized I had left the i386 build/host/target crap in my configure script...
<21> is there a php equivalent of the Perl Mechanize module ?
<21> an automated web browser
<22> hey question im coding a video upload website
<22> whats the best way to store the files?
<22> realtime, or database?
<22> or another :P
<21> hi surfdue
<22> hello
<22> so?
<21> yeah
<23> my php script only writes a 0 to the file
<21> i have an image upload script
<19> if it were me, i'd store the url of the video in a database but the file itself in the filesystem
<21> i have good luck storing all the image inside the database
<21> because it works well with auto-mated replication
<21> i guess the question is how big traffic you expect
<19> xxoxx, replication? why?
<22> fires whats the diffrence?
<21> if the traffic is high and you want automation
<21> i mean replication
<22> i found the database to be better and easier no dir and messes
<22> will the db with with large video files?
<21> then i store the image in mysql, which gets replicated automatically
<21> and each round-robin web server caches its image to disk file
<24> hey how much do PHP Programmers make per hour on average:
<22> xxoxx i forget how to store the file in the db can you link me to some help or code snips?
<21> surfdue just use the blob field type
<22> yes
<22> but i need some example code lol
<22> i totally forget how to upload in php ;)
<19> amit1, i make $15-25 depending on the work, but i have no idea where that is in relation to average, it's just what i feel like asking for
<21> ok
<21> fires $50
<22> but it wont mess up my dbs to do this right?
<19> i get the impression i can usually ask a lot more
<24> 50?
<22> im talking like 25mb videos
<21> surfdue, 25mb....
<22> yes?
<21> i think the better solution would be store it into file, not db
<19> xxoxx, $50 at a job, or freelancing though?
<22> ok xxoxx what functions is the upload?
<24> i know someone who gets 40/hour
<21> i never tried anything above 500k per image (always scaled before storing to db)


Name:

Comments:

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






Return to #php
or
Go to some related logs:

#linux
#web
fedora with colivas
#sql
iwlist scan resource temporarily unavailable
Kz_hideandseek download
phpmyadmin import max_upload_size
validators css behavior url htc
r8169 disagrees about version of symbol struct_module
#fluxbox



Home  |  disclaimer  |  contact  |  submit quotes