[PHP] ZEND_DEBUG
Hello All, Is there a way to turn ZEND_DEBUG on or off without recompiling? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Excel
I was looking for a way to build a spreadsheet (Excel) dynamically with data from a table, and I was curious about doing it in PHP .. I prefer to use PHP, but I know in ASP it can be done. If I'm running PHP on Linux (can't use the COM functions), is there a way this can be done? Preferably starting with something like header("application/ms-excel...") or whatever the mime is - dunno off the top of my head, and just writing data? If there's no way to do this directly is it possible that by starting with this header and then sending a csv (comma separated) text page that excel will read it as a spreadsheet? Any help would be appreciated.. -Ron - [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] All URL's calling one script
You can try to set the 404 error page to that ... I don't know how safe that is, but it might work.. -Ron ""Simon Kimber"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi All > > This is possibly more of an apache/linux question... does anyone know a way > to force ANY url to run ONE PHP script on a virtual server... eg. the same > script is run if a user goes to www.myserver.co.uk or > www.myserver.co.uk/dfkgjdfl/ or www.myserver.co.uk/hello.htm or WHATEVER!!! > :o) > > Cheers > > Simon Kimber > Funny.co.uk - The Comedy Portal > http://www.funny.co.uk/ > > Now Incorporating: The UK Live Comedy Directory > FREE promotion for UK Comedy Acts and Venues > http://www.funny.co.uk/uklive/ > > eml. [EMAIL PROTECTED] > icq. 16156911 > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Forms
This is the first time that I have tried to conquer a form in PHP(which I obviously am not doing) so that I can have a total PHP script page and move away from HTML. Here is my code as followed by my book (PHP Black Book) some variables have been changed "radio", "question" => "What section is this Trouble Ticket being opened for?", "list" => $group); function form($page, $question) { $text = ""; while(list($group, $v) = each($question)) { if(strlen($text)) {$text .= "";} $function = "form_" . $v["type"]; $text .= $function($name. $v); } return("" . $text . "" . ""); } function form_radio($group, $parameters) { $output = ""; while(list($k, $v) = each($parameters["list"])) { if(strlen($output)) { $output .= ""; } $output .= "http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Seek server hardware recommendation
All you really need is something quite basic A Pentium II 450 would work with about 256mb RAM recommend 384 or 512. The Hard drive size is really up to you and the amount of info you are going to store on your site. You sound like you could easily get away with a 10GB HD. Is this going to be for your office, home(internet site (hobby)). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Comparrison
How would I compare to variables where I would want one variable to equal only part or some of the other variable? Here is the code Any suggestions -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Opening up a generic text file
I want to open up a generic text file from the same server that my www is on. $file= fopen("The full URL/finance/daily.txt","r"); $rf=fread($file,100); $new=substr ($rf,0); fclose($file); echo ("$new"); ?> I keep on getting errors...any suggestions on how I can do this??? Warning: fopen("**", "r") - Invalid argument in *:\*\*\daily.php on line 4 Warning: Supplied argument is not a valid File-Handle resource in *:\*\*\daily.php on line 5 Warning: Supplied argument is not a valid File-Handle resource in *:\*\*\daily.php on line 7 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Opening up a generic text file
Figured it out on a windows platform you have implicitly specify the path "c:\ "Ron" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I want to open up a generic text file from the same server that my www is > on. > > $file= fopen("The full URL/finance/daily.txt","r"); > $rf=fread($file,100); > $new=substr ($rf,0); > fclose($file); > echo ("$new"); > ?> > > I keep on getting errors...any suggestions on how I can do this??? > > Warning: fopen("**", "r") - Invalid argument in > *:\*\*\daily.php on line 4 > > Warning: Supplied argument is not a valid File-Handle resource in > *:\*\*\daily.php on line 5 > > Warning: Supplied argument is not a valid File-Handle resource in > *:\*\*\daily.php on line 7 > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] a CNN headline news grabber
Does anyone know of a CNN headline news grabber. I found one, but it returns a blank page everytime. Or does anybody have a grabber that I can customize??? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Source Code for the CNN Grabber
This is the source, which is to advanced for me to debug!!! Waiting on their responce and maybe they can help me.Anybody have any clues http://www.w3matter.com ## # Released under the GNU # Please keep this copyright # notice intact. ## #- Spider CNN for latest headlines #- Fetch the page and remove newlines $page = @join("",file("http://www.cnn.com/";)); $page = str_replace("\n","",$page); #- Grab the latest news segment from the page if(preg_match("/OTHER TOP NEWS(.*?)\/other news/",$page,$match)) { #- Grep each headline and it's URL if(preg_match_all('/(.*?)<\/a>/',$match[1],$matches)) { $out = "Today's CNN Headlines"; $out .= "\n"; $out .= "\n"; $num = count($matches[1]); for($x=0;$x<$num;$x++) { $url = "http://www.cnn.com".$matches[1][$x]; $title = $matches[2][$x]; $out .= " $title\n"; } $out .= "\n"; $out .= "\n"; echo $out; } } ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Source Code for the CNN Grabber
Sorry meant to reply to my previous postAll it does is return a blank page! "Ron" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > This is the source, which is to advanced for me to debug!!! > Waiting on their responce and maybe they can help me.Anybody have any > clues > > ## > # spider_cnn.php > # > # Copyright W3matter.com LLC > # http://www.w3matter.com > ## > # Released under the GNU > # Please keep this copyright > # notice intact. > ## > > > #- Spider CNN for latest headlines > > #- Fetch the page and remove newlines > $page = @join("",file("http://www.cnn.com/";)); > $page = str_replace("\n","",$page); > > #- Grab the latest news segment from the page > if(preg_match("/OTHER TOP NEWS(.*?)\/other news/",$page,$match)) > { > #- Grep each headline and it's URL > if(preg_match_all('/(.*?)<\/a>/',$match[1],$matches)) > { > $out = "Today's CNN Headlines"; > $out .= "\n"; > $out .= "\n"; > > $num = count($matches[1]); > for($x=0;$x<$num;$x++) > { > $url = "http://www.cnn.com".$matches[1][$x]; > $title = $matches[2][$x]; > $out .= " $title\n"; > } > > $out .= "\n"; > $out .= "\n"; > > echo $out; > > } > } > > ?> > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: no reload
Yes - my problem *was* on the server side, and not on the client. I don't know what the problem was, but the files were in a soft linked folder. I moved them to my apache docroot and it solved the problem. Thanx, Ron Gal wrote: Yes, they do control the browsers cache. You can use the Mozilla "Live HTTP Headers" extension to see what do you send/recieve. Check http://livehttpheaders.mozdev.org Very good tool. Cheers, Gal Ron wrote: Thanx, but... don't the headers control the browser's caching? Gal wrote: add the following headers. Important: Make sure they are located in your script before you print to the browser !!! // always modified header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // HTTP/1.1 header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); // HTTP/1.0 header("Pragma: no-cache"); ?> Cheers, Gal Ron wrote: Hi, In working locally (Linux, Apache/2.0.49, PHP4.3.4) I can not reload the scipt pages. When I hit the reload button, the same page is displayed. I tried to use another browser - and it seems the page is cached on the server side. Any clue how to disable that? Cheers, Ron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Extremely slow cURL curl_exec execution/response with 5.4.13
When upgrading from 5.4.12 to 5.4.13, cURL curl_exec calls are taking something like 700ms to complete. (Even to a file on the same server.) If I replace php_curl.dll library with the version from 5.4.12 all works as expected. Anyone else having issues or have suggestions as to how to debug/proceed? PHP 5.4.13 on Apache 2.4.4 on Windows Server 2008 R2 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] test
test -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] **** Converting dynamic webpages into static HTML pages
I have an interesting challenge. I have built an online product catalog that is driven entirely by the contents of the product database (MySQL). The entire catalog is implemented in a single PHP script (catalog.php). The dynamic nature of this implementation allows the catalog script to generate hundreds of product description pages. Now, my client has requested that I give him the ability to generate a static version of the catalog so that he can burn it onto a CD for distribution at trade shows. He wants the CD to be a snapshot of the catalog. Furthermore, he wants to be able to generate this "snapshot" frequently so that pricing info on the CD will be current. To accommodate this, the process for generating the snapshot must be easy and intuitive. My plan of attack is to generate static HTML files by running the catalog script once for each product in the database. Here is my quandary; instead of echoing the output to a buffer for Apache to send off to the client, I need the script to output to a file. I do not want to write a second version of catalog.php that writes everything to file. There must be an easier way to do this. Is there a way I can access the output buffer that Apache sends to the client? Any other ideas? Thanks, Ron
RE: [PHP] **** Converting dynamic webpages into static HTML pages
Thank you! This is just what I was looking for. I was not aware of the output control functions. Using the ob_ functions will make this child's play. Thanks again, Ron -Original Message- From: Michael Hazelden [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 27, 2002 12:29 PM To: Ron Stagg Subject: RE: [PHP] Converting dynamic webpages into static HTML pages While this does involve the creation of a second script - it's only a small change: do an Ob_start at the beginning of the script ... Then use ob_get_contents to output to a file at the end ... Two or three commands (including the fopen) which you'd have to add ... How's that? Michael. -Original Message- From: Ron Stagg [mailto:[EMAIL PROTECTED]] Sent: 27 November 2002 19:19 To: [EMAIL PROTECTED] Subject: [PHP] Converting dynamic webpages into static HTML pages I have an interesting challenge. I have built an online product catalog that is driven entirely by the contents of the product database (MySQL). The entire catalog is implemented in a single PHP script (catalog.php). The dynamic nature of this implementation allows the catalog script to generate hundreds of product description pages. Now, my client has requested that I give him the ability to generate a static version of the catalog so that he can burn it onto a CD for distribution at trade shows. He wants the CD to be a snapshot of the catalog. Furthermore, he wants to be able to generate this "snapshot" frequently so that pricing info on the CD will be current. To accommodate this, the process for generating the snapshot must be easy and intuitive. My plan of attack is to generate static HTML files by running the catalog script once for each product in the database. Here is my quandary; instead of echoing the output to a buffer for Apache to send off to the client, I need the script to output to a file. I do not want to write a second version of catalog.php that writes everything to file. There must be an easier way to do this. Is there a way I can access the output buffer that Apache sends to the client? Any other ideas? Thanks, Ron _ This message has been checked for all known viruses by the MessageLabs Virus Control Centre. This message has been checked for all known viruses by the MessageLabs Virus Control Centre. * Notice: This email is confidential and may contain copyright material of Ocado Limited (the "Company"). Opinions and views expressed in this message may not necessarily reflect the opinions and views of the Company. If you are not the intended recipient, please notify us immediately and delete all copies of this message. Please note that it is your responsibility to scan this message for viruses. Company reg. no. 3875000. Swallowdale Lane, Hemel Hempstead HP2 7PY * -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Variable Undefined, even when global?
I'm getting a "Variable Undefined" error, even tho phpinfo() shows me that globals are set to ON. I've done massive searches on the web to find a solution, but I'm totally missing it. Help? (I've bolded where the Variable Undefined is occuring --- where <<$whatglass = $lkColor[$i]->glass;>> is written.) Here's the code: ==code start= code = $code; $this->name = $name; $this->glass = $glass; } } // $lkColor = array(dbColors($code,$name,$glass)); $lkColor[0] = new dbColors; $lkColor[0]->dbColors("Z651","Red","9"); $lkColor[1] = new dbColors; $lkColor[1]->dbColors("R3","Cranberry","8,9"); //rest are clipped define("test", count($lkColor)); // global test = count($lkColor); function ColorCollection($lkID){ $whatX = $lkID + 1; // Adding 1 turns makes the index correspond to the template number. // $aColLen = count($lkColor); //.length $aColLen = test; //sizeof($lkColor); //.length echo "xxx\n"; //first option is blank // KeepGoing: //PHP does not have a line-label statement. Set up a trigger for($i=0;$i<$aColLen;$i++){ $trigger = false; $whatglass = $lkColor[$i]->glass; //shouldn't $lkColor[any-number] be global??? <<<<<<<<<<< // collect/build the option //if $lkID = egg or ornament (template numbers 8 or 9) if($whatX == 8 || $whatX == 9){ // if yes to either if($whatX == 8){ $pos = strpos($whatglass,"8"); if($pos === true){ echo "code}\">{$lkColor[$i]->name}\n"; //continue KeepGoing; $trigger=true; continue; } } if($whatX == 9){ $pos = strpos($whatglass,"9"); if($pos === true){ echo "code . "\">" . $lkColor[$i]->name . "\n"; //continue KeepGoing; $trigger=true; continue; } } }else{ if($trigger == false){ echo "code . "\">" . $lkColor[$i]->name . "\n"; continue; } } //EndIf either 8 or 9 } // FOR colors loop } // end function ?> ==code end== I'm calling the function this way: How can $lkColor[$i]->glass not be global? -ron [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Variable Undefined, even when global?
You are a god among men, Ernest. THANK YOU! -ron "Ernest E Vogelsinger" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > At 01:28 09.03.2003, Ron Biggs said: > [snip] > >function ColorCollection($lkID){ > > > > $whatX = $lkID + 1; // Adding 1 turns makes the index correspond to the > >template number. > > > >// $aColLen = count($lkColor); //.length > > $aColLen = test; //sizeof($lkColor); //.length > > > > echo "xxx\n"; //first option is blank > > > >// KeepGoing: //PHP does not have a line-label statement. Set up a trigger > > for($i=0;$i<$aColLen;$i++){ > > $trigger = false; > > $whatglass = $lkColor[$i]->glass; //shouldn't $lkColor[any-number] be > >global??? <<<<<<<<<<< > [snip] > > Yes it _is_ global, but within the function you need to declare if global > to have access to it, if you miss this you're referencing a local variable, > which is not defined... > > function ColorCollection($lkID){ > > global $lkColor; // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< > > $whatX = $lkID + 1; // Adding 1 turns makes the index correspond to the > template number. > // $aColLen = count($lkColor); //.length > $aColLen = test; //sizeof($lkColor); //.length > echo "xxx\n"; //first option is blank > // KeepGoing: //PHP does not have a line-label statement. Set up a trigger > for($i=0;$i<$aColLen;$i++){ > $trigger = false; > $whatglass = $lkColor[$i]->glass; //shouldn't $lkColor[any-number] be > global??? > > > > -- >>O Ernest E. Vogelsinger >(\)ICQ #13394035 > ^ http://www.vogelsinger.at/ > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] New mailing list
http://betterphp.org The Better PHP mailing list is available for anyone who wants to learn how to write secure, efficient web applications. We focus on the LAMP (Linux-Apache-MySQL-PHP) platform but welcome other questions. This list is intended for people who use PHP, and who want feedback on code style, security, and other more advanced PHP topics. Please note: this list is moderated. Anything you can find in standard documentation will not be forwarded to the list, as we are trying to keep the discussion about style, not syntax. Everyone is welcome to join and learn, the goal is to get programmers thinking about security. -- Ron Clark System Administrator/Web Coordinator Armstrong Atlantic State University 11935 Abercorn Street Savannah, Ga 31419 Phone: 912 961 3234 Fax: 912 927 5353 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP url variables
Try: parse_str( $_SERVER['QUERY_STRING']); "Stephen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi > > I have just installed PHP 4 and Apache 2 but when I pass a variable in a url > eg ?id=1 > I can't get the variable value by $id, I have to use $_GET['id'] or > $_POST['id'] > > Is there a setting I need to change to allow me to use the $id? If there is > it will save a lot of additional coding. > > Thanks, > > Stephen > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Multiple DB Inits
I am using MySQL via PEAR:DB like this (these statements are executed for each SQL statement):: $dbc = DB::connect( $dsn ); $cmd = strtoupper(strtok( $str, " " )); if ( $cmd == "SELECT" || $cmd == "SHOW" ) $aRows = ( $queryparms == "" ) ? $dbc->getAll( $str ) : $dbc->getAll( $str, $queryparms ); else if ( $queryparms == "" ) $dbc->query( $str ); else $dbc->query( $str, $queryparms ); Everything works just fine. However, if I do, e.g., 4 UPDATES in a row, the above statements are executed 4 times and my MySQL log looks like this: 030316 16:30:002812 Connect [EMAIL PROTECTED] on 2812 Init DB VSG_TLI 2812 Init DB VSG_TLI 2812 Query UPDATE vsg SET VSGSegmentNumber=0,VSGSlideNumber=0,VSGSlideFileName='',VSGQNumber=0 WHERE VSGCode="VT1" 2812 Init DB VSG_TLI 2812 Init DB VSG_TLI 2812 Query UPDATE user SET UserIsJoined=0, UserIsDone=0, UserCurrentSG=UserAssignedSG WHERE UserVSGID = 14 2812 Init DB VSG_TLI 2812 Init DB VSG_TLI 2812 Query UPDATE qcontrol SET QCPreviousHigh=QCHigh, QCHigh=0 WHERE QCVSGID = 14 2812 Init DB VSG_TLI 2812 Init DB VSG_TLI 2812 Query UPDATE sgstatus SET SGCurrentUser='' WHERE SGVSGCode='VT1' 2812 Quit Aren't those double Init DBs an indication of a problem?. I am not using persistent connections because I'm not clear on what they do. All of my users would be using the same DSN, so it seems to me that they'd all be using the same connection, which doesn't seem like a hot idea. For that matter, all the log lines say 2812, so does that mean these in fact all used the same connection? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Validating two variables
if ($user!='monganl') is what I have this is what I want to do if ($user!='monganl' or 'wilsonma') what would be the proper format for this! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Using a drop down box with an udetermined field amount
What I want to do: Have a person input information about individuals into a database. One of the fields in the database will be Unit. On a form one of my drop down menu's will be Unit. I would like to have the PHP page poll the Unit field in the database and send all the different Unit results to the drop down box. Unit: This would be an example of the information that would be an entered H Co H Co B Co A Co K Co This should be the results H Co B Co A Co K Co Any help would be appreciated! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Carrying a variable
I am using PHP 4.3.0 The way that I usually carry variables from one page to another is $Unit = ($_GET['Unit']); This is the page that is referencing it! "; $DBName = "SIGO"; $table1 = "sigo"; include 'drop.php'; $db = mysql_connect("$DBhost","$DBuser","$DBpass") or die("Problem connecting"); mysql_select_db("$DBName") or die("Problem selecting database"); $query = "SELECT distinct (Unit) FROM $table1"; $result = mysql_query($query) or die ("Query failed"); //let's get the number of rows in our result so we can use it in a for loop $numofrows = mysql_num_rows($result); echo ""; echo ""; echo ""; for($i = 0; $i < $numofrows; $i++) { $row = mysql_fetch_array($result); //get a row from our result set echo "".$row['Unit']."\n"; } echo ""; echo ""; echo ""; echo ""; ?> Oviously this isn't working.any clues as to why I can't carry the variable? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Verifying a certain amount of numbers
I would like to know how to verify that there are 6 numbers (only numbers in a field) that will be submitted to a database? Any clues! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] NON-PHP question (I-frames)
Do we have any I-frame experts for IE. I am trying to use multiple I-frames in Internet Explorer. When two of them are applied they both lose their positon attributes. Any clues? #floatframe {position:absolute; left: 40px; top: 40px; width: 30px; height: 225px; z-index: 100; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Bringing href up in a different page
This is my current code. I am trying to have this come up in a different page. Help please! ".$row['ID']." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Using href as a submit for a form
I am using a form to submit to mysql. What I would like to do is to use a link to submit the form instead of the standard submit button. Help is appreicated. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Need to use META tag with variable attached
This is what I have What I would like is for this to carry a variable with it. I have tried several different variations and they don't work obviously Does someone have an idea for this? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Need to use META tag with variable attached
Got it echo";" ?> "Ron Allen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > This is what I have > > > What I would like is for this to carry a variable with it. I have tried > several different variations and they don't work obviously > > URL=./ticket_admin.php?ID=".'$ID." '> Does someone have an idea for this? > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Print help
What I would like to do is to make an optional page that can print information to a specified printer. Can PHP do this? If so how??? Please help!!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Mail or Authentication or redirection of SMTP
Here is my problem. When I send emails locally theough the Exchange Server I have no problems sending mail. When I try to send emails to another site through the MTA funtion_mail pops up. One of two things came to mind. First is that we have anonymous forwarding of emails turned off for security, meaning that I need to login to the Exchange server in order to send emails. Or the second part as I have seen on so many PHP sites is that I need a valid email address to send from. My question on the valid email address is if it has to be the primary or can it be the secondary address for an Exchange account? I created a secondary address and it still does not work, but it was only about 5 minutes ago so it may not have replicated as of yet. Any clues on what to do? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Mail or Authentication or redirection of SMTP
Do I need to login into the server for this? "Ron Allen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Here is my problem. When I send emails locally theough the Exchange Server > I have no problems sending mail. When I try to send emails to another site > through the MTA funtion_mail pops up. One of two things came to mind. > First is that we have anonymous forwarding of emails turned off for > security, meaning that I need to login to the Exchange server in order to > send emails. Or the second part as I have seen on so many PHP sites is that > I need a valid email address to send from. My question on the valid email > address is if it has to be the primary or can it be the secondary address > for an Exchange account? I created a secondary address and it still does > not work, but it was only about 5 minutes ago so it may not have replicated > as of yet. Any clues on what to do? > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Mail Authentication or redirection of SMTP server
Here is my problem. When I send emails locally theough the Exchange Server I have no problems sending mail. When I try to send emails to another site through the MTA funtion_mail pops up. One of two things came to mind. First is that we have anonymous forwarding of emails turned off for security, meaning that I need to login to the Exchange server in order to send emails. Or the second part as I have seen on so many PHP sites is that I need a valid email address to send from. My question on the valid email address is if it has to be the primary or can it be the secondary address for an Exchange account? I created a secondary address and it still does not work. Any clues on what to do? Do I need to login into the server for this? Please Help me on this! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] LDAP_connect()
Everytime I try to run this function it says that it is an undefined function LDAP_connection -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: parse_str()
I think you mean: $example_string = '?action=kick&item=me'; "Jose" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] I might be wrong here, but with the code below I would expect $_GET to be filled and the script to output the next line: // expected output: // // array(2) { ["action"]=> string(4) "kick" ["item"]=> string(2) "me" } // Is my assumption wrong? What would be the workaround? Thanks, Jose -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Redirect
I believe you can also prevent the header error by using ob_start(); "Jean-Louis Letortorec" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > To work around that "headers already sent" problem, I use: > > if ($condition == true) { echo > "location.href=('http://...');"; } > > That works great all the time (unless the javascript has been disabled at > the browser side, but usually it's enabled). > > > Jean-Louis > > > > At 15:55 3-4-2003, you wrote: > >Hi, > > > >How would one redirect a user to a different page if a certain > >condition was met? > > > >i.e. > > > >if($condition == true){ > > goTo newPage.php > >} > > if ($condition == true) > { > Header("Location: > "http://www.sense.nl/index.php?module=ContentExpress&func=display&ceid=15";); > } > > take care that your script does not create any output before this,because > then you will get an error (headers already sent) > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Installation problem
I'm currently attempting to upgrade to the latest version of php. When I run: ./configure --with-apxs2=/usr/local/apache2/bin/apxs \ --with-mysql=/usr/local I get the following message: Cannot find header files under /usr/local Why is this? ron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] REGEX Question
I need to match text between two html comment tags. I'm using: preg_match("/(.*)/", $data, $Match) Which work fine until I have carriage returns. The following doesn't match: Nullam auctor pellentesque sem. Aenean semper. Aenean magna justo, rutrum et, consequat a, vehicula non, arcu. Mauris cursus vulputate pede. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Appreciate you help. ====== Ron Dyck Webbtech.net == -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Why Can't I get this to work
Hello all, I have a php script that reads a flat text file with fields seperated by a space. I explode them into an array just fine, but when I try then to load that array into a mysql database, it doesn't work. Here is my script: for ($i=0; $i<$number_of_alerts; $i++) { // Split each line $line = explode(" ", $ipfwlog[$i]); $line[1] = intval($line[1]); $IPFWsql = "INSERT INTO Firewall_Logs (month, date, time, fw_name, kernel, fw_engine, rule_number, action, protocol, src $results = mysql_query($IPFWsql) or die ("Could not execute query"); } Any ideas why this does not work? I am completely stuck. Thanks in advance, RonC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Why Can't I get this to work
OK, normally I do not respond to my own posts, but I have been shown that I did not get the whole script. So here it is: for ($i=0; $i<$number_of_alerts; $i++) { // Split each line $line = explode(" ", $ipfwlog[$i]); $line[1] = intval($line[1]); $IPFWsql = "INSERT INTO Firewall_Logs (month, date, time, fw_name, kernel, fw_engine, rule_number, action, protocol, src_ip_port, dst_ip_port, direction, via, interface) VALUES ('$line[0]', '$line[1]', '$line[2]', '$line[3]', '$line[4]', '$line[5]', '$line[6]','$line[7]', '$line[8]', '$line[9]', '$line[10]', '$line[11]', '$line[12]')"; $results = mysql_query($IPFWsql) or die ("Could not execute query"); } Again, any help with this issue is appreciated. Thanks, Ron Clark "Ron Clark" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello all, > > I have a php script that reads a flat text file with fields seperated by a > space. I explode them into an array just fine, but when I try then to load > that array into a mysql database, it doesn't work. Here is my script: > > for ($i=0; $i<$number_of_alerts; $i++) { > // Split each line > $line = explode(" ", $ipfwlog[$i]); > > $line[1] = intval($line[1]); > > $IPFWsql = "INSERT INTO Firewall_Logs (month, date, time, fw_name, kernel, > fw_engine, rule_number, action, protocol, src > $results = mysql_query($IPFWsql) or die ("Could not execute query"); > > } > > Any ideas why this does not work? I am completely stuck. > > Thanks in advance, > RonC > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Storing objects in a session
Having trouble storing objects in a session. When I do this: if (!isset($_SESSION['auth'])) { $auth = new Auth(); $_SESSION['auth'] =& $auth; } else { $auth =& $_SESSION['auth']; } I end up getting the following errors when I refresh the page. __PHP_Incomplete_Class Object ( [__PHP_Incomplete_Class_Name] => auth I'm using php-4.2.2. ron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] ************ SSL Support *****************
>From within a PHP script, I need to initiate a secure HTTPS form POST from my Apache server to a separate third party server. I have yet to figure out how to accomplish this. Can PHP even handle something like this? I welcome any advice. Thanks, Ron
[PHP] Email formatting
This is a slightly off topic question. My apologies to any that this may aggravate. Is it safe to assume that email addresses are accepted by all servers case insensitive? So that if I have an email application accepting emails I can safely strtolower($email) the address and be sure that all servers recognize and accept [EMAIL PROTECTED] as they would [EMAIL PROTECTED]? === Ron Dyck WebbTech www.webbtech.net [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Output Buffering issues with 4.1.2
I seem to have some trouble with a script using the output buffering functions on a server running v4.1.2. Everything works fine on the box with 4.2.2. Is this an issue with 4.1.2? === Ron Dyck WebbTech www.webbtech.net [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] passing variable question
Hello all, I have a php script that reads all the files in a directory (pictures), the outputs each picture as a link to be displayed in the main frame of the html page. All of that works fine. I want to be able to "pretty up" the picture out put by placing the picture into a html table so it is centered, add color, etc. But I cannot seem to figure out how to pass the variable from the menu page to the main frame page without using a goofy gray button form. Anyone know how to pass a variable on just a link alone? Thanks, Ronnie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Client IP address
I know this is probably easily solved, but I'm trying to locate the PHP function which returns the client's IP address when they request a page from the server. I'm having no luck searching the php.net function list. Kindest regards, Ron "Yes, they were dinking with the DNS last weekend, and it got out to the internet, then took awhile to 'repair' itself," said my friend. To which I replied, "Well, 'Dinking Happens!'" => -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] XML to PHP help
Hello all, Does anyone have a script, or know where to find a working script to pull backend.php files from a site, parse them into a html type file, and display them correctly? I have been working on one for my site for some time now, and I cannot sem to get it right. I want to see the structure of a working script and compare it to my own. Thanks, Ron Clark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Running CLI from a web page
I have a php cli that creates a file. It works fine when I execute it from the Linux command line as "php foo > bar". I'm trying to also execute this by clicking a form button on a web page via "system('php foo > bar')". I can see that the file bar gets created but it's always empty. I've tried executing "system('php foo')" (directly to STDOUT) but get no output. I've tried "exec('php foo',$output)" but there's nothing in the array when it's done. Suggestions??? BTW, wherever I've written "php" above I've actually used the full path of the php executable. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Running CLI from a web page
There are already plenty of echo statements in foo! They DO show up when I run php foo. It's when I try to use system("php foo") that I don't get anything. "Jay Blanchard" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] [snip] I have a php cli that creates a file. It works fine when I execute it from the Linux command line as "php foo > bar". I'm trying to also execute this by clicking a form button on a web page via "system('php foo > bar')". I can see that the file bar gets created but it's always empty. I've tried executing "system('php foo')" (directly to STDOUT) but get no output. I've tried "exec('php foo',$output)" but there's nothing in the array when it's done. Suggestions??? [/snip] Put something in script foo that will echo out some information echo "foo is running\n"; and then run it from the command line. If that works then run it from your form. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Running CLI from a web page
I have a report that I would like to run as a cron job, hence the need for a standalone CLI version that just reads the database and has no other context. But...I would also like to run this report on demand from within a web application. It seemed "obvious" that all I'd have to do was execute my command line via the system/exec/passthru type of function. I can't see how I would use eval() here, since in the command line: "php foo", foo is a file. A possibility here, however, is to use "include foo". The only reason I didn't want to do that is because then the code in foo might conflict with the context surrounding the include. I was hoping for a simpler solution, but I might be able to isolate the include in a function. "Chris Shiflett" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > --- Ron Rudman <[EMAIL PROTECTED]> wrote: > > There are already plenty of echo statements in foo! They DO show up > > when I run php foo. It's when I try to use system("php foo") that I > > don't get anything. > > I missed the original question, but why are you trying to use the PHP CLI > from within PHP itself? Can you perhaps use eval() instead? > > http://www.php.net/eval > > Hope that helps. > > Chris > > = > My Blog > http://shiflett.org/ > HTTP Developer's Handbook > http://httphandbook.org/ > RAMP Training Courses > http://www.nyphp.org/ramp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] resizing images
I have been using the tools from ImageMagick (convert) to create thumb nails of pictures upload to our site. Once you have the uploaded file just: if (exec('convert -w 100x100 ... src_file dest_file')) { error } I hope this helps. Dale Frohman wrote: > Does anyone know of a way to resize images as they are being uploaded? > Would you write these images to a mysql database or straight to a file on > the server? The pictures will be small < 100k > > Thanks > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Return Image for PHP Link
I'm not 100% sure this works, but maybe try something like this: If that doesn't work, you can always have the php generate the entire tag    $image = "myimagefile.gif"; // What ever you need    print ""; ?> Hope this helps :-) "Karl J. Stubsjoen" wrote: Hello, I'd like the source of an image tag to point to PHP code. I'd like that PHP code to generate an image (accordingly) and print/output the results back to the calling image. So: Where, myphpcode.php returns a valid image. I've done this before, but it is not fresh in my brain. Any help would be appreciated! Karl -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- 209 Media Ron Wills <[EMAIL PROTECTED]> Programmer  -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] convert GIF to JPEG with PHP
I've been doing some similar with images. I've been executing ImageMagick utils from php. You could do it as follows: if (exec("convert image.gif image.jpeg")) { some error code } ImageMagick I believe comes with most Linux distributions, but can also be found at www.imagemagick.org I hope this helps you out :-) Student Center wrote: if i have a GIF file, how can i convert this to a JPG file through php? p.s.: ill do anything as long as i dont have to recompile php/apache - noah -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- 209 Media Ron Wills <[EMAIL PROTECTED]> Programmer  -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] while loop and modulus?
"James, Yz" wrote: OK, using this code: echo "\n"; echo "\n"; $photocount = 0; while($row = mysql_fetch_array($result)) { $smallpic = $row['smallpic'];  echo "$smallpic\n";  if (($photocount % 3) == 2) { echo "\n\n";  }  $photocount++; }  This should fill in the remaining cells you need. You might have to tinker with it a bit to fit your code though. Good luck :-) for ($cnt = 0; $cnt < $phonecount % 3; $cnt++)    echo "   echo "\n"; echo ""; ?> And 8 photos in the table, I'm getting this output: sm982438092.gif sm982437452.gif sm982439016.gif sm982529915.gif sm983222652.gif sm983222686.gif sm983222868.gif sm983222919.gif Great, except it's missing an end cell, and after a few hours fiddling about with code last night, I still didn't get any further in working out how I was going to echo a table cell even if data's missing. So, any help would be appreciated. Apologies for what're probably "easy" questions. I slog away at work all day, come back hoping to get something productive done on this, and the ol'brain won't take it. Frustrating, to say the least. James. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- 209 Media Ron Wills <[EMAIL PROTECTED]> Programmer  -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] quoting issues in PHP
I don't believe php uses any type of Perl quoting conventions such as qq. If you do need to use quotes within quotes you can use the '\' to remove the quotes value, such as: $text = "The following text is \"quoted\""; Or if that doesn't work (like adding the return value of a function to a string) you can use the '.' operator to concat your results: $test = "The current directory is :". getcwd(); I hope this helps you out. Good Luck :-) kevin1 wrote: Is there a qq operator like Perl's in PHP? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- 209 Media Ron Wills <[EMAIL PROTECTED]> Programmer  -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Stream Content
If php is reading or generating the numbers, I'd almost say your out of luck. But you might be able to work around this with some JavaScript. If you can have JavaScript read the values and do the math, it can update you totals within a form quite simply:       <br><!-- <p>   // Read and Calculate your totals <p>   document.forms['totals'].total1.value = new_total1; <br>   document.forms['totals'].total2.value = new_total2; <br>//--> <br> Your table might also have to use form field to contain dynamic values also. Not much for php to do but output something like above. I don't know if this is what your looking for, but I hope it helps :-) "Karl J. Stubsjoen" wrote: Does anyone know how to stream information to a browser (without the client having to hit refresh)? What do I need to get started? We want to have 2 numbers we want to display on the browser, we want these numbers to change as the data changes in the table, but done "streaming". * I am coding this in PHP of course : ) * Karl -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- 209 Media Ron Wills <[EMAIL PROTECTED]> Programmer  -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PostgreSQL vs InterBase
I know this isn't one of the databases that you;re inquiring about, but we've been using MySQL (www.mysql.com) and it has been working beautifully. We have an email server with a MySQL db that's about 4 Gigs now a it's still running strong. MySQL is free and might be worth looking into :-) Arnold Gamboa wrote: I hve heard a great deal about InterBase. Please comment on which is better: 1. Speed 2. Data Reliability 3. Compatibility with PHP Thanks for your comments. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- 209 Media Ron Wills <[EMAIL PROTECTED]> Programmer  -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Identifying input type="file"
I need to identify the particular name of a file upload type field: The elements are generated dynamically and I don't know the specific name of the field beforehand and of course need to read it before processing the form. Using $HTTP_POST_VARS does not seem to recognize this type of input field. Is there another method? I do have the form as: and I can catch all the other form elements without a problem. thanks, ron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Fw: [PHP] Identifying input type="file"
> > I need to identify the particular name of a file upload type field: > type='file' name='image1'> > > > > when a file is uploaded it creates an array in the $HTTP_POST_VARS array, > called $HTTP_POST_FILES. If you have track_vars enabled, you can access the > name of the uploaded file on the local filesystem in the example given with > the variable $image1_name. So if you uploaded a file named "myGif.gif" using > the file select field shown above, this: > Because of the nature of the form I don't know the name of the form element. But I was able to identify it through $HTTP_POST_FILES. Thanks ron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Help!
trying to unsubscribe... > Have you tried the regular unsubscribe address? > > To unsubscribe, e-mail: [EMAIL PROTECTED] Yes, lots of times. Nothing happens. > And if that doesn't work, contact the administrators: > > To contact the list administrators, e-mail: > > [EMAIL PROTECTED] Frequently. They ignore me. > - Original Message - > From: "Ron Pitts" <[EMAIL PROTECTED]> > To: "Kath" <[EMAIL PROTECTED]> > Sent: Monday, May 14, 2001 5:29 PM > Subject: Help! > > > > I have been trying to escape the flood of mail from this site for > > weeks, and nothing works. No matter what I do, I keep getting all > > this mail that I don't want. Is there any secret way to unsubscribe > > that really works? Ron Pitts Caravela Books 134 Goodburlet Road > > Henrietta, NY 14467 http://caravelabooks.com > Ron Pitts Caravela Books 134 Goodburlet Road Henrietta, NY 14467 http://caravelabooks.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Help!
> Could you setup the email to autodelete? I know you can do it in > Outlook Express. Yes, but I don't see the point of downloading 100 messages every day just to delete them. the people running this list should not be wasting internet resources like this. They should just let people out of the list when they want to go. > - Original Message ----- > From: "Ron Pitts" <[EMAIL PROTECTED]> > To: "Kath" <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Monday, May 14, 2001 9:48 PM > Subject: Re: Help! > > > > trying to unsubscribe... > > > > > Have you tried the regular unsubscribe address? > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > Yes, lots of times. Nothing happens. > > > > > And if that doesn't work, contact the administrators: > > > > To contact the list administrators, e-mail: > > > > [EMAIL PROTECTED] > > > > Frequently. They ignore me. > > > > > - Original Message - > > > From: "Ron Pitts" <[EMAIL PROTECTED]> > > > To: "Kath" <[EMAIL PROTECTED]> > > > Sent: Monday, May 14, 2001 5:29 PM > > > Subject: Help! > > > > > > > > > > I have been trying to escape the flood of mail from this site > > > > for weeks, and nothing works. No matter what I do, I keep > > > > getting all this mail that I don't want. Is there any secret way > > > > to unsubscribe that really works? Ron Pitts Caravela Books 134 > > > > Goodburlet Road Henrietta, NY 14467 http://caravelabooks.com > > > > > > > > > Ron Pitts > > Caravela Books > > 134 Goodburlet Road > > Henrietta, NY 14467 http://caravelabooks.com > Ron Pitts Caravela Books 134 Goodburlet Road Henrietta, NY 14467 http://caravelabooks.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] How Do I Escape from This List???
Mens Rules For Women 1.If you think you are fat, you probably are. Do not ask us. 2. Learn to work the toilet seat; if it's up, put it down. 3. Do not cut your hair. Ever. 4. Sometimes, we are not thinking about you. Live with it. 5. Get rid of your cat. 6. Sunday = Sports. 7. Anything you wear is fine. Really. 8. You have enough clothes. 9. You have too many shoes. 10. Crying is blackmail. 11. Ask for what you want. Subtle hints do not work. 12. Mark anniversaries on a calendar. 13. Yes, peeing standing up is more difficult than peeing from point blank range. We are bound to miss sometimes. 14. "Yes" and "no" are perfectly acceptable answers. 15. A headache that lasts for 17 months is a problem. See a doctor. 16. Anything we said 6 or 8 months ago is inadmissible in an argument. 17. If you do not dress like the Victoria's Secret girls, do not expect us to act like soap opera guys. 18. If something we said could be interpreted two ways, and one of the ways makes you sad and angry, we meant the other one. 19. Let us ogle. If we do not look at other women, how can we know how pretty you are? 20. Do not rub the lamp if you do not want the genie to come out. 21. You can either ask us to do something OR tell us how you want it done, not both. 22. Christopher Columbus did not need directions, and neither do we. Ron Pitts Caravela Books 134 Goodburlet Road Henrietta, NY 14467 http://caravelabooks.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] HOW DO I UNSUBSCRIBE? NOTHING WORKS!
INSTRUCTIONS FOR GIVING YOUR CAT A PILL 1) Pick cat up and cradle it in the crook of your left arm as if holding a baby. Position right forefinger and thumb on either side of cat's mouth and gently apply pressure to cheeks while holding pill in right hand. As cat opens mouth pop pill into mouth. allow cat to close mouth and swallow. 2) Retrieve pill from floor and cat from behind sofa. Cradle cat in left arm and repeat process. 3) Retrieve cat from bedroom, and throw soggy pill away. 4) Take new pill from foil wrap, cradle cat in left arm holding rear paws tightly with left hand. Force jaws open and push pill to back of mouth with right fore-finger. Hold mouth shut for a count of ten. 5) Retrieve pill from goldfish bowl and cat from top of wardrobe. Call spouse from garden. 6) Kneel on floor with cat wedged firmly between knees, hold front and rear paws. Ignore low growls emitted by cat. Get spouse to hold head firmly with one hand while forcing wooden ruler into mouth. Drop pill down ruler and rub cat's throat vigorously. 7) Retrieve cat from curtain rail, get another pill from foil wrap. Make note to buy new ruler and repair curtains. Carefully sweep shattered Doulton figures from hearth and set to one side for gluing later. 8) Wrap cat in large towel and get spouse to lie on cat with head just visible from below armpit. Put pill in end of drinking straw, force mouth open with pencil and blow down drinking straw. 9) Check label to make sure pill not harmful to humans, drink glass of water to take taste away. Apply band-aid to spouse's forearm and remove blood from carpet with cold water and soap. 10) Retrieve cat from neighbor's shed. Get another pill. Place cat in cupboard and close door onto neck to leave head showing. Force mouth open with dessert spoon. Flick pill down throat with elastic band. 11) Fetch screwdriver from garage and put door back on hinges. Apply cold compress to cheek and check records for date of last tetanus jab. Throw Tee-shirt away and fetch new one from bedroom. 12) Ring fire brigade to retrieve cat from tree across the road. Apologize to neighbor who crashed into fence while swerving to avoid cat. Take last pill from foil-wrap. 13) Tie cats front paws to rear paws with garden twine and bind tightly to leg of dining table, find heavy duty pruning gloves from shed, force cat's mouth open with small spanner. Push pill into mouth followed by large piece of fillet steak. Hold head vertically and pour 1/2 pint of water down throat to wash pill down. 14) Get spouse to drive you to the emergency room, sit quietly while doctor stitches fingers and forearm and removes pill remnants from right eye. Call at furniture shop on way home to order new table. Ron Pitts Caravela Books 134 Goodburlet Road Henrietta, NY 14467 http://caravelabooks.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] php 4.1.1 and imap/ssl
I've installed php 4.1.1. with the following configure options: ./configure --prefix=/usr/local/versioned/php-4.1.1 --with-apache=../apache_1.3.19 --with-openssl --with-imap --with-imap-ssl=/usr/local/openssl --with-kerberos --with-gettext --with-xml --with-pgsql=/usr/local/postgresql The following script fails. The symptom is that an imapd process is started, but then nothing ever happens. A corresponding non-ssl script works fine. My imap/ssl installation works fine - I use it all the time. I'm using the following UW imap RPM's: imap-devel-2000c-10 imap-2000-9 I can telnet to port 993 o.k. Any ideas? Or can anyone at least verify that imap-ssl works in php 4.1.1.? -- -Ron- https://www.yellowbank.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: php 4.1.1 and imap/ssl
Ron Peterson wrote: > > I've installed php 4.1.1. with the following configure options: > > ./configure --prefix=/usr/local/versioned/php-4.1.1 > --with-apache=../apache_1.3.19 --with-openssl --with-imap > --with-imap-ssl=/usr/local/openssl --with-kerberos --with-gettext > --with-xml --with-pgsql=/usr/local/postgresql > > The following script fails. > >$mbox = imap_open ("{localhost:993/imap/ssl/novalidate-cert}INBOX", > "username", "password"); > print $mbox . "\n"; > ?> > > The symptom is that an imapd process is started, but then nothing ever > happens. A corresponding non-ssl script works fine. > > My imap/ssl installation works fine - I use it all the time. I'm using > the following UW imap RPM's: > > imap-devel-2000c-10 > imap-2000-9 > > I can telnet to port 993 o.k. > > Any ideas? Or can anyone at least verify that imap-ssl works in php > 4.1.1.? Well, I guess I'll answer my own question. Use the source. Install both OpenSSL and UW Imap from source. Edit the imap Makefile as req'd such that the build process relies on your home brewed OpenSSL installation, not, say, some RPM installation you might have. Also direct php build to use this home baked goodness. Works great. -- -Ron- https://www.yellowbank.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] php-4.1.1 and pspell
I have a problem that I would be thankful if someone could help with. When php-4.1.1 is compiled using pspell-.12.2 and apache-1.3.22 with mod_ssl-2.8.22 apache core dumps when trying to start. Using the same configure options with php-4.0.6 and apache-1.3.22 and mod_ssl-2.8.22 everything works fine. Does anyone know if this is a bug with php-4.1.1. Operating system is solaris-8 on a sun enterprise 450 Thanks in advance, -- Ron Clark System Administrator/Web Coordinator Armstrong Atlantic State University 11935 Abercorn Street Savannah, Ga 31419 Phone: 912 961 3234 Fax: 912 927 5353 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Computer Science and PHP
py wrote: > > Do you guys really think PHP should be in computer science curriculum? > > In my curriculum (in canada) I learned C/C++, Software Design (database > architecture and OO Design), SQL, Unix and Networks (OSI, TCP-IP and HTTP > mainly) > > There was no Perl, Python, PHP, ASP, JSP and even no VB... > I think it's more important to learn Programming than it is to learn PHP. I > know for a fact that some of our > teachers knew about PHP, but still they decide to teach the class in C. And > I happy they did. > > Now if your school has no PHP server, why don't you suggest and offer to > install it? > That's what we did, we made it run on a small machine on Linux first than > with the > help of the university sys admin, we installed it on a Unix server. The sys > admin is > now very happy to do his web stuff in PHP instead of Perl :) > > just my canadien 2 cents... (1.14 cent US ;) ) > py > > At 03:46 AM 1/18/2002 -0200, you wrote: > >Hello, > > > >Francesco Gallarotti wrote: > > > > > > I am a student in a college in NY state. Here we have several servers and > > > dozens of courses on computer science. No server is PHP ready and no course > > > instructor knows anything about PHP. Why do you think this is happening? I > > > really like PHP and I am using it in my personal website to work with some > > > text files and a small database. Why PHP is so not popular in the computer > > > science teaching area? > > Most University CS departments prefer to teach programming using a more structured language with stronger type casting. It is much easier to move from a structured language to a language like perl or PHP than the reverse after graduation. At our university we offer special topics courses that are not on the curriculum when requested by students - courses on PHP perl visual basic. Maybe you should talk to the CS department head about special topic classes or department sponsored user discussion groups. -- Ron Clark System Administrator/Web Coordinator Armstrong Atlantic State University 11935 Abercorn Street Savannah, Ga 31419 Phone: 912 961 3234 Fax: 912 927 5353 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Parse error
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello all, I am getting the following error trin to use the mysql_connect command in a script: Parse error: parse error in /usr/home/rclark/phptest/addrecord.php on line 19 Here is line 19: $connection = mysql_connect("localhost","phpkid","d0wn") or die ("Could not connect to server"); Anyone have any ideas?? I am so stuck and running out of hair to pull out! Thanks in advance, Ron Clark -BEGIN PGP SIGNATURE- Version: PGP 7.1 iQA/AwUBPF7Th0SpEYIqgLQzEQInoACeOGf5f1LhIowxzrkwlbQGbp9Vnj4AoKwA XAnhNaQx7p4TqMbX/BHDc68h =obAs -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Name of file included
I need to access the name of a file included. ie: in index.php I've included various files, among them navigation.inc. Instead of manually typing at the top of everyfile, I'd like to use something like: === Ron Dyck WebbTech www.WebbTech.net [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Newbie Question about PHP / MySQL
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello All: How do I read all of the data from just one column, then develop a count based on those items? I think I start with mysql_fetch_field(), but right there I get stuck. Any ideas to point me in the right direction? Thanks in advance, Ron C. -BEGIN PGP SIGNATURE- Version: PGP 7.1 iQA/AwUBPGQIlESpEYIqgLQzEQIzeQCg/JWV1gTtsr0msG3FyUsLK3oaHL8AoNls m6KXlfmfZPhEIJOdvTX4VBRw =71Ww -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Syntax ???
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello all again, Here is my line in my script: $ynumber = mysql_query("SELECT COUNT(*) FROM responses WHERE response=y"); But it returns a blank or empty. How do I convert this MySQL command to PHP? mysql> SELECT COUNT(*) FROM responses WHERE response="y"; In other words, how do I specify the "y" at the end without messing up PHP? Thanks, RC -BEGIN PGP SIGNATURE- Version: PGP 7.1 iQA/AwUBPGQbIESpEYIqgLQzEQJr4wCeNiIhqHZYloLJWsvNr2ODustuPU0AoPw6 ROvim3yCO9Z9GlyReg6pyMa9 =D1uC -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Using Variable Variables from form values inside a function
Is it possible to use variable variables from form values inside a function. For example when submitting form values, this works fine: foreach($_POST as $key=>$value) { if (empty($$key)) { print "empty value $key"; } } but, this doesn't: function myFunction() { foreach($_POST as $key=>$value) { if (empty($$key)) { print "empty value $key"; } } } Anyone dealt with this? === Ron Dyck WebbTech www.webbtech.net [EMAIL PROTECTED] 905 734-1164 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Using Variable Variables from form values inside a function
> > but, this doesn't: > > > > function myFunction() { > > foreach($_POST as $key=>$value) { > > > > if (empty($$key)) { > > print "empty value $key"; > > } > > > > } > > } > > Since php variable scope is local unless you define it global, that won't > work that way. You might try (just guessing here): > function myFunction() { >foreach($_POST as $key=>$value) { >global $$key; >if (empty($$key)) { > print "empty value $key"; > } >} > } That did it. I assumed that since $_POST was global, the key/value pair would be. Guess not :-| Thanks! ron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Determine the difference between two dates
If I have two variables of time both in the format of "Y-m-j J:i:s" How would I go about and get the difference? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Determine the difference between two dates
If I wanted to represent it in the format of Days,Hours,Minutes,Seconds how would that work "Danny Shepherd" <[EMAIL PROTECTED]> wrote in message 020e01c1e7a1$70098eb0$0200a8c0@dannys">news:020e01c1e7a1$70098eb0$0200a8c0@dannys... > Firstly, I assume you mean "Y-m-j H:i:s" for the date format. > > To get the difference between 2 time strings : > > > // orginal time strings > $firstTime="2002-04-19 13:49:00"; > $lastTime="2002-04-19 14:00:00"; > > // convert to unix timestamps > $firstTime=strtotime($firstTime); > $lastTime=strtotime($lastTime); > > // perform subtraction to get the difference (in seconds) between times > $timeDiff=$lastTime-$firstTime; > > //echo out the difference > printf ("Difference is %d seconds",$timeDiff); > > ?> > > HTH > > Danny. > > - Original Message - > From: "Ron Allen" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Friday, April 19, 2002 1:08 PM > Subject: [PHP] Determine the difference between two dates > > > > If I have two variables of time both in the format of "Y-m-j J:i:s" > > How would I go about and get the difference? > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Determine the difference between two dates
How is this going to give the overall time in difference... For instance A circuit went down at 17:30:45 it came back up at 18:37:49 what is the difference in time between the 2 in the format Days XX Hours XX Minutes XX Seconds XX "Danny Shepherd" <[EMAIL PROTECTED]> wrote in message 027601c1e7a9$fbe6f0f0$0200a8c0@dannys">news:027601c1e7a9$fbe6f0f0$0200a8c0@dannys... > use the date() command (http://www.php.net/date) - using $timeDiff as the > datestamp. > > HTH > > Danny > > - Original Message - > From: "Ron Allen" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Friday, April 19, 2002 2:56 PM > Subject: Re: [PHP] Determine the difference between two dates > > > > If I wanted to represent it in the format of Days,Hours,Minutes,Seconds > how > > would that work > > > > > > "Danny Shepherd" <[EMAIL PROTECTED]> wrote in message > > 020e01c1e7a1$70098eb0$0200a8c0@dannys">news:020e01c1e7a1$70098eb0$0200a8c0@dannys... > > > Firstly, I assume you mean "Y-m-j H:i:s" for the date format. > > > > > > To get the difference between 2 time strings : > > > > > > > > > > > // orginal time strings > > > $firstTime="2002-04-19 13:49:00"; > > > $lastTime="2002-04-19 14:00:00"; > > > > > > // convert to unix timestamps > > > $firstTime=strtotime($firstTime); > > > $lastTime=strtotime($lastTime); > > > > > > // perform subtraction to get the difference (in seconds) between times > > > $timeDiff=$lastTime-$firstTime; > > > > > > //echo out the difference > > > printf ("Difference is %d seconds",$timeDiff); > > > > > > ?> > > > > > > HTH > > > > > > Danny. > > > > > > - Original Message - > > > From: "Ron Allen" <[EMAIL PROTECTED]> > > > To: <[EMAIL PROTECTED]> > > > Sent: Friday, April 19, 2002 1:08 PM > > > Subject: [PHP] Determine the difference between two dates > > > > > > > > > > If I have two variables of time both in the format of "Y-m-j J:i:s" > > > > How would I go about and get the difference? > > > > > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Determine the difference between two dates
Appreciate the assistance Danny Figured it out $totaltime= date("H:i:s", mktime(0,0,$totaltime)); Just followed PHP from this page http://www.php.net/manual/en/function.mktime.php "Ron Allen" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > How is this going to give the overall time in difference... For instance > > A circuit went down at 17:30:45 it came back up at 18:37:49 > > what is the difference in time between the 2 in the format Days XX Hours XX > Minutes XX Seconds XX > > > > "Danny Shepherd" <[EMAIL PROTECTED]> wrote in message > 027601c1e7a9$fbe6f0f0$0200a8c0@dannys">news:027601c1e7a9$fbe6f0f0$0200a8c0@dannys... > > use the date() command (http://www.php.net/date) - using $timeDiff as the > > datestamp. > > > > HTH > > > > Danny > > > > - Original Message - > > From: "Ron Allen" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Friday, April 19, 2002 2:56 PM > > Subject: Re: [PHP] Determine the difference between two dates > > > > > > > If I wanted to represent it in the format of Days,Hours,Minutes,Seconds > > how > > > would that work > > > > > > > > > "Danny Shepherd" <[EMAIL PROTECTED]> wrote in message > > > 020e01c1e7a1$70098eb0$0200a8c0@dannys">news:020e01c1e7a1$70098eb0$0200a8c0@dannys... > > > > Firstly, I assume you mean "Y-m-j H:i:s" for the date format. > > > > > > > > To get the difference between 2 time strings : > > > > > > > > > > > > > > > // orginal time strings > > > > $firstTime="2002-04-19 13:49:00"; > > > > $lastTime="2002-04-19 14:00:00"; > > > > > > > > // convert to unix timestamps > > > > $firstTime=strtotime($firstTime); > > > > $lastTime=strtotime($lastTime); > > > > > > > > // perform subtraction to get the difference (in seconds) between > times > > > > $timeDiff=$lastTime-$firstTime; > > > > > > > > //echo out the difference > > > > printf ("Difference is %d seconds",$timeDiff); > > > > > > > > ?> > > > > > > > > HTH > > > > > > > > Danny. > > > > > > > > - Original Message - > > > > From: "Ron Allen" <[EMAIL PROTECTED]> > > > > To: <[EMAIL PROTECTED]> > > > > Sent: Friday, April 19, 2002 1:08 PM > > > > Subject: [PHP] Determine the difference between two dates > > > > > > > > > > > > > If I have two variables of time both in the format of "Y-m-j J:i:s" > > > > > How would I go about and get the difference? > > > > > > > > > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Within the date format
This is what I have right now $totaltime= date(":H:i:s", mktime(0,0,$totaltime)); This is the result 04:20:46 from the following dates 2002-04-25 16:30:16 2002-04-19 12:09:30 534046 seconds I would like to be able to get the days and, if needed, the number of months and years -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PGP and other encryptions methods for PHP
I need to encrypt data in an application then mail it to a recipient where the email client must decrypt using a private key. The recipient would be using MS Outlook or another email client perhaps Eudora. What encryption techonologies are best for this? I had a brief look at OpenPGP but not sure of how well that integrates with PHP. Any help or tips from anyones who's done some work with this would be appreciated. === Ron Dyck WebbTech www.webbtech.net
[PHP] ******************* Secure product download *******************
I am building a site where visitors can purchase and download software. To purchase a software product, the visitor must submit credit card info. Once the purchase has been approved, the user is given a link from which he/she may download the requested software. This link MUST only be accessible to those who have paid. I have tried a number of different and creative methods, but none give me the security I need. I don't want the user to be able bookmark the URL or email the URL to friends so that they can download the software as well. I am using PHP sessions combined with MySQL user accounts to authenticate users throughout the rest of the site. How can I get this to work for downloads? Is this even possible within the open realm of the browser? Have any of you solved a similar problem? I welcome any ideas. Ron Stagg
RE: [PHP] ******************* Secure product download *******************
Yes, but unauthorized users can still just key in the URL (http://www.example.com/pay_first.php) into their browser and get around the session verification. I have toyed around with dynamically building the file when it is needed, but I need to delete it once it has been downloaded by the user. How can I delete a file as soon as it has been downloaded? Ron Stagg -Original Message- From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 29, 2002 2:57 PM To: Ron Stagg; [EMAIL PROTECTED] Subject: Re: [PHP] *** Secure product download *** session_start(); if(!isset($_SESSION["did_pay"])) { header("Location: http://www.example.com/pay_first.php";); } //show download code Obviously you set $_SESSION['did_pay'] to a value once they, umm, pay. ---John Holmes... - Original Message - From: "Ron Stagg" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, May 29, 2002 4:47 PM Subject: [PHP] *** Secure product download *** I am building a site where visitors can purchase and download software. To purchase a software product, the visitor must submit credit card info. Once the purchase has been approved, the user is given a link from which he/she may download the requested software. This link MUST only be accessible to those who have paid. I have tried a number of different and creative methods, but none give me the security I need. I don't want the user to be able bookmark the URL or email the URL to friends so that they can download the software as well. I am using PHP sessions combined with MySQL user accounts to authenticate users throughout the rest of the site. How can I get this to work for downloads? Is this even possible within the open realm of the browser? Have any of you solved a similar problem? I welcome any ideas. Ron Stagg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] ******************* Secure product download *******************
John, I appreciate your advice here. Please tolerate another question: Your code example had the comment "//show download code". That is what I need. What is the "download code"? Thanks, Ron -Original Message- From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 29, 2002 3:29 PM To: Ron Stagg; [EMAIL PROTECTED] Subject: Re: [PHP] *** Secure product download *** Ummno they can't. pay_first.php is what you send them to if they don't have a correct session. If the session is correct, show the download page. Notice the ! in front of isset(). ---John Holmes... - Original Message - From: "Ron Stagg" <[EMAIL PROTECTED]> To: "1LT John W. Holmes" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, May 29, 2002 5:02 PM Subject: RE: [PHP] *** Secure product download *** Yes, but unauthorized users can still just key in the URL (http://www.example.com/pay_first.php) into their browser and get around the session verification. I have toyed around with dynamically building the file when it is needed, but I need to delete it once it has been downloaded by the user. How can I delete a file as soon as it has been downloaded? Ron Stagg -Original Message- From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 29, 2002 2:57 PM To: Ron Stagg; [EMAIL PROTECTED] Subject: Re: [PHP] *** Secure product download *** session_start(); if(!isset($_SESSION["did_pay"])) { header("Location: http://www.example.com/pay_first.php";); } //show download code Obviously you set $_SESSION['did_pay'] to a value once they, umm, pay. ---John Holmes... - Original Message - From: "Ron Stagg" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, May 29, 2002 4:47 PM Subject: [PHP] *** Secure product download *** I am building a site where visitors can purchase and download software. To purchase a software product, the visitor must submit credit card info. Once the purchase has been approved, the user is given a link from which he/she may download the requested software. This link MUST only be accessible to those who have paid. I have tried a number of different and creative methods, but none give me the security I need. I don't want the user to be able bookmark the URL or email the URL to friends so that they can download the software as well. I am using PHP sessions combined with MySQL user accounts to authenticate users throughout the rest of the site. How can I get this to work for downloads? Is this even possible within the open realm of the browser? Have any of you solved a similar problem? I welcome any ideas. Ron Stagg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Use of Objects in set_error_handler
Is is possible to use an object method to set_error_handler instead of a function? Instead of this: set_error_handler("errorHandler"); can this somehow be done: set_error_handler($obj->errorHandler); (The object method is of course valid.) ======= Ron Dyck WebbTech www.webbtech.net [EMAIL PROTECTED]
[PHP] Help with showing tables in DB
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Consider the following: mysql_select_db($db_name); $result = mysql_query("show tables"); while ($rows = mysql_fetch_object($result)) { echo $rows; } So why does this not return the Table names? I have even tried "echo rows->Table" and "echo rows->Tables" to no avail. So how do I fix this? Thanks in advance, Ron C. -BEGIN PGP SIGNATURE- Version: PGP 7.1 iQA/AwUBPHv32kSpEYIqgLQzEQISfQCeLVinx7oQc4Gmudv1MJbb17dGCPoAnA7S yRR86rJUwHsXGJlU0yVckVyK =2bva -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to remove ^M characters from a directory?
Balaji Ankem wrote: > > Hi, > I have moved my php files to linux system. > Now it z showing (control+M)(^M) characters in the file. > How can I remove those characters? > > Any help would be appreciable. > > Thanks and Regards > Balaji > > >Name: Wipro_Disclaimer.txt >Wipro_Disclaimer.txtType: Plain Text (text/plain) >Encoding: 7bit > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php NAME dos2unix - convert text file from DOS format to ISO format SYNOPSIS dos2unix [ -ascii ] [ -iso ] [ -7 ] originalfile conver- tedfile DESCRIPTION The dos2unix utility converts characters in the DOS extended character set to the corresponding ISO standard characters. -- Ron Clark System Administrator/Web Coordinator Armstrong Atlantic State University 11935 Abercorn Street Savannah, Ga 31419 Phone: 912 961 3234 Fax: 912 927 5353 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] 1024X760 or 800x600
Is there a way with PHP to determine screen resolution size??? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] printf
I am looking at how to format output Here is what I have. There is a simple currency conversion that I do and the output is just a string of numbers I would like it so that it puts a comma for every 3 spaces...Any clues..oh knowing newsgroup -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: printf
This is what I have and it is not working $converted1 =round($usdamount * $convamount, 2); $converted = number_format($converted1); //echo "$amount * $convamount = $converted"; echo "You should receive$nbsp $converted $currency"; "Ron Allen" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I am looking at how to format output > > Here is what I have. There is a simple currency conversion that I do and > the output is just a string of numbers > I would like it so that it puts a comma for every 3 spaces...Any > clues..oh knowing newsgroup > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: printf
Figured out why it wasn't working, but I need to be able to display the 2 decimals afterwards "Ron Allen" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I am looking at how to format output > > Here is what I have. There is a simple currency conversion that I do and > the output is just a string of numbers > I would like it so that it puts a comma for every 3 spaces...Any > clues..oh knowing newsgroup > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: printf
figured that out as well You need to put the number_format($number,2) afterwards Thanks to both you! "Ron Allen" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I am looking at how to format output > > Here is what I have. There is a simple currency conversion that I do and > the output is just a string of numbers > I would like it so that it puts a comma for every 3 spaces...Any > clues..oh knowing newsgroup > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] fwrite
Using fwrite how would I insert a line return -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] One last thing for the day
Any idea on how to obtain a computer name...Windows environment using PHP? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] GD library
I have downloaded the GD library and I am wondering how do I install it.. I unzipped it and put it my root. I have PHP version 4.1.1...what else is there to do? Does anybody have any script for me to test it real quick? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: GD library
This is for a Windows 2000 server "Ron Allen" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I have downloaded the GD library and I am wondering how do I install it.. > > I unzipped it and put it my root. I have PHP version 4.1.1...what else > is there to do? Does anybody have any script for me to test it real quick? > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Making graphics
Here is what I want to do. I am taking a poll and I would like to display the results in a bar graph format. What is the best way to do this.hopefully you will not say GD library! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Browsing on Windows
I am querying to see if someone can point in the right direction. What I would like to do is first open a connection to a specific folder (know this) Have it towards the user can click on a button and it will pop up with the local directory and have it so that they can browse their hard drive and click on a file so that they can upload it. Then have then click a button and upload the file! Any pointers on where to start? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] URGENT: IIS doesn't like GET or POST
Hi, When I pass form variables to PHP using either GET or POST it works under PWS running on "localhost", but when I run the same script remotely on a Win2K Advanced Server and IIS machine, I get "Warning, not defined" errors for all the variables passed. Is there some configuration problem with IIS, or am I overlooking something else? Ron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] HTTP_POST_FILES not working with 4.1.0?
Having trouble with HTTP_POST_FILES not working under 4.1.0. Track vars is enabled, and HTTP_POST_VARS works fine. Anyone experiencing simular problems? === Ron Dyck WebbTech www.WebbTech.net [EMAIL PROTECTED] 905 734-1164 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Sorting Dates in this format: Jul 21 2001
Hey Chris If the text field only contains dates, I'd suggest converting it to a DATE type the use DATE_FORMAT in your SELECT statement to return the format needed. This also lets MySQL sort it for you, ie: SELECT DATE_FORMAT(date, '%b %e %Y') FROM your_table ORDER DESC BY date Right off hand I don't think there's a simple way to sort it in PHP. If you want to keep it as a text field then you'll probable have to parce the dates and sort it accordingly, ie: foreach ($dates as $date) $parced_dates[] = split(' ', $date); // Your own sort functions sort_by_years($parced_dates); sort_by_months($parced_dates); sort_by_days($parced_dates); I hope this helps Chris wrote: > I have a bunch of dates like this: > Jul 24 2001 > Jul 31 2001 > Aug 7 2001 > > I need to sort it from oldest to newest, but I can't devise a way that works. And >they are text fields in MySQL so that won't sort it correctly either. Can anyone >point me in the right direction? -- Ron Wills DMS Control Programmer [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]