Re: [PHP] Removing Arrays With Certain Keys From Larger Array
At 7/8/2003 02:18 PM, jwulff wrote: I have an array exampled below. I want to remove and use certain nested arrays from the larger array where the key == title, size, day, etc... How does an idiot like myself accomplish this? You can reference it the same as you reference any other array. For example, you used print_r to display the sample array, to print a sub array you do the same thing: print_r($myArray[0]); That'll print the array under the 0 key. If you wanted element 1 of the array under key 0, then you'd do something like $myValue = $myArray[0][1]; Hope this helps. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Spammer! Re: [PHP] ANNOUNCING: Rekall V2.0.0 for Linux/UNIX....
At 7/7/2003 03:07 PM, Apollo (Carmel Entertainment) wrote: If you are charing for your product and your source is not open, you have no place on opensource lists. Just out of curiosity, where did you get the idea this is an open source mailing list? There are plenty of commercial PHP products that have been mentioned and recommended by list members, including Zend products. I'm not condoning posting ads to the list the way John, but I think that declaring it an open source list will discourage people who have created PHP-based systems that aren't free or open-source from contributing. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Spammer! Re: [PHP] ANNOUNCING: Rekall V2.0.0 for Linux/UNIX....
At 7/7/2003 04:09 PM, Apollo (Carmel Entertainment) wrote: Well, lets see. I want free advertising too. How about I go to all the lists I am member of and send emails like John from Rekall did announcing widgets or services my company does. How will you react to that? Your level of reading comprehension is astounding. I'm hoping you were being deliberately obtuse when you ignored the part where I said I'm not condoning posting ads to the list. You must have. Nobody could be that stupid. I'm not condoning posting ads to the list the way John, but I think that declaring it an open source list will discourage people who have created PHP-based systems that aren't free or open-source from contributing. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP
At 7/8/2003 03:30 AM, Hiren Mehta wrote: Thnx alot guys You have been of great help :D And don't forget this list! There are a lot of really talented people on this list, so if you're trying to figure something out and haven't been able to find an answer on your own, don't hesitate to ask here. I've learned a lot just by reading the threads started by other people; more often than not, someone has already asked or is in the process of asking questions about the exact same problem I'm working on. There's also a searchable archive of this list at: http://marc.theaimsgroup.com/?l=php-general Chances are, someone's already asked. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Please help can anyone figure whats wrong with this?
At 6/25/2003 10:26 AM, Kevin Stone wrote: You're missing a starting bracket. You know this was WAY too easy to find. What kind of editor are you using that would miss something this obvious? A little indenting goes a long way... -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cookies- peanut butter or chocolate??
At 6/19/2003 02:10 PM, Sparky Kopetzky wrote: 2. How do you put 2 items that you want to save in the cookie and retrieve?? Smuch 'em together into a single variable with a delimiter you're sure won't show up in either value, something like #@@#, between them. Then, when you read the cookie value in, just explode it by your delimiter. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] securing a graphic
At 6/20/2003 02:33 AM, Haseeb Iqbal wrote: yeah there is a way No there is not a way. The way the web works is by sending your content to someone else' computer. Once it's there, they have a copy, whether it's in their cache or actually saved as a file. There's no way to prevent a determined user from stealing your images, trust me on this one, a good number of my photoshops are being sent around as anonymous funny emails. You can disable right-clicking with javascript, but this is pointless. In IE, the user can just drag your image up to the address bar and poof, your javascript is gone. And on browsers that can't do that, there's still the cache. Even if, by some scripting voodoo you manage to keep your images from ending up in the cache, what's the keep the user from just doing a screen capture? -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] explode, split, or what?
At 6/19/2003 10:41 PM, Kyle Babich wrote: Inside of another file I'm trying to read setup.txt into $rawSetupData and explode that with \r\n's into an array called $setupData. Why on earth? http://us4.php.net/file ?php if (file_exists(setup.txt)) { $rawSetupData = readfile(setup.txt); $setupData = explode(\r\n, $rawSetupData); echo $setupData[0]; } else echo Error opening \setup.txt\; ? No no nonono ? if ($file_exists(setup.txt)) { $setupData = file(setup.txt); } else { echo 'Error opening setup.txt'; } ? -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Strange roblems with sessions
At 6/18/2003 03:22 PM, Logan McKinley wrote: the error checking include file just handles php errors, the javascript handles form validation. I believe the problem i am having is with the session not the error handling, because i removed all validation and it did the same thing. Yes, that's what I told you. The form is submitting to a different page than the two you included as your examples. If you're not setting the session until the form validates and is submitted, then you must be setting it on the page the form feeds to. This line: form method=GET name=form action=Register.php onsubmit=return validate(this); Tells the form to send it's GET data to Register.php, which is neither of the pages you gave us. The die(There was an error registering...) line is in registration_form.php, not Register.php. See my point? You're not setting the session in either of the files you gave us to debug your problem with your sessions. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Strange roblems with sessions
At 6/18/2003 02:51 PM, Logan McKinley wrote: -- the code in question I have attached the actual files if that would be of more help, Thanks in advance for any help, The first thing that I noticed is that you're doing error checking in registration_form.php, but your form is posting to Register.php. If the data is being set in Register, but you're looking for validation in registration_form, you're going to get an error. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] String containing PHP Code
At 6/16/2003 05:45 PM, Suhas Pharkute wrote: I have a php script which generates a string which has php code in it. I need to run that code. http://www.php.net/eval -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] form name and submit test
At 6/11/2003 09:42 AM, Amanda McComb wrote: If I have multiple forms on a page, and each form has it's own name, how can I tell which form has submitted? By its contents. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] What does this do?
At 6/10/2003 02:56 PM, Stephen Goddard wrote: Can anyone tell me what this does ${varname} I cant find any information as to what the braces do. Which is odd because searching for braces at PHP.net takes you the strings section, which explains in detail several functions of curly braces. http://us2.php.net/types.string -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] submitting to differient php scripts based on button -O T-
At 6/3/2003 04:24 PM, Ryan A wrote: I simply want to submit my form to either one.php or two.php or thr.php depending on which BUTTON is pressed (I am using html buttons input type='submit' value='blah') I have 3 buttonshow do i set it? You can do this one of three ways: 1. Instead of actually submitting to a different php script, you submit to one script that gives a header location based on which submit button you use. So if I have three submit-type buttons, I'll just say IF($_POST['submit1']) { header(Location: script1.php); } ELSEIF($_POST['submit2']) { header(Location: script2.php); } etc. 2. You submit to one script that includes the relevant functions depending on which button is pushed. IF($_POST['submit1']) { include(script1.php): } or 3. You do it with Javascript since what you actually want to do is on the client, not the server. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] UBB to HTML
At 6/1/2003 09:05 PM, zavaboy wrote: How can I strip ALL HTML tags, then turn UBB code to HTML. And I also want to know how to turn the HTML back to UBB? http://us3.php.net/manual/en/function.strip-tags.php http://promoxy.mirrors.phpclasses.org/browse.html/package/818.html Google is your friend, Zava. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] I guess I'll give the list a shot
At 5/30/2003 09:47 PM, David McGlone wrote: Basically what Im trying to do is when lets say black is selected from the dropdown, then the price for a black shirt is grabbed from the database and inserted into a hidden field. If you want this to happen dynamically, as the user is on the page, then you're not doing it with PHP. However, if you can stand refreshing the page every time the user makes a change, then PHP is for you. Client-side is javascript. I'll be happy to offer some assistance with the javascript, but not on this list. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Mail Harvester Warning (was Re: [PHP] I guess I'll give the list a shot [T2003060200WW])
Just wanted to pass a little warning on to the list. I sent a reply to David McGlone ([EMAIL PROTECTED]) and my email got forwarded to an address at Bonzi.com. I'm not sure if they're using list replies to harvest email addresses or not, but I'll definitely be watching my in-box. From: TechSupport [EMAIL PROTECTED] To: [EMAIL PROTECTED] Date: Mon, 02 Jun 2003 17:17:55 GMT Subject: Re: [PHP] I guess I'll give the list a shot [T2003060200WW] This is an automatic reply to acknowledge that your message has been received. PLEASE DO NOT REPLY TO THIS MESSAGE. -- Dear [EMAIL PROTECTED], Thank you for submitting your question to our Technical Support Department. We received it on 6/2/2003 at 10:17:55 AM. Your tracking number for this message is: T2003060200WW. This message and tracking number are your assurance that we have received your message and will respond to it as quickly as possible. At BONZI Software we attempt to answer all of the questions we get on a first-come, first-served basis, as quickly as possible. On occasion we receive a large volume of e-mail that prevents us from answering your message as quickly as we would like. Please be assured that we have your message and will respond to it as quickly as we can. If your question to us is of a support nature, you can visit http://www.bonzi.com/support.htm to try and find an answer to your question in our online support center. This will often be quicker than we can reply to your message by hand, so we encourage you to try it out. Sincerely, Customer Support BONZI Software HTTP://www.bonzi.com -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Dynamic value lookups
At 6/2/2003 02:44 PM, Vijay Avarachen wrote: I know I gotta do somethign with onchange= That's Javascript, not PHP. I was thinking perhaps I can just do somthing like onchange=PHP_SELF?product=value. No I know thats not the syntax but you get the idea =) That won't dynamically load anything. If you use onchange to submit the form to a new PHP page, the user will see it refresh every time they make a change. It won't work automatically. Please keep in mind i have very very little knowledge of javascript. All the more reason for you to ask Javascript questions on a Javascript mailing list, this one's for PHP. And, since PHP is server-side and Javascript is client-side, what you want to do cannot be done with PHP. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] static vars question
At 5/30/2003 04:49 PM, Martin Helie wrote: function test() { static $i = 0; if( $i 10 ) { $i++; test(); } echo I'm here; } I am a little surprised to find that even when $i 10 and test() is invoked again, the current function call executes all the way through to echoing I'm here. Why? The I'm here line is outside the conditional. The function will still complete independent of the conditional. If $i is greater than ten, the pointer just skips the contents of the if/then and continues on the next line after it. Here's a better illustration: function gooble($alGore) { echo This is a ; if ($alGore!=President) { echo longer ; } echo sentence.br /; } gooble(Vice President); gooble(Crazy Mountain Man); gooble(President); If you want the function to terminate when the conditional is false, then you need an Else statement to do so, otherwise it's going to keep going. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] static vars question
At 5/30/2003 05:53 PM, Martin Helie wrote: In my test() function, I called test() again inside the if statement (which checks true for 10 iterations) Yes. So you've called the statement 10 times. and I thought that the current function would immediately be terminated by calling itself (or any other function that doesn't return) again Why would you think this? Once whatever function is called terminates, the parent function will resume, which means that once the spawned version of the function is done, the original will resume. The difference here is that the child instances inherit the value of $i because you've made it static. and never actually echo I'm here until the condition wasn't met, therefore the function not called again. No? No. I told you, that I'm here is going to execute any time you call that function because it's OUTSIDE the if statement. Only statements inside the if are affected by its conditional. Once the pointer gets to the if, it's going to check the conditional and, if it's true, as it is the first 10 times you go through the function, then it will run whatever's inside. If it's not true, the pointer will look for an else statement to execute, and then resume running all of the other lines in the function. If you want a block of code to not run until the conditional is false, then you want to use an ELSE statement, you don't want to just drop your code after your if, it doesn't work that way. I suggest reading up more on user-defined functions and what terminates them http://www.php.net/manual/en/functions.php#functions.user-defined And if/then statements http://www.php.net/manual/en/control-structures.php#control-structures.if -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] static vars question
At 5/30/2003 06:27 PM, Martin Helie wrote: Thanks for explaining that once the function is called and completed, the rest of the first call continues executing normally. That is what surprised me. Yup. It's what makes building function libraries a thing of art in PHP, you can create smaller functions that are called from larger functions. That way, your libraries are more specialized and easier to port from project to project. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] imagecreatefromjpeg()
At 5/29/2003 01:55 PM, Edward Peloke wrote: Isn't php4.3.2 compiled with the gd library Not necessarily. Run a phpinfo() and look in the configuration for --with-gd. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] imagecreatefromjpeg()
At 5/29/2003 01:55 PM, Edward Peloke wrote: I now have php 4.3.2 I'm sorry, I read the version wrong. Feel free to ignore me. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] imagecreatefromjpeg()
At 5/29/2003 02:42 PM, Edward Peloke wrote: Nevermind, I got it working with a few ini changes... All rightee. Glad I could help. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] dynamic IF statement
At 4/4/2003 11:50 AM, Tim Haskins wrote: How does one create a statement that basically says: ?php if (HTTP_GET_VARS[id] == ?php echo $row_rsProducts['prID']; ? ) { ? You make a string with your dynamic statement and then EVAL it. http://www.php.net/manual/en/function.eval.php -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] chill out
At 4/3/2003 01:14 PM, [EMAIL PROTECTED] wrote: We subscribe to a few email lists on various languages. Why do people assume that because they subscribe to a mailing list with their work address that the mailing list must hold to their company's standards? This list would have to be the worst for anyone learning - the amount of sarcasm and flaming that goes on is huge. If it's the worst, you haven't been on many mailing lists. A word of advice, stay off Usenet. Just try and remember - everyone has to learn, if you feel a question is off topic or stupid - ignore it, theres no need to make the poster feel like an idiot. There is when the poster *is* an idiot. When I first came on this list, I lurked for a few weeks because most of my n00b questions were already being answered in response to other n00bs. But I knew that there weren't people who did as I did because the same questions would be asked over and over again, no matter how many times they'd been answered. However, in my naivete, I actually posted a scathing reply to someone who had given an RTFM to someone asking a really dumb question. Fortunately, the regular I bit into was bright enough to gently brush me off and make me rethink my position. As a result, it wasn't too long before I realized that RTFM is a perfectly appropriate response to many questions; a good number of the answers are already posted to the PHP.net manual, if not in the articles themselves, then in the comments below. This mailing list does not exist to do people's homework for them. I agree that this list should cater only to the PHP elite. If it did, I'd be lost because the help I've gotten here has been invaluable. But I got a lot of that help by reading other people's questions, not ignoring the other posts here. When someone posts a question that's just been answered, or asks, How do I print a variable on a page? then they do deserve a sarcastic response for not bothering to do the *minimal* amount of investigation on their own. And if sarcasm bothers you, then I find it a wonder you can function in normal society at all. People are sarcastic, and this is an open mailing list, not a closed corporate list. It'd be nice if everyone were nice, but it's not a requirement, and just because your company forces you to wear a suit and tie doesn't mean everyone you come in contact with has to as well. if you feel a question is off topic or stupid - ^or sarcastic ignore it, Sound advice. Take it. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Theme selector?
At 4/1/2003 08:49 PM, [EMAIL PROTECTED] wrote: Also, I've not convinced anyone where I'm at now to use smarty. In my mind they are penny-wise and pound foolish. The real little extra time you might need to use a template system is richly rewarded in code re-use and future changes to the site not to mention, imho, thinking better about what one is doing. You haven't convinced me either. Changing the included CSS file, if you're using CSS-P for your layouts, lets you re-use *all* of your PHP code. Including extra files for templates in sub-directories sounds like a terrible waste of server space to me. Plus, once you've created the CSS files, the rendering overhead is shifted to the client, saving your server the extra processing for a template. And as for better thinking, CSS-P lets me debug a lot faster because the individual sections are truly modular in both the PHP code and the finished output. I was hoping for some convincing reasoning for using Smarty templates over CSS, but code re-use and future changes aren't doing it for me since I get both of those in spades with CSS-P. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Theme selector?
At 3/30/2003 12:42 PM, Lars Tvedt wrote: i would have used templates: heres one http://smarty.php.net Liam Gibbs [EMAIL PROTECTED] wrote in message I'd store your themes in stylesheets instead. Question, Lars, does Smarty allow for easy template changing? I haven't used it very much. Otherwise, if you're using CSS-P for your site, it'd be a snap just to store a cookie that includes which CSS file the user wants for their theme and just change the header. style type=text/css media=all@import ? $cookieValue = $_COOKIE['templatecookie']; echo $cookieValue; ?.css;/style -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] file
At 3/28/2003 10:26 AM, Diksha Neel wrote: i have a simple program to open and write a file. but the file is not getting created. can anyone please spot the mistake? ?php echohi?how are u doing??; $fp = fopen (sandrew.html, w); string=htmlheadtitlehi/title/headbodyi am $string = fine/body/html; $contents=fwrite($fp,string); fwrite($fp, $string); -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Random Password Making.
At 3/28/2003 11:32 PM, Philip J. Newman wrote: Whats the best way to make a random password with 4 letters and 2 numbers? I don't know what the best way is, but I had fun doing this one. I filled the first 4 elements of an array with random letters by using the minimum ASCII value of a letter as my random base, and the maximum ASCII letter value as my random max (97 is a and 122 is z). Then did the same thing to pick two numbers and add those to the array as well. Then I shuffled the array to juggle the order the letters and numbers are in, and imploded it into a single string. Viola. ? // Pick 4 random letters for ($i=0; $i4; $i++){ $thisPassArray[$i] = chr(rand(97,122)); } // Pick 2 random numbers for ($i=4; $i6; $i++){ $thisPassArray[$i] = chr(rand(48,57)); } // Randomize their order shuffle($thisPassArray); // Implode the array into a password $thisPass = implode(,$thisPassArray); // Echo the password echo $thisPass; ? Now, of course, I didn't do any validation, ie. making sure the letters don't repeat, including capital letters, or anything like that. But, hopefully, this will give you a place to start. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php file writting ?
At 3/14/2003 12:53 PM, Ron Petty wrote: Here is the code, maybe I am just missing something (this is the part where it writes and then opens again... for($i = 0; $i count($users); $i++) { for($k = 0; $k count($grouplines);$k++) { $groupline = explode(:, $grouplines[$k]); if($groupline[0] == $users[$i]) continue 2; } $line = $users[$i] . :x: . ($user_ids[$i]+1000) .:\n; fwrite($h6, $line); } I may be wrong, but doesnt continue jump out of the loop? If so, you're jumping right over the part of your loop that writes to the file, hence nothing in the file. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php file writting ?
At 3/18/2003 11:46 AM, Steve Keller wrote: for($i = 0; $i count($users); $i++) { for($k = 0; $k count($grouplines);$k++) { $groupline = explode(:, $grouplines[$k]); if($groupline[0] == $users[$i]) continue 2; } $line = $users[$i] . :x: . ($user_ids[$i]+1000) .:\n; fwrite($h6, $line); } I may be wrong, but doesnt continue jump out of the loop? If so, you're jumping right over the part of your loop that writes to the file, hence nothing in the file. I tested this by moving the file writing lines into the conditional just before the continue 2 line; That way, if there's a match, it writes to the file, *then* skips out of the two loops. It worked just fine. for($i = 0; $i count($users); $i++) { for($k = 0; $k count($grouplines);$k++) { $groupline = explode(:, $grouplines[$k]); if($groupline[0] == $users[$i]) { $line = $users[$i] . :x: . ($user_ids[$i]+1000) .:\n; fwrite($h6, $line); continue 2; } } } -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PDF Creation
At 3/13/2003 01:05 PM, Christopher J. Crane wrote: I am just getting into PDF creation and I am having some issues. Can anyone send me a simple script that creates a PDF doc. I would like it to open in the browser after creation, not create a file. Try the EZPDF class. It does just that, serves it up in the browser instead of as a file. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] no phun intended!!!
At 3/9/2003 09:11 AM, Niels Andersen wrote: LOL I like PHP, but I also like wet girlies. But the two are not interchangable, which is a pitty, becouse sometimes I really could use a wet girl, and I only have PHP If god wanted geeks to procreate, women would be accept C includes. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] no phun intended!!!
At 3/18/2003 02:30 PM, Pete James wrote: Steve and Niels, I personally don't think that this sort of garbage has any place on this list. The PHP lists are for the promotion and assistance of the PHP community. In our small ways, we are all ambassadors for PHP and should behave as professionals. Having sexist and inappropriate comments like this does nothing for the community's perception, and IMO destroys credibility. Sexist and inappropriate? You would be offended because I insulted geeks? If I was a female coder, I would take great offense to these comments... but maybe that's just me. Ah, but the salient point, my PC friend, is that you are *not* a woman. And I take offense at your treatment of women as weak-minded children who need a man to stand up and speak for them. In the future, if you have a problem with someone's behavior on the list I suggest you take it to private Email instead of getting out your soap box and berating people as if you were a schoolmarm and they were children. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Rounding
At 2/21/2003 05:29 AM, Jason Wong wrote: To round to the nearest 5: Divide by 5 Round to the nearest integer Multiply by 5 Modulus by 5 Subtract the result from the original number. Of course, my way depends on whether you're rounding up or down. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] unexpected warnings - what do they mean? - phpMyAdmin - also posted on the phpMyAdmin mailing list...
At 2/4/2003 06:46 PM, you wrote: i am getting the following warnings after i try to inser data into some table cells i created. i have PHP Version 4.1.2 and MySQL 3.23.55. Apache 1.3.23. Redhat 7.3. oh, and i have php 4.3.0 installed, but i dont know how to make apche see it or use it. its ina different directory than the default redhat php which is what i am using now. anyway, anybody knwo what these warnings mean? It would help if we could see the affected lines of code. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP intereferes with my Javascript
At 1/3/2003 05:21 PM, you wrote: I have split a page up into three sections, header, content and footer. Header and footer are included in content via PHP. Header contains Javascript functions. Content and header both call the javascript functions. When i look at the source generated it looks exactly like before it was split. BUT the javascript generates errors. Does anyone have any idea why this might happen? When you include these headers, are all the files that are accessing them in the same directory? Are your references in your javascripts absolute or relative? If they're relative, and you change directories, the code breaks. But again, I haven't seen the code so I can't say. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Baffling output
At 1/3/2003 12:25 AM, Lightfirst wrote: Can someone explain to me why the loop that counts to 99 appears before the 5 by 5 grid in the following php code? Yes. ## else { ## echo td align=\center\ valign=\middle\ width=\15%\ height=\77\ border=\1\ bordercolor=\#00\; ## echo div align=\center\font size=\1\/font/div; ## echo Hello ; $i++; ## } //for else You start the TD tags, but whenever your conditional echoes Hello, you're not echoing the /TD. And when you come out of your loop, you never close your TABLE tag. I hope you also realize that you're opening and closing that DIV and FONT without putting the Hello inside of it. Here's a good tip someone gave me when I first started learning PHP: when you're dealing with HTML, it's a good idea to use \n at the end of your echoed lines and \t's at the beginnings to create staggered indentations, this makes it a little easier to read when you're testing the output. For example, try running this version of your code: ?php echo table border=\1\ align=\center\ width=\100%\ bgcolor=\#FF\ bordercolor=\#FF\\n\ttr\n; for ($r=0; $r5; $r++){ for ($c=0; $c7; $c++){ if ($c==0 || $c%7==0) echo \t\ttd align=\center\ valign=\middle\ width=\15%\ height=\77\ bordercolor=\#00\/td\n; else if ($c%6==0) echo \t\ttd align=\center\ valign=\middle\ width=\14%\ height=\77\ bordercolor=\#00\/td\n\t/tr\n\ttr\n; else { echo \t\ttd align=\center\ valign=\middle\ width=\15%\ height=\77\ border=\1\ bordercolor=\#00\\n; echo \t\t\tdiv align=\center\font size=\1\; echo Hello ; $i++; echo /font/div\n\t\t/td\n; } //for else }// for loop c } //for loop r echo \t/tr\n/table\n\n; for ($i=1; $i100; $i++) echo $ibr\n; ? Hope this answers some of your questions. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Odd Strpos Behavior
At 12/14/2002 12:50 AM, John W. Holmes wrote: And here's a good example of why you should always test each solution and time it to see what's better. I was recommending a preg_replace_callback solution which I thought, as a lot of other people would also think, is a lot faster that your own method of doing it. Thanks John, for both the time tests and for fixing my original method. I appreciate the help. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Odd Strpos Behavior
At 12/11/2002 08:09 PM, you wrote: Okay, so how do you know what to replace something like [author] with? What exactly are you doing again? I've forgotten the original question. :) Ok, got a sentence, like: a pile of [metal] 600 feet wide and 30 feet tall. On top of it is a [monster]. The items in the [] represent the names of files containing lists of possible results. So I need to grab the first one, metal, open up metal.php, grab a random item from it, such as gold, and replace [metal] in the original sentence with the result. I should now have: a pile of gold 600 feet wide and 30 feet tall. On top of it is a [monster]. Now, what I was doing before was strpos'ing the []'s and grabbing what as in between to be the file name, then repeating in a loop until I've eliminated all of the [] items. The reason I'm doing it in a loop is because the results of the metal.php random item may include their own [] items, which also need to be run exactly the same way. A result might be gold [objects] and then I have to run through the objects.php file and get a result from that. This is what I started with: ? $a = [adjective] [beginning]; // temporary item for testing $e = strpos($a,]); while ($e) { echo A: .$a.br /; echo E: .$e.br /; $f = strpos($a, [); echo F: .$f.br /; $tmp = substr($a, 0, $f); $table=substr($a, $f+1, $e-1); echo Table: .$table.br /; $a = substr($a, $e+1, strlen($a)); $dataFile = $table..php; //$b = getFileElement($dataFile); $tmp .= $b; $tmp .= $a; $a = $tmp; $e = strpos($a,]); } echo $a; ? That should work just fine. I cut out everything up to the first [ and add it to $tmp. Then I get the next sequence of characters up to the first ] and use it as a file name for the getFileElement function. Add the result to $tmp, add what was left after the first ], and viola. My problem is that, on the first loop through, strpos returns exactly where the first ] is, so I can chop up to that no problem. However, the second time through the loop, it's one off, which breaks the logic of the loop, I end up with beginning] as my file name. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Fwd: RE: [PHP] Odd Strpos Behavior
At 12/10/2002 03:43 PM, you wrote: John's suggestion of using '{', and '}' as the tag delimiters was to simplify the regex. You can continue to use '[', and ']' as your delimiters, just change the regex accordingly -- and don't forget that '[', and ']' needs to be escaped. Ah, all right. That went completely over my head when he suggested it. Thanks for clarifying. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Odd Strpos Behavior
At 12/9/2002 07:20 PM, you wrote: It'd be easier to use a regular expression for something like this. Something like this would work (from PHP Architect): $s = I am going to be {a} years old on the {b}th of November, {c}.; $a = array( a = one hundred, b = seventeen, c = two thousand two); $z = preg_replace(/\{([a-z]+)\}/e,\$a['$1'],$s); echo $z; Output: I am going to be one hundred years old on the seventeenth of November, two thousand two. Now that I've been shown what you meant, and had a chance to play with it, I can see that it's not really going to work out for me. The reason is, I don't know in advance what the contents of the [] will be. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Odd Strpos Behavior
I'm getting a really weird return from Strpos. What I'm doing is this, and anyone familiar with any of the table-runner programs for RPG's will know what I'm getting at here, I have a fields, like [adjective], [noun], etc., which I need to pull out and replace with values from included php files. Ok, so I have a string with those fields in it, and I have a loop that scans through the string for the first occurence of ]. On the first pass, strpos returns the first instance of where ] shows up in the string. Beautiful. I cut out the field, I create a filename, and it works just fine. However, on the second run through the loop, instead of returning where ] is in the string, it returns where ] is +1. Huh? It's throwing off my script. Obviously, I could compensate by keeping a counter, but really, I shouldn't have to. Anyone know why I'm getting this? Here's the code. I echoed the values so I could see what was going wrong. ? $a = [adjective] [beginning]; $e = strpos($a,]); while ($e) { echo A: .$a.br /; echo E: .$e.br /; $f = strpos($a, [); echo F: .$f.br /; $tmp = substr($a, 0, $f); $table=substr($a, $f+1, $e-1); echo Table: .$table.br /; $a = substr($a, $e+1, strlen($a)); $dataFile = $table..php; $tmp .= $dataFile; $tmp .= $a; $a = $tmp; $e = strpos($a,]); } # echo $a; ? This is running on Apache, php4.2.3 -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Fwd: RE: [PHP] Odd Strpos Behavior
At 12/9/2002 07:20 PM, John W. Holmes wrote: It'd be easier to use a regular expression for something like this. Something like this would work (from PHP Architect): I appreciate that, but considering I'm working from about 1200 files that already exist and use [] to denote table names, I kinda gotta do it this way. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Bad File Mode?
At 11/28/2002 01:51 PM, Ernest E Vogelsinger wrote: ? $data = mtype=XMLDOCoutfile=true; $dataFile = http://www.healthtvchannel.org/courses/pay/data/test.xml;; $fileSize = filesize($dataFile); Ah. It is a local file, I was just using an absolute reference for it. However you do not need to know the size of the file to read it - simply do it in chunks: $dataFile = http://www.healthtvchannel.org/courses/pay/data/test.xml;; $fp = fopen($dataFile, rb); $strFile = null; while ($chunk = fread($fp, 524288)) // 512 kB chunks modify as needed $strFile .= $chunk; fclose($fp); Thanks. I'll definitely give that a try. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Bad File Mode?
I'm still trying to get a file posted to another server, but I seem to have run across an odd snag, and I was hoping someone can point out where I've gone wrong. Here's the code: ? $data = mtype=XMLDOCoutfile=true; $dataFile = http://www.healthtvchannel.org/courses/pay/data/test.xml;; $fileSize = filesize($dataFile); $fp = fopen($dataFile, rb); $strFile = fread($fp, $fileSize); fclose($fp); $osbURL=https://partners.netledger.com/SmbXml;; $ch = curl_init(); $res = curl_setopt($ch, CURLOPT_POST, 1); echo Set Post: .$res; $res = curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); echo br /Set Follow: .$res; $res = curl_setopt($ch, CURLOPT_VERBOSE, 1); echo br /Set Verbose: .$res; $res = curl_setopt($ch, CURLOPT_URL, $osbURL); echo br /Set URL: .$res; $res = curl_setopt($ch, CURLOPT_POSTFIELDS, $data.mediafile=.$strFile); echo br /Set Postfields: .$res; $res = curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); echo br /Set ReturnTransfer: .$res; $result = curl_exec($ch); curl_close($ch); echo $result; ? What I'm getting is Warning: stat failed for http://www.healthtvchannel.org/courses/pay/data/test.xml (errno=2 - No such file or directory) in /usr/local/www/vhosts/healthtvchannel.org/htdocs/courses/pay/posttest.php on line 20 I'm positive the file exists, and if I cut and paste the URL from the error to a browser window, I can see the file. What am I doing wrong? -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Multiple page form
At 11/26/2002 10:42 AM, Shane wrote: It's been a while since I have done any PHP work. I am creating an online employment application using multiple forms for a client. I was going to use PHP. I don't remember if I need to pass variables along with the form for each page, or can I just call them on the last page. Shane, I recenty did a multi-page PHP form for a site that couldn't use a database. What I ended up doing in my own cludgy way was creating hidden form fields with each post, ie. extracting the http_post_vars and creating an input type=hidden for each posted answer. This carried all the filled out questions across the pages, and, of course, I could echo answers to questions that were already given if the user went back to a previous page. There was an additional hidden field for pageNo. The form POSTed to itself and INCLUDEd the section, ie. block of questions, specified by the pageNo. The last page simply put all the answers together into a tab-delimited file and fired it off to the people who needed to see it so they could import it into spreadsheets. The functional project is at: http://alaskayouthmediaproject.org/survey/ And I'll gladly send you the code if you want, just Email me off the mailing list. It's far from perfect code, in fact I'd only been using PHP for two weeks or so when I wrote it, but I've gotten compliments on the ingenuity of it. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Newbie mail () question
At 11/22/2002 04:30 PM, Duncan Ellwood wrote: Can I personalise this a bit to display the From: as the email address that the user has supplied i.e $Email You can specify the FROM field in the headers before you call the mail() function. It's all in the manual. http://www.php.net/manual/en/function.mail.php See Example #2. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] No Reply From cURL
I apologize for being a pest about this, I'm just not getting it. I'm attempting to open a connection to NetLedger to post an XML file. I'm attempting this basic code, which is pretty much what I find everywhere: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, https://partners.netledger.com/SmbXml;); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_VERBOSE, 1); curl_setopt($ch, CURLOPT_POSTFIELDS,$postData); $result = curl_exec ($ch); curl_close($ch); echo $result; And I'm getting no result back so I can't even see what error I'm getting. I'm using PHP 4.2.3, with OpenSSL/0.9.5a and compiled as follows: './configure' '--with-apxs=/usr/local/www/bin/apxs' '--with-mysql=/usr/local/' '--with-gd=/usr/local/' '--with-freetype' '--with-imap' '--with-curl' Also, how do I include a file in the postData? Can someone point me to a good page about HTTP where I can read about doing that? -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] No Reply From cURL
At 11/21/2002 11:55 AM, greg R wrote: I don't think cURL is very intuitive. Well, I'm glad to see someone else say that. Makes me feel less retarded. Can you at least echo a response code from your function, such as $res = curl_setopt($ch, CURLOPT_URL, https://partners.netledger.com/SmbXml;); echo $res; That should at least tell you, if nothing else, that you could successfully get into the service. If it's a success, should return a 1, I think. Thanks Greg, that's a start. Yes, it's returning a 1. So where do I go from here with troubleshooting? -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] No Reply From cURL
At 11/21/2002 03:18 PM, Bret L Conard wrote: Really appreciate the help Bret. But I've still got some problems: (FYI - I am using authorize.net, so some of the response parameters may be different for you) Actually, I appreciate the fields demonstration because it made me realize I was missing two fields from the post, although Netledger is our accounting system, not the payment gateway, so I was able to dump the CC and eCHECK junk from the code since that's already been processed and written into the data file. We're using PayflowPro, and I've set up their Silent Post to feed to a script on our site that generates an XML file in NetLedger's Small Business XML format based on the data returned by PayFlow, and only if the purchase is approved. It's that XML file that I need to post, along with two identifying fields. NetLedger is then supposed to take that uploaded XML file and turn it into a sales record in our accounting. Does anyone know how to work a file into a cURL post? I've already tested the XML file numerous times (NetLedger has a way to upload the XML files from your desktop), and I know it's formatted properly. $ch = curl_init(https://secure.website.net/script_or_application;); // URL Ok, I was setting the URL in a CURLOPT. From what I understand, that shouldn't make a difference, right? //My responses are delimited with | (pipe) $parts = explode(|, $resp); //creates array from reponse Where are you setting this? Ok, I've taken a shot at using your example and just removing the CC stuff. What I came up with, then, should work, right? Nope. Still no response. Here's my code: $data = mtype=XMLDOCoutfile=true; $ch = curl_init(https://partners.netledger.com/SmbXml;); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $resp = curl_exec($ch); curl_close ($ch); $parts = explode(|, $resp); echo resp: .$resp.br /; echo parts: .$parts.br /; foreach($parts as $key = $val) { echo b$key:/b $val br\n; } Now, granted, I'm not using | as a delimiter. At least, I don't think I am. Still, $resp should echo if there's something in it, right? What I get out of that is: resp: parts: Array 0: Parts is the only one that echoes as I expected it to. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Fwd: RE: [PHP] No Reply From cURL
At 11/21/2002 05:16 PM, Jonathan Rosenberg wrote: I suspect your problem is that CURL is not built with SSL support. To test this, replace the https:/.../ with a reference to a non-SSL URL (http://.../). If you get a return that, you need to build CURL with SSL support. Indeed it does. :( I had thought I compiled it correctly, but as I've already demonstrated, my knowledge in the area is far from complete. Let this be a lesson to all web department managers: if your lead programmer becomes a pothead hypochondriac and goes on disability, don't put the graphics guy in charge. Thanks for the help all. I'll try to read up on how recompile cURL correctly, see if I can't discover where I went wrong. Couple questions, however: 1. I'm assuming I'll have to recompile PHP once I do this? Or will a change in cURL not affect it? 2. Still confused on appending files to posts, so any help on that would also be appreciated. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] No Reply From cURL
At 11/21/2002 06:21 PM, Bret L Conard wrote: one of these should work to import the file The following options expect a file descriptor that is obtained by using the fopen() function: CURLOPT_FILE: The file where the output of your transfer should be placed, the default is STDOUT. CURLOPT_INFILE: The file where the input of your transfer comes from. as in: curl_setopt($ch, CURLOPT_INFILE, fileName.XML); Thanks. I was using INFILE before. Just wasn't sure if that was right. However, I've managed to narrow down my problem to cURL not compiling correctly. I had compiled it before through a vinstaller and it used the default ssl directory, which isn't where OpenSSL is located. So I downloaded a new copy, configged it with the right directory, and ran a make test on it. And all my HTTP and HTTPs connection tests failed. So now I'm off to bother the people on the cURL mailing list and find out what's going on. Thanks for the help. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: cURL with PHP Help?
At 11/20/2002 08:46 AM, you wrote: Have you tried this: http://curl.haxx.se/libcurl/php/examples/ Yeah. That's where you end up from the Sourcefourge site. There's a sample on there for a multi-part post, but I'm confused as to how it works. Would help if you posted some code, or errors or something. I've used curl in several PHP applications successfully. I'm not getting any errors. And, as I said, I'm just not getting cURL, so as far as code, I've been monkeying with just about every example I could find. But again, I'm not asking for debugging of my code, I'm just trying to find something to help me understand how the cURL functions in PHP work. Snoopy is actually a really awesome implementation of curl in php: http://sourceforge.net/projects/snoopy/ I replaced several of my functions with snoopy classes. Thanks. I'll definitely take a look at that. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] cURL with PHP Help?
Ok, I'm going to break down and ask for help. I'm trying to post an XML file to NetLedger through HTTPs, but cURL isn't returning any errors when I run through PHP, and the file isn't getting there. Can someone point me in the direction of a site with some *good* help on how to do file posting with cURL under PHP? And when I say good, I mean to say that I've already been to PHP.net and the list of CURLOPT's without explanation of how to use them is not helpful to someone at my skill level. Neither is the example on Sourceforge. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] decode
At 11/18/2002 07:55 AM, you wrote: I have document in encryption type : B*C*N**N but I don't know how do abbab abbab Well, assuming that the above isn't someone sending you The Kinks, and flogging myself for replying to an off-topic post... A simple Google search should have directed you right where you needed to be. BaCoNiaN is a type of cypher developed by Francis Bacon. It's a simple cypher somewhat akin to binary, but from right to left. The right hand column represents 1s, the second from the right is 2s, the third is 4s, and so on. But the cypher starts at zero, so an A would be a. B, as the first letter, would be b. C would be aaaba. E is the fourth letter, so it would be aabaa. And so on. Hopefully you can figure out the rest of the cypher. A simple loop with str_replace should be enough to Decode the cypher and output a string. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] newbie's question
At 11/15/2002 06:09 PM, you wrote: Don't know about a correct way but you can use if(empty($variable)) I may be crazy, but wouldn't if ($variable) work just as well? If the string is empty it'll return a negatory on that check. Lemme double check that. $testVar = ; if ($testVar) { echo Yes; } else { echo No; } Yeah, ok. That ran just fine under 4.2.3. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] newbie's question
Err... sorry. The logic was there but my fingers got a bit ahead of my brain. The check works, but if you want to just check if it's empty turn the conditional to a negative, like so: if (!$testVar) { etc. } That makes it If NOT $testVar I may be crazy, but wouldn't if ($variable) work just as well? If the string is empty it'll return a negatory on that check. Lemme double check that. $testVar = ; if ($testVar) { echo Yes; } else { echo No; } Yeah, ok. That ran just fine under 4.2.3. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Who can tell me where I can get the cracked Zend Encoder3.0 ?
At 10/31/2002 03:00 PM, John Wards wrote: On Thursday 31 Oct 2002 3:00 pm, jianking wrote: Who can tell me where I can get the cracked Zend Encoder 3.0 ? Are you a muppet? This list is run by the people who make Zend Encoder! FOOL Ah, my first laugh of the day. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Annoying Install Problem
I'm hoping someone here might be able to spot what I'm doing wrong with my installation. This is new to me and I've done the best I can by following the documentation, but I can't find a solution to this problem anywhere, even Googling for the error. We're trying to upgrade our version of PHP on a remote server so that we can use the cURL libraries. When I try to install PHP, I get an error and it tanks. The system is FreeBSD running Apache. The PHP version is 4.2.3. The config is: ./configure --with-apxs=/usr/local/www/bin/apxs --with-mysql=/usr/local/ --with-gd=/usr/local/ --with-freetype --with-imap --with-curl And this is the tail end of the make output: %/bin/sh /tmp/phphold/php-4.2.3/libtool --silent --mode=link gcc -I. -I/tmp/phphold/php-4.2.3/ -I/tmp/phphold/php-4.2.3/main -I/tmp/phphold/php-4.2.3 -I/usr/local/www/include -I/tmp/phphold/php-4.2.3/Zend -I/usr/local/include -I/usr/local//include/gd -I/usr/local/include/c-client -I/usr/local//include/mysql -I/tmp/phphold/php-4.2.3/ext/xml/expat -DMOD_SSL=206104 -DMOD_PERL -DUSE_PERL_SSI -DUSE_HSREGEX -DEAPI -I/tmp/phphold/php-4.2.3/TSRM -g -O2 -prefer-pic -o libphp4.la -rpath /tmp/phphold/php-4.2.3/libs -avoid-version -L/usr/local/lib -L/usr/local//lib -L/usr/local//lib/mysql -R /usr/local/lib -R /usr/local//lib -R /usr/local//lib/mysql stub.lo Zend/libZend.la sapi/apache/libsapi.la main/libmain.la regex/libregex.la /tmp/phphold/php-4.2.3/ext/ctype/libctype.la /tmp/phphold/php-4.2.3/ext/curl/libcurl.la /tmp/phphold/php-4.2.3/ext/gd/libgd.la /tmp/phphold/php-4.2.3/ext/imap/libimap.la /tmp/phphold/php-4.2.3/ext/mysql/libmysql.la /tmp/phphold/php-4.2.3/ext/pcre/libpcre.la /tmp/phphold/php-4.2.3/ext/posix/libposix.la /tmp/phphold/php-4.2.3/ext/session/libsession.la /tmp/phphold/php-4.2.3/ext/standard/libstandard.la /tmp/phphold/php-4.2.3/ext/xml/libxml.la TSRM/libtsrm.la -lpam -lc-client4 -lmysqlclient -lcrypt -lpam -lgd -lcurl -lcrypt -lm -lcrypt -lcurl -lssl -lcrypto Zend/.libs/libZend.al: object Zend/.libs/libZend.al(zend_language_parser.lo) in archive is not object *** Error code 1 Stop in /tmp/phphold/php-4.2.3. *** Error code 1 Stop in /tmp/phphold/php-4.2.3. So what I'm hoping for is 1 of 3 things: either someone can point me to a page that addresses the problem I'm having, someone knows where I screwed up and can tell me how not to do it in the future, or someone tells me they need more information, in which case I'll do my best. Thanks for the help, ~Steve-o -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Including Text File in PHP/HTML Template
At 9/30/2002 04:39 AM, Rick Beckman wrote: On line 6, I have the list of musicians in the song. Example (ignore the quotes): Doyle Lawson -- lead vocal; Dale Perry -- bass vocal Is there a way to make it so that, when I include line 6 in my PHP template, the ; will be replaced with a line break so I get one musician per line in the HTML output? $line6 = str_replace(;, \n, $line6); If you're talking about HTML line breaks, just substitute br / for \n. Lines 7 and so on are the lyrics. The text file has one line per line (makes sense, right?) and a blank line between sections of the song. I have the script set up to read all the lines from 7 on, but it jumbles them all together, ignoring the line breaks. Is there a way to script PHP to add the line breaks, or should the line break HTML just be inserted everywhere needed in all my separate files? Where is this jumbling that you're talking about, in your HTML display? HTML browsers don't recognize line-break escape characters. Yes, you would need br / if you want it to display in HTML. As far as the browser's concerned, there's no difference between HTML served cold and HTML generated by PHP. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] vulnerabilities??
At 9/30/2002 06:17 PM, you wrote: Is there any version of php and apache for which there are no known vulnerabilities?? It's the vulnerabilities you don't know about that get you. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Virtual includes
At 11:12 AM 8/26/2002 +0200, you wrote: I'm trying include .php files which reside in alternative directories or sub-directories. Such as a file which reside in www/chat/page.php, and for this page I would like to include a file which resides in www/forum/include/ Using $DOCUMENT_ROOT has always worked just fine for me when working in other directories. It's much easier to have a solid point of reference than have to change levels. For example: $userDataFile = $DOCUMENT_ROOT/forums/users/{$userName}.php; would look for the file in $userDataFile in www.mypage.com/forums/users/ -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Moving Files - Stupid Error
Hey all, I need a little help with moving a file on the server after an upload. Our company site is hosted, so I don't have full access to the configuration files, but I can do a PHP_info dump if you need more clarification. Using 4.0.1pl2. What I'm doing is uploading a file from a form, and that goes through just fine. I can print the file name to a database, along with the size. The trouble is, no matter how I try to move it from the tmp directory, I get the same error. I've tried referencing it by the name given in the form, I've tried referencing it by $_Files. No matter how I call it, it never seems to go back to the tmp directory to look for the file. Here's a sample error: Warning: Unable to create '/test/data/test.txt': No such file or directory in /usr/local/www/vhosts/healthtvchannel.org/htdocs/test/upload.php on line 17 That's with using: copy({$UploadedFile},/test/data/.$UploadedFile_name); $UploadedFile being the name I'm using. Both variables seem to be returning correctly. $UploadedFile returns the temp name, and $UploadedFile_name returns the actual name. The file is also far under the maximum file size. The /test/data has Nobody write permissions, I know because I'm writing to a file in it with another script, and there's no file in there with the same file name to cause overwriting ownership conflicts. So where am I being stupid? Here's the full code: ? print($UploadedFile); print(br /); $filename = $UploadedFile_name; print $filename was uploaded successfulybr\n; $realname = $UploadedFile_name; print realname is $realnamebr\n; print copying file to uploads dirbr\n; copy({$UploadedFile},/test/data/.$UploadedFile_name); ? form enctype=multipart/form-data action=?$php_self? method=post input type=hidden name=MAX_FILE_SIZE value=4096 input name=UploadedFile type=file input type=submit value=upload -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Multi-Part PostToHost?
First, thanks to the people who've helped me so far. I'm a UI designer who's suddenly found himself responsible for a very large website that integrates services from no less than four different providers, and I've been dumped into learning PHP on my own under a heavy deadline. Anyway, I'm catching data from a form post and writing an XML document out of it. That's done, the server can process the XML correctly. But, from there, I need that file to be appended to a POST to a script on another server for processing. I've tried looking up how this is accomplished, and Richard Lynch was kind enough to point me in the direction of PostToHost, which got me off to a jump start on how to find more information. So now I'm at a point where I need help. After opening the socket, can I declare a multi-part POST and then start sending the data? Such as: fputs($fp, Content-Type: multipart/form-data; boundary=AaB03x\n); fputs($fp, --AaB03x\n); fputs($fp, Content-Disposition: form-data; name=variable1\n); fputs($fp, \n); fputs($fp, Variable 1 Data\n); fputs($fp, --AaB03x\n); fputs($fp, Content-Disposition: form-data; name=files; filename=myFile.xml\n); fputs($fp, Content-Type: text/plain\n); fputs($fp, \n); fputs($fp, ... contents of myFile.xml ...\n); fputs($fp, --AaB03x--\n); And again, I've only been doing PHP a week, so if I'm following a totally wrong track here, feel free to smack me around. As always, any help is greatly appreciated. ~Steve-o -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help a n00b with Server-to-Server file transfers?
Ok, here's the situation: I've got a script that's catching a backdoor post from Verisign. The script then generates an XML file based on the information that's posted. The goal being to make Verisign and our online accounting system pseudo- integrated so that as soon as a post comes through Verisign, the information is passed along to the accounting system and added to the ledger, saving us the time required to manually post those entries. So the XML file is written correctly now, and we've tested it by uploading it manually. The next step here is to pass that XML file from our server to the accounting system's server, where it'll be processed. The way the system is set up, they have a DLL that catches a form posted from a browser that also attaches the file. I'm hoping to use that same DLL to post from our server. I've been trying to read up on socket functions, but all I can find are the function formats listed on the PHP.net documents. That's great for reference, not so great for learning how it's done. I don't need an answer on how to pass the file, but I would appreciate some help in the way of a pointer to where I can go to read up on how I can accomplish this. Is there a particular tutorial I can read that's relevent? Perhaps a sample script available that I can peruse to see how someone did something similar? Any help would be appreciated. ~Steve-o -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php