php-windows Digest 23 Feb 2001 17:32:16 -0000 Issue 460 Topics (messages 5707 through 5717): Reading data from a file 5707 by: Brian Higgins 5712 by: Tom Mathews Fwd 5708 by: Taylor Silvers Protecting PHP code 5709 by: Paul Smith 5715 by: Alain Samoun Newbie question... 5710 by: Daniel Furse 5711 by: Ben Cairns 5713 by: Tom Mathews Re: Telnet, Socket Configuration 5714 by: Jim MacGowan Undefinded Index on Mysql Result 5716 by: Greg Kopp Re: Does anyone know any sites where a PHP programmer can find job? 5717 by: Phillip Bow Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] ----------------------------------------------------------------------
Perhaps the php gurus can help with my problem. I am using php4.0 +windows NT 4.0+Apache to read data from a text file ( a list of real numbers). I need to have the the data in the form {data1,data2,data3,...,0}. Here is some code: $elemdata=file("noisydata.dat"); $number=count($elemdata); $stringdata="{"; for ($i=0;$i<$number;$i++){ $stringdata.=$elemdata[$i].","; } $stringdata.="0}"; So far so good. Now I need to add this data as a query string to a url: $url="http://www......?stringdata=$stringdata"; and then read the output back into the browser $fp1=file($url); $x=0; while($fp1[$x]) echo $fp1[$x++]; When I use this approach I get a file handler error. I found that I can get around the problem by replacing the line $stringdata.=$elemdata[$i].","; with $stringdata.=(string)(real)$elemdata[$i].","; What gives? In the first instance $elemdata is already string. Why must I go through two type cast changes to get this to work! I would really like to know the reason behind this quirk. Thanks much Brian
How is your file delimited? This could impact on whether elemdata is a string or actually a real array. That may not be helpful, but here's a handy tip when using file() - remember that it retains the newline character, so you have to be careful about mixing and matching dos/windows type files with unix variants! Brian Higgins wrote: > Perhaps the php gurus can help with my problem. > > I am using php4.0 +windows NT 4.0+Apache to read data from a text file ( a > list of real numbers). I need to have the the data in the form > {data1,data2,data3,...,0}. Here is some code: > > $elemdata=file("noisydata.dat"); > $number=count($elemdata); > $stringdata="{"; > for ($i=0;$i<$number;$i++){ > $stringdata.=$elemdata[$i].","; > } > $stringdata.="0}"; > > So far so good. > > Now I need to add this data as a query string to a url: > > $url="http://www......?stringdata=$stringdata"; > > and then read the output back into the browser > > $fp1=file($url); > $x=0; > while($fp1[$x]) > echo $fp1[$x++]; > > When I use this approach I get a file handler error. I found that I can get > around the problem by replacing the line > $stringdata.=$elemdata[$i].","; > with > $stringdata.=(string)(real)$elemdata[$i].","; > > What gives? In the first instance $elemdata is already string. Why must I go > through two type cast changes to get this to work! I would really like to > know the reason behind this quirk. > > Thanks much > > Brian > > -- > PHP Windows 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]
Dear Friends & Future Millionaire: AS SEEN ON NATIONAL TV: ''Making over half million dollars every 4 to 5 months from your home for an investment of only $25 U.S. Dollars expense one time'' BE A MILLIONAIRE LIKE OTHERS WITHIN A YEAR!!! Before you say ''Bull'', please read the following. This is the letter you have been hearing about on the news lately. Due to the popularity of this letter on the Internet, a national weekly news program recently devoted an entire show to the investigation of this program described below, to see if it really can make people money. The show also investigated whether or not the program was legal. Their findings proved once and for all that there are ''absolutely NO Laws prohibiting the participation in the program and if people can -follow the simple instructions, they are bound to make some mega bucks with only $25 out of pocket cost''. DUE TO THE RECENT INCREASE OF POPULARITY & RESPECT THIS PROGRAM HAS ATTAINED, IT IS CURRENTLY WORKING BETTER THAN EVER. This is what one had to say: '' Thanks to this profitable opportunity. I was approached many times before but each time I passed on it. I am so glad I finally joined just to see what one could expect in return for the minimal effort and money required. To my astonishment, I received total $ 610,470.00 in 21 weeks, with money still coming in''. Pam Hedland, Fort Lee, New Jersey. ============================================================ Here is another testimonial: ''' this program has been around for a long time but I never believed in it. But one day when I received this again in the mail I decided to gamble my $25 on it. I followed the simple instructions and walaa ..... 3 weeks later the money started to come in. First month I only made $240.00 but the next 2 months after that I made a total of $290,000.00. So far, in the past 8 months by re-entering the program, I have made over $710,000.00 and I am playing it again. The key to success in this program is to follow the simple steps and NOT change anything.'' More testimonials later but first, ======== PRINT THIS NOW FOR YOUR FUTURE REFERENCE ========== (Or Have it E-mailed to you-See Submit Button Below) $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ If you would like to make at least $500,000 every 4 to 5 months easily and comfortably, please read the following...THEN READ IT AGAIN and AGAIN !!! $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ FOLLOW THE SIMPLE INSTRUCTION BELOW AND YOUR FINANCIAL DREAMS WILL COME TRUE, GUARANTEED! INSTRUCTIONS: ===== Order all 5 reports shown on the list below. ========= For each report, send $5 CASH, THE NAME & NUMBER OF THE REPORT YOU ARE ORDERING and YOUR E-MAIL ADDRESS to the person whose name appears ON THAT LIST next to the report. MAKE SURE YOUR RETURN ADDRESS IS ON YOUR ENVELOPE TOP LEFT CORNER in case of any mail problems. === When you place your order, make sure you order each of the 5 reports. You will need all 5 reports so that you can save them on your computer and resell them. YOUR TOTAL COST $5 X 5=$25.00. === Within a few days you will receive, vie e-mail, each of the 5 reports from these 5 different individuals. Save them on your computer so they will be accessible for you to send to the 1,000's of people who will order them from you. Also make a floppy of these reports and keep it on your desk in case something happen to your computer. === IMPORTANT __ DO NOT alter the names of the people who are listed next to each report, or their sequence on the list, in any way other than what is instructed below in step '' 1 through 6 '' or you will lose out on majority of your profits. Once you understand the way this works, you will also see how it does not work if you change it. Remember, this method has been tested, and if you alter, it will NOT work !!! People have tried to put their friends/relatives names on all five thinking they could get all the money. But it does not work this way. Believe us, we all have tried to be greedy and then nothing happened. So Do Not try to change anything other than what is instructed. Because if you do, it will not work for you. Remember, honesty reaps the reward!!! 1.... After you have ordered all 5 reports, take this advertisement and REMOVE the name & address of the person in REPORT # 5. This person has made it through the cycle and is no doubt counting their fortune. 2.... Move the name & address in REPORT # 4 down TO REPORT # 5. 3.... Move the name & address in REPORT # 3 down TO REPORT # 4. 4.... Move the name & address in REPORT # 2 down TO REPORT # 3. 5.... Move the name & address in REPORT # 1 down TO REPORT # 2 6.... Insert YOUR name & address in the REPORT # 1 Position. PLEASE MAKE SURE you copy every name & address ACCURATELY! ============================================================ **** Take this entire letter, with the modified list of names, and save it on your computer. DO NOT MAKE ANY OTHER CHANGES. Save this on a disk as well just in case if you lose any data. To assist you with marketing your business on the internet, the 5 reports you purchase will provide you with invaluable marketing information which includes how to send bulk e-mails legally, where to find thousands of free classified ads and much more. There are 2 Primary methods to get this venture going: METHOD # 1: BY SENDING BULK E-MAIL LEGALLY ============================================================ Let's say that you decide to start small, just to see how it goes, and we will assume You and those involved send out only 5,000 e-mails each. Let's also assume that the mailing receive only a 0.2% response (the response could be much better but lets just say it is only 0.2%. Also many people will send out hundreds of thousands e-mails instead of only 5,000 each). Continuing with this example, you send out only 5,000 e-mails. With a 0.2% response, that is only 10 orders for report # 1. Those 10 people responded by sending out 5,000 e-mail each for a total of 50,000. Out of those 50,000 e-mails only 0.2% responded with orders. That's=100 people responded and ordered Report # 2. Those 100 people mail out 5,000 e-mails each for a total of 500,000 e-mails. The 0.2% response to that is 1000 orders for Report # 3. Those 1000 people send out 5,000 e-mails each for a total of 5 million e-mails sent out. The 0.2% response to that is 10,000 orders for Report # 4. Those 10,000 people send out 5,000 e-mails each for a total of 50,000,000 (50 million) e-mails. The 0.2% response to that is 100,000 orders for Report # 5 THAT'S 100,000 ORDERS TIMES $5 EACH=$500,000.00 (half million). Your total income in this example is: 1..... $50 + 2..... $500 + 3..... $5,000 + 4..... $50,000 + 5..... $500,000 ........ Grand Total=$555,550.00 NUMBERS DO NOT LIE. GET A PENCIL & PAPER AND FIGURE OUT THE WORST POSSIBLE RESPONSES AND NO MATTER HOW YOU CALCULATE IT, YOU WILL STILL MAKE A LOT OF MONEY ! ============================================================ REMEMBER FRIEND, THIS IS ASSUMING ONLY 10 PEOPLE ORDERING OUT OF 5,000 YOU MAILED TO. Dare to think for a moment what would happen if everyone or half or even one 4th of those people mailed 100,000 e-mails each or more? There are over 150 million people on the Internet worldwide and counting. Believe me, many people will do just that, and more! METHOD # 2 : BY PLACING FREE ADS ON THE INTERNET ============================================================ Advertising on the net is very very inexpensive and there are hundreds of FREE places to advertise. Placing a lot of free ads on the Internet will easily get a larger response. We strongly suggest you start with Method # 1 and add METHOD # 2 as you go along. For every $5 you receive, all you must do is e-mail them the Report they ordered. That's it. Always provide same day service on all orders. This will guarantee that the e-mail they send out, with your name and address on it, will be prompt because they can not advertise until they receive the report. ====================== AVAILABLE REPORTS==================== ORDER EACH REPORT BY ITS NUMBER & NAME ONLY. Notes: Always send $5 cash (U.S. CURRENCY) for each Report. Checks NOT accepted. Make sure the cash is concealed by wrapping it in at least 2 sheets of paper. On one of those sheets of paper, Write the NUMBER & the NAME of the Report you are ordering, YOUR E-MAIL ADDRESS and your name and postal address. PLACE YOUR ORDER FOR THESE REPORTS NOW : ============================================================ REPORT # 1 : ''The Insider's Guide to Advertising for Free on the Net'' Order Report # 1 from: Jeff Nickel P.O. Box 560005 Charlotte, NC 28256-0005 USA ____________________________________________________________ REPORT # 2 : ''The Insider's Guide to Sending Bulk e- mail on the Net'' Order Report # 2 from : D. Gilstrap P.O. Box 311079 Atlanta, GA 31131 USA ____________________________________________________________ REPORT # 3 : ''The Secret to Multilevel marketing on the net'' Order Report # 3 from: Stella Dottir 2327 1/2 Chartres St. New Orleans, LA 70117 USA ____________________________________________________________ REPORT # 4 : ''How to become a millionaire utilizing MLM & the Net'' Order Report # 4 from: Amos Miller 261 Joost Ave. San Francisco, CA 94131 USA ____________________________________________________________ REPORT # 5 : ''HOW TO SEND 1 MILLION E-MAILS FOR FREE'' Order Report # 5 from: Loren Stone P.O. Box 6232 Clearfield, UT 84089 USA ____________________________________________________________ $$$$$$$$$ YOUR SUCCESS GUIDELINES $$$$$$$$$$$ Follow these guidelines to guarantee your success: === If you do not receive at least 10 orders for Report #1 within 2 weeks, continue sending e-mails until you do. === After you have received 10 orders, 2 to 3 weeks after that you should receive 100 orders or more for REPORT # 2. If you did not, continue advertising or sending e-mails until you do. === Once you have received 100 or more orders for Report # 2, YOU CAN RELAX, because the system is already working for you, and the cash will continue to roll in ! THIS IS IMPORTANT TO REMEMBER: Every time your name is moved down on the list, you are placed in front of a different report. You can KEEP TRACK of your PROGRESS by watching which report people are ordering from you. IF YOU WANT TO GENERATE MORE INCOME SEND ANOTHER BATCH OF E-MAILS AND START THE WHOLE PROCESS AGAIN. There is NO LIMIT to the income you can generate from this business !!! ============================================================ FOLLOWING IS A NOTE FROM THE ORIGINATOR OF THIS PROGRAM: You have just received information that can give you financial freedom for the rest of your life, with NO RISK and JUST A LITTLE BIT OF EFFORT. You can make more money in the next few weeks and months than you have ever imagined. Follow the program EXACTLY AS INSTRUCTED. Do Not change it in any way. It works exceedingly well as it is now. Remember to e-mail a copy of this exciting report after you have put your name and address in Report #1 and moved others to #2 ...........# 5 as instructed above. One of the people you send this to may send out 100,000 or more e-mails and your name will be on every one of them. Remember though, the more you send out the more potential customers you will reach. So my friend, I have given you the ideas, information, materials and opportunity to become financially independent. IT IS UP TO YOU NOW! ==================== MORE TESTIMONIALS====================== '' My name is Mitchell. My wife, Jody and I live in Chicago. I am an accountant with a major U.S. Corporation and I make pretty good money. When I received this program I grumbled to Jody about receiving ''junk mail''. I made fun of the whole thing, spouting my knowledge of the population and percentages involved. I ''knew'' it wouldn't work. Jody totally ignored my supposed intelligence and few days later she jumped in with both feet. I made merciless fun of her, and was ready to lay the old ''I told you so'' on her when the thing didn't work. Well, the laugh was on me! Within 3 weeks she had received 50 responses. Within the next 45 days she had received total $ 147,200.00 ........... all cash! I was shocked. I have joined Jody in her ''hobby''. Mitchell Wolf M.D., Chicago, Illinois ============================================================ '' Not being the gambling type, it took me several weeks to make up my mind to participate in this plan. But conservative that I am, I decided that the initial investment was so little that there was just no way that I wouldn't get enough orders to at least get my money back''. '' I was surprised when I found my medium size post office box crammed with orders. I made $319,210.00 in the first 12 weeks. The nice thing about this deal is that it does not matter where people live. There simply isn't a better investment with a faster return and so big''. Dan Sondstrom, Alberta, Canada ============================================================ '' I had received this program before. I deleted it, but later I wondered if I should have given it a try. Of course, I had no idea who to contact to get another copy, so I had to wait until I was e-mailed again by someone else.........11 months passed then it luckily came again...... I did not delete this one! I made more than $490,000 on my first try and all the money came within 22 weeks''. Susan De Suza, New York, N.Y. ============================================================ '' It really is a great opportunity to make relatively easy money with little cost to you. I followed the simple instructions carefully and within 10 days the money started to come in. My first month I made $ 20,560.00 and by the end of third month my total cash count was $ 362,840.00. Life is beautiful, Thanx to internet''. Fred Dellaca, Westport, New Zealand ============================================================ ORDER YOUR REPORTS TODAY AND GET STARTED ON YOUR ROAD TO FINANCIAL FREEDOM ! ============================================================ If you have any questions of the legality of this program, contact the Office of Associate Director for Marketing Practices, Federal Trade Commission, Bureau of Consumer Protection, Washington, D.C. ============================THE END=========================
Hi, If I have a piece of code for security reasons we don't want even the sysadmin of the NT system to be able to view. Is there a way to distribute it in a way it can't be viewed, i.e. compiled perhaps? Thanks. .. Just because it works, doesn't mean it isn't broken.
Yes, if you have enough money for it - $2,500 I believe - Dee the zend store. Alain On Fri, Feb 23, 2001 at 09:12:08AM -0000, Paul Smith wrote: > Hi, > > If I have a piece of code for security reasons we don't want even the > sysadmin of the NT system to be able to view. Is there a way to distribute > it in a way it can't be viewed, i.e. compiled perhaps? > > Thanks. > > .. > Just because it works, doesn't mean it isn't broken.
Hi, I'm having problems getting a query to work, it's a fairly simple select query, with wildcards. This is the query as designed in MS Access 97's query designer: SELECT Contacts.ForeName FROM Contacts WHERE (((Contacts.ForeName) Like "*dan*")); This selects 7 names from our database when run in Access. I run the following query through PHP: SELECT Contacts.ForeName FROM Contacts WHERE (((Contacts.ForeName) Like '$contact_name')) ($contact_name expands to *dan*) This returns no results. I've tried various wildcard queries, but none of them seem to work. How do I do wildcard queries in PHP? Many thanks, Dan Furse
The wildcard in PHP is a % E.G. select * from YOUR_TABLE where SOME_FIELD like '%$dan%'"; Hope this helps -- Ben Cairns - Head Of Technical Operations intasept.COM Tel: 01332 365333 Fax: 01332 346010 E-Mail: [EMAIL PROTECTED] Web: http://www.intasept.com "MAKING sense of the INFORMATION TECHNOLOGY age @ WORK......"
don't like being picky, but you may be thinking of MySQL where % is the multiple character wildcard (eg select 'David!' LIKE '%D%v%';) _ is the single character wildcard (eg select 'David' LIKE 'Davi_'; Tom Ben Cairns wrote: > The wildcard in PHP is a % > > E.G. > select * from YOUR_TABLE where SOME_FIELD like '%$dan%'"; > > Hope this helps > > -- Ben Cairns - Head Of Technical Operations > intasept.COM > Tel: 01332 365333 > Fax: 01332 346010 > E-Mail: [EMAIL PROTECTED] > Web: http://www.intasept.com > > "MAKING sense of > the INFORMATION > TECHNOLOGY age > @ WORK......" > > -- > PHP Windows 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]
Socket support isn't available on windows yet. Hopefully it will be finished by the time php4.05 is released. Gonzalo Vera wrote: > You must compile php with socket functions: it does not come > pre-compiled in the binaries. > > Gonzalo. > >> Hi, > >> I am trying to write a web telnet interface and I have difficulties with > >> configuration for the socket functions... they are simply not >> recognized. I have php4 on apache server for windows. I assume I should >> edit the php.ini file, but I have no idea what to do there. > >> Any help will be appreciated >
I am using PHP4 + MySQL + PWS + Windows 98. We are trying to port over a web site to a laptop for remote use. However, when we execute a SQL query on a DB in which a filed of the record contains a NULL value, we get an error. The code is as follows: $GetQuery = mysql_query ("SELECT * FROM ApplicantsTbl WHERE App_ID = $qq"); $AppResult = mysql_fetch_array ($GetQuery); $AppDOB = $AppResult[AppDOB]; The query executes just fine, and PARTS of the $AppResult array get returned. However... We are experiencing TWO problems: First, unless we put quote marks around the index so it reads $AppResult['AppDOB'], we get an undefined constant. This doesn't happen on our Linux/Apache web server. Second, if the field AppDOB contains a NULL value, PHP barks that there is an undefined index. It appears that it won't even create the index. I would appreciate any help you could be. Greg
You can check out dice.com and monster.com doing a search for php. A good number of results are returned. Good luck in your hunt. -- phill ""Grishick"" <[EMAIL PROTECTED]> wrote in message 974skf$igi$[EMAIL PROTECTED]">news:974skf$igi$[EMAIL PROTECTED]... > Anyone know any sites where a PHP programmer can find job? Specially in US. > Thank you. > Grigoriy Solovyev. > [EMAIL PROTECTED] > > > > > -- > PHP Windows 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] >