#php
29 October 2007
Total 45 pages. You are browsing page 1/45.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
--- Log opened Mon Oct 29 00:00:57 2007
00:11 <****> How do I get the result from openssl_public_encrypt?
00:12 <****> I really need a PHP or MySQL programmer to work with me and a dev team on a big project.
00:12 <****> Thousands of users already, several servers, TLD
00:13 <****> Private torrent tracker, O2 project (if you are familiar with oink.cd or oink.me.uk)
00:14 <****> hi people
00:15 <****> what do i use to get the full address of a page
00:15 <****> Hi guys. I'm creating a simple news app with PHP and MySQL and was wondering whether the 'TimeAdded' field should use Datetime or Timestamp. Any ideas?
00:15 <****> $_SERVER['REQUEST_URI'] gets me the address after the domain
00:15 <****> but i need the full address
00:15 <****> inc the domain
00:16 <****> mattcrane, I had the same problem and had absolutely no joy. In the end, had to hardcode the url
00:19 <****> mattcrane: 'SERVER_NAME'
00:19 <****> is it =. or .=
00:19 <****> .=
00:19 <****> You can add http:// if necessary
00:22 <****> http://www.google.com for example, is a url
00:22 <****> which will take you to a 'web page'
00:23 <****> 'DOCUMENT_ROOT' may help too
00:23 <****> mattcrane: there's no "full address of a page".
00:23 <****> mattcrane: there's the requested host and url
00:23 <****> I've used these in the path to piece together the full URL
00:23 <****> cool thank you
00:24 <****> a question for you. Whic is better to use cookies or sessions
00:24 <****> with regard to users loggin into a site
00:24 <****> im guessing cookies can be disabled by the user whereas sessions cant
00:25 <****> that's like asking, which is better, water or showers
00:25 <****> sessions use cookies
00:25 <****> mattcrane: sessions still rely in cookies
00:25 <****> ah ok
00:25 <****> mattcrane: try $url = "http://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
00:25 <****> For instance.
00:25 <****> hello, does anybody know what's wrong with $pn[ . $x . ] . "." . $qn[ . $x . ]
00:25 <****> never realised that
00:26 <****> mattcrane: the only difference is that sessions store the actual data on the server and just an ID in the cookie
00:26 <****> what would be the correct way of writing it
00:26 <****> ADZ_: $qn[$x], not $qn[.$x.]
00:26 <****> im assuming sessions are more useful if you want to store variables for use while the user is "loggedin"
00:26 <****> cooner750: SERVER_NAME is the configured server name in apache, it does not necessarily coincide with an actual host to which requests may be sent
00:26 <****> carrierBag, ooh ok thanks :)
00:26 <****> "The name of the server host under which the current script is executing. If the script is running on a virtual host, this will be the value defined for that virtual host."
00:27 <****> Is that not where the script would be running?
00:27 <****> in general for a login system on a site would you use cookies to store on the user computer
00:27 <****> mattcrane: yes use those cookies....
00:27 <****> mattcrane: and if cookies are disabled, you can still pass the sessionid via URL
00:32 <****> Is this the correct way to use openssl_public_encrypt ? http://pastebin.ca/753116
00:34 <****> is their something similar to system() or exec() that i can pipe to the stdin of the program?
00:36 <****> i need to call: echo printf("foo") | lua - where lua - pulls everything from stdin
00:36 <****> How can I make functions have optional arguments instead of them having to be mandatory?
00:37 <****> RockerMONO: popen()?
00:37 <****> robinsw: function blah($optional="not supplied", $required){ /* ... */ }
00:37 <****> MikeSeth: ok, thanks
00:37 <****> cooner750: not necessarily
00:37 <****> How is it used?
00:37 <****> robinsw: either function myFunction ($variable = true) or you can have sth. like function myFunction ($params = array()) where you initialize your parameters as you like with isset() eg.
00:37 <****> Thanks, carrierBag :)
00:38 <****> Thanks, Rocker
00:38 <****> sure thing
00:38 <****> cooner750: it is used by the server to determine how to map requests to virtual hosts. In HTTP, a virtual host name is specified separately from the requested path
00:38 <****> Er
00:38 <****> cooner750: in other words, there may be more names than one, and no single name is guaranteed to work on the outside
00:38 <****> I'm talking about the link I just posted
00:39 <****> well too bad for you, it's my bed time ;)
00:39 * MikeSeth ^
00:39 * MikeSeth &
00:39 * MikeSeth & lols
00:39 <****> what does the & sign meen before a var in a function? like: function test($test1, &$test2) { blabla }
00:39 <****> wouterdt: such variables gets passed by reference
00:40 <****> wouterdt: that means, you dont copy/recreate them
00:40 <****> hey all.
00:40 <****> =\ this isn't working, MikeSeth
00:40 <****> i'm sorry, i dont understand
00:40 <****> In my .htaccess file, I want to put the line: Options +FollowSymlinks. But when I do it, I get a 500 error. What does that mean?
00:41 <****> wouterdt, in your example, if you say called test($a, $b);
00:41 <****> and in your test function you set $test2 to a value
00:41 <****> neo2dot0: it means why the hell are you asking this in PHP? :)
00:41 <****> once the function is complete, $b would have that value
00:41 <****> is there an easy way to post with image besides making form?
00:41 <****> Can I use PHP to zip a file before it gets downloaded?
00:42 <****> ok... so if i want to call 'echo printf("test") | lua -' and pass stdin to it, shouldn't $luaResponse=proc_open('echo '.$theParm.' | lua -',0); work?
00:42 <****> RockerMONO: right, I had better ask it in apache, I think! :D
00:42 <****> if not, how do i make the picture submit form with its own individual id?
00:42 <****> neo2dot0: mhm :)
00:42 <****> adamonline45: php.net/zip
00:42 <****> sorry, see you soon!
00:42 <****> Phil4: thnx
00:43 <****> :)
00:44 <****> | lua - and pass it stdin?
00:44 <****> Phil4: Thanks!
00:44 <****> lol
00:45 <****> good night
00:47 <****> so when you do a $r = mysql_fetch_array all the rows are stoed in that one var right?
00:47 <****> MicMac: No, only one row is returned by mysql_fetch_array and stored in $r.
00:48 <****> hello all
00:48 <****> foutrelis: so you must loop?
00:48 <****> MicMac, the internal counter is then incremented so when you do the same again, $r becomes equal to the next row
00:48 <****> MicMac: Yes, you do a while($r = mysql_fetch_array) loop to fetch all rows.
00:48 <****> MicMac: Note that $r is overwritten each time.
00:48 <****> is it good practice to always just pull once, store into array, then pull from array?
00:49 <****> MicMac, yes
Total 45 pages. You are browsing page 1/45.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
