[PHP] php command
is there a command that will allow me to connect to another box and execute commands? for instance, I want to create an automated php script that will connect to a unix box and run a series of commands. I believe that ssh2_exec() and ssh2_shell() are not supported in the 4.3.4 version of php I am running. I thought of exec(); i could telnet in to the box but I didn't know if another exec() statement would pass the aurguments to the original telnet session set up in a previous exec() statement. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Oracle rpm?
Is there an rpm to install the oracle compnents for version 4.3.4 php? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] imagefrompng() question
I'm having difficulty displaying text after imagefrompng(). I'm using PEARS's Image_Barcode to displa a barcode and trying to wrap imagefrompng() around it. I am able to display the barcode properly but not the rest of my document (a mix a text and other images). Is there a proper heading I should use? I been looking over the docs for imagefrompng() and PEAR's Image_Barcode but have not found anything useful to offer a solution to my problem. Any suggestions? thanks in advance. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Finding what links on a page have been clicked
I am trying to find a way to log what links have been clicked and dump the results into a database. Does anyone have any suggestions? thank you in advance -- "Well then what am I supposed to do with all my creative ideas- take a bath and wash myself with them? 'Cause that is what soap is for" (Peter, Family Guy) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Finding what links on a page have been clicked
Unfortunately I do not have access to those logs. Richard Davey wrote: Hello, Wednesday, June 29, 2005, 1:11:51 PM, you wrote: DAG> I am trying to find a way to log what links have been clicked and DAG> dump the results into a database. Couldn't you parse this information out of your site log files? I mean, why duplicate what is already being done. Best regards, Richard Davey -- D. Aaron Germ Scarborough Library, Shepherd University (304) 876-5423 "Well then what am I supposed to do with all my creative ideas- take a bath and wash myself with them? 'Cause that is what soap is for" (Peter, Family Guy) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] optional argument when creating a function
I'm throwing a warning on a function I created. I thought a & in front of the argument was supposed to make it optional. Is there something else I need to do make that argument optional? //I simplified the code function doEmail($username, &$link) { if (isset($link)) { print "$link $username"; } else { print "$username"; } } doEmail($arg1); doEmail($arg1, $arg2); Here is the error: Warning: Missing argument 2 for doemail() in /srv/www/htdocs/test-a/staff/email_scramble.php on line 24 thanks in advance for any help. -- D. Aaron Germ Scarborough Library, Shepherd University (304) 876-5423 "Well then what am I supposed to do with all my creative ideas- take a bath and wash myself with them? 'Cause that is what soap is for" (Peter, Family Guy) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: optional argument when creating a function
Thank you everyone for your help. I tried this and it worked with throwing any errors. function doEmail($username, $link = null) Matthew Weier O'Phinney wrote: * D A GERM <[EMAIL PROTECTED]>: I'm throwing a warning on a function I created. I thought a & in front of the argument was supposed to make it optional. Is there something else I need to do make that argument optional? As others have noted, the ampersand tells the function to grab a reference to the variable passed. There are two ways to do optional arguments: 1) Set a default value for the argument (must be last argument in the list, or else all other arguments in the list must also have default values): function doEmail($username, $link = null) {} function doEmail($username, $link = null, $linkName = '') {} 2) Parse the argument list via the func_* functions: function doEmail($username) { $argCount = func_num_args(); if (1 < $argCount) { // Retrieve second argument, from a 0-based array: $link = func_get_arg(1); } ... } function doEmail($username) { $argCount = func_num_args(); if (1 < $argCount) { // Retrieve all arguments $args = func_get_args(); // Remove $username from it array_shift($args); // Get $link: $link = array_shift($args); } ... } -- D. Aaron Germ Scarborough Library, Shepherd University (304) 876-5423 "Well then what am I supposed to do with all my creative ideas- take a bath and wash myself with them? 'Cause that is what soap is for" (Peter, Family Guy) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] incrementing in a for loop
this worked for me: [CODE] for ($myLoop = 0; $myLoop < 100; $myLoop= $myLoop + 5) { print "my loop: $myLoop"; } [/CODE] Peppy wrote: I've searched online and am unable to find how to increment by more than one in a for loop. for ($i = 1; $i <= 6; $i++) { Is it possible to increment $i by 5? Thanks. -- D. Aaron Germ Scarborough Library, Shepherd University (304) 876-5423 "Well then what am I supposed to do with all my creative ideas- take a bath and wash myself with them? 'Cause that is what soap is for" (Peter, Family Guy) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] html forms in php
Here's some javascript I use for such instances: [CODE] if (myForm.hidWhich.value == "delete") { var verify = prompt("You are about to delete this entry \n" + " \n \n" + "To delete this entry you must type this phrase in the prompt and click OK: \n \n" + "--> KILL ENTRY!"); if (verify == "KILL ENTRY!") { myForm.submit(); return(true); } else { alert("Error: Could not delete entry becuase you either canceled out or entered the wrong phrase! \n " + "Your entry WAS NOT deleted."); return(false); } } [/CODE] The user must click a button to delete the entry. This button calls as function onClick; within that function is the above code. It requires the user to enter an exact phrase. If the exact phrase is not entered, it is returned false and the form never submits. If the correct phrase is entered, it sumbits the form and I remove the entry from Postgresql. So far I have not had any users accidentally delete anything. The only problem is IE does not like the prompt() function -works perfect in FireFox. In IE it doesn't display the text in the prompt window, but if the correct phrase is entered it still works Philippe Reynolds wrote: Good day all, I have a problem for you all.. I have a form that has has the ability to delete a lot of information from my MySQL database. I would like to create a bit of security, in case the user hits the button by accident. I would like to create an additionnal window that would appear that would ask: "Are you sure?" and then a "yes" and "no" buttons to confirm the deletion or to cancel the command. Any thougts?? Thanks for the assistance Phil -- D. Aaron Germ Scarborough Library, Shepherd University (304) 876-5423 "Well then what am I supposed to do with all my creative ideas- take a bath and wash myself with them? 'Cause that is what soap is for" (Peter, Family Guy) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php