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



Comments:

<0> TML: Thanks for the link. But I'll just use system() to get it. I'm on shared host and I'm not sure they have the package installed.
<1> MBzle i think go to php.ini you get something like path=bla bla .change the path there
<2> any hints? I don't know where to store and I don't know really how to delete it after a defined time limit
<0> nk_: A session will do without having to consider IP address (if the vote is only for registered user). And why a user can vote more than one time?
<3> yekangi, there's ;include_path = ".;c:\php\includes"
<2> tws: it was just an example. say I have a database and a poll script where anyone can vote. so I have to check the IP address of all the users of the last 15 minutes (or so) to prevent one user to vote one item say 10 times
<4> function graph($arr){ echo implode("+",$arr); }
<4>
<4> graph(array(3,6,1,8,3));
<4> lol
<4> 4 hour problem solved in 5 minutes
<2> tws: if I use a session using another browser should work for the user, shouldn't it!?
<0> nk_: Yes. And for database, store the time in UNIX timestamp. Compare the last vote time to current time. You will probably want to make use of strtotime().
<1> MBzle in php.ini go to include_path
<2> but I also have to compare the IP address
<3> yekangi, ;include_path = ".;c:\php\includes" ?



<1> MBzle yeah, there u add the path for your pear
<0> nk_: Then compare it!
<2> tws: heh. and how or where to store? via mysql in a table? and if so, how to delete those after several minutes?
<2> I never did code anything like this unfortunately and I'm missing some ideas
<3> yekangi, C:\php\PEAR ?
<0> nk_: Create a table, with two fields (ip,time). After the vote, store the time and IP address into the table. To delete it, you might want to put several lines of code to check the time difference of all entries in the tables to current time. Delete those which exceeds 15 (or any as you wish) minutes.
<5> Hey there
<5> Well my phpinfo() shows that i have compiled php with imap enabled, but when i am trying to use imap_open it says that it cant open the stream
<5> any ideas ?
<1> MBzle yeah
<3> yekangi, i did and it worked... but i am competely lost...
<3> i dunno how to deal with database using this package.. :S
<3> yekangi, did you ever do such thing? display 5 items per page and havin thenext button?
<1> MBzle yeah i have done
<3> yekangi, can you show me a sample or help me out please
<1> MBzle i think to use pager you need to require once pager.php and you have to create instance of pager cl***
<6> Hmm, I found a site some time ago (like, more then a year), I belive it was called PHP Golf or something like that. It was contest when you were supposed to do a specific task with as little code as possible.
<6> Anyone know what I'm talking about? :D
<1> MBzle then you need to send the array of data which you got from database to pager
<7> A CHILDCARE centre in Britain is teaching children to sing Baa Baa Rainbow Sheep rather than Baa Baa Black Sheep to avoid causing offence.
<7> oh my.
<8> this is ##php, mazzanet
<7> well done.
<7> nice observation
<9> nevertheless, don't they understand that changing the text is more discriminating then singing about black sheep...
<10> agreed
<8> $racism = "Baa Baa Black Sheep"; $omg = "/Black/"; $quick_fix = "Rainbow"; echo preg_replace ($omg, $quick_fix, $racism);
<7> Gambito: now that's just stupid
<11> stupid http1.1 posts and fsockopens.. why does it take so long before php decides to timeout and close the connection?
<12> hi pagalmansha
<13> hi sahithya__
<12> hi
<14> who is sahithya and who is pagalmansaha?
<12> ok
<12> all are manushyas
<14> do we have any standard frame works for php?
<9> erhmmm
<9> zend coming up?
<14> for developing webapplications?
<14> okay
<9> it's a prerelease tho
<12> yes we have symfony
<9> there are tons of frameworks for php, but none is standard
<14> hmmm
<9> zend aspires to become the standard framework
<12> pagalmansha are you working on php
<13> sahithya__ no
<15> is there any way to have php not try to parse my <?xml as <?php?
<12> then what are you doing in php
<15> are you talking to me
<12> no sorry it is for pagalmansha
<13> sahithya__ what?
<13> sahithya__ where is monday?
<14> its sunday not monday
<16> Bheam: you could use echo '<?xml...'.. or turn off short tag support in php.ini
<17> $data = file_get_contents('index.php?s=vehicle.print.used&ve_id=454'); failed to open stream: Invalid argument in ... how can i get the ?s= part to work? it works with just index.php
<18> use url http://address/index.php?s=vehicle.print.used&ve_id=454
<17> no i cant use URL im afraid
<16> why not?
<17> hmm, or maybe i can
<17> no, then it forgets my sessions



<18> well you can send session through address
<18> e.g. http://address/index.php?s=vehicle.print.used&ve_id=454&PHPSESID=sessionid
<19> hi all how can i get a flash file to prefrom a php script
<17> isnt that a securityrisk?
<19> u talking to me rightnow?
<16> that will only work if session.use_only_cookies is not 1
<17> Smokin, no sorry
<20> Smokin: loadVars, amfphp
<17> niraj, it is Off, but it still doesnt work
<17> i think i have security against that tbh
<19> so loadVars("text/residentdjs.php"); amfphp("text/residentdjs.php"); @ dools?
<20> Smokin: google those two things
<16> rightnow: it's PHPSESSID not PHPSESID
<21> hi guys
<21> i've got a loop for my form so that there are fields called field1, field2, field3 etc
<21> but then how do i call them?
<21> $field$i ??
<16> $_POST['field'.$i]
<21> yay
<16> you can actually use names like field[1], field[2], etc in your forms too
<21> oh really?
<21> i dont know you can use array for column
<16> and php will parse them as arrays, so you can simply use $_POST['field'][$i]
<21> i mean for form
<21> i guess that is much neat
<16> that's usually easier and nicer looking :)
<21> thx miraj
<22> Is there a way for me to do someting equivalent to $page = file_get_contents("http://where.ever/";); , which doesn't discard the cookies that come with the connection, or do I have to hand-roll that from sockets?
<23> StoneCyph, got tired of waiting on efnet?
<22> ^KidUnix^: Doesn't look like anyone's awake in there. I waited 8 minutes.
<24> stonecyph, look into curl
<21> so can i actually do this for loop: $_REQUEST["city[$i]"] = = rawurldecode($_REQUEST["city[$i]"]); ?
<21> is that a right syntax?
<23> StoneCyph, answer is no, btw
<25> Hi guys, I'm using a phpbb framework for a website at the moment and I'm in the middle of overhauling the sessions. Phpbb stores all of it's sessions in a database ... even for pre-login guests. This is the part I think I'm going to ditch. Can someone tell me what the advantages to this are exactly ?
<23> StoneCyph, ummm what exactly are you trying to do
<21> as i have city[0] city[1] etc
<22> capture a web page with its cookies
<24> stonecyph, using the curl functions in php you can get a page and store the resulting cookies in a file
<22> i don't want them in a file
<23> StoneCyph, curl
<22> and when i asked how to redirect that to a variable i got dead silence
<24> stonecyph, don't know about everyone else but i'm doing other things
<24> but anyway, what you probably want is $_COOKIE
<25> leri: I got the curl thing working anyway today ... I don't know what was wrong with it exactly but thanks again :-)
<24> http://us2.php.net/manual/en/language.variables.predefined.php
<22> leri: $_COOKIE isn't populated when you file_get_contents() on a URL
<24> stonecyph, i didn't know, as i don't use php5
<23> StoneCyph, I think in curl there's not a way to do that, but there is a way to save the cookie to a file and read the cookie back into a variable
<22> i don't want to involve the filesystem.
<23> StoneCyph, http://us2.php.net/manual/en/function.curl-setopt.php
<23> StoneCyph, there's a section on there that parses the http headers that are returned and puts the cookie information in a var
<26> i was under the impression that strip_tags('<b>my bold text</b>') will return blank,.. at least that's what i thought to be the behaviour of strip_tags. apparently it now returns 'my bold text'; which what I prefer the value to be.
<23> StoneCyph, http://us2.php.net/manual/en/function.curl-setopt.php#50194
<22> ooh.
<22> that appears to be what i need.
<22> specifically, CURLOPT_RETURNTRANSFER
<23> I think you still need to turn headers on also
<27> I have one large php file. I set a POST-variable with a form and do a check if it is checked like "if (!empty($_POST[foo]) ..." the bad thing is, that the if-block is always executed after the form is sent one time
<27> so I sent the form and if I push RELOAD the if-block is executed again
<27> even if I unset the POST variable at the end of the if block
<27> any hints on what I'm doing wrong?
<28> POST variables come from the client
<28> If the client sends them, PHP populates the array
<13> hi, i was working on linux machine but now am shifted to windows:-( can any one tell me where do i need to create public_html in windows
<28> If you want to prevent people accidentally submitting a form more than once, look into header redirects and/or session variables
<21> if i have a field called field[0] field[1] etc.. how do i retrieve it on the next page using $_REQUEST?
<21> is it $_REQUEST['field[$i]'] ??
<29> $_REQUEST['field' . $i . ']; probably.
<23> zoolander, $_REQUEST['field'][$i]
<29> ^KidUnix^: You're right, my bad.
<21> kidunix's way is more convincing :P
<29> zoolander: Like I said: my bad :P
<23> zoolander, they answered it on efnet already


Name:

Comments:

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






Return to #php
or
Go to some related logs:

#math
zalmander
6.10 sudo dpkg-reconfigure locales
./packages/Ubuntu/ati-packager.sh: line 55: dpkg-architecture: command not found
gaim crashing privacy tab
xv425 api
pythonce spawn
why mysqli
xgridfit
#python



Home  |  disclaimer  |  contact  |  submit quotes