Re: [PHP] Weird url passing what does it mean, am I hacked?
If your using firefox, are you sure its not some addon, does this URL appear in the HTML source? Clive Terion Miller wrote: I noticed yesterday that sometimes I was seeing a strange url passing at the bottom of the browser when clicking around my site I'm working on while watching the page loads, its calling to mouserunner.com and I went to the site and it is a bunch of links, my site is on a private server for a large media company, clues on what this means and where to look to stop it, what's it doing scraping my site or something? Thanks folks... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Get Money Fast with the Government Grants
Dora Gaskins wrote: If you have received this email, take a time to really read it carefully! American Gov Money More spam, can't we have the maillist software require people to register before posting? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Make New-Age Money Online with Google
Ashley Sheridan wrote: On Sat, 2009-01-24 at 10:14 +0200, Dora Elless wrote: That's why I am sending this email only to people I know and care about. And they send to a mailing list. Come again? So Funny, they went through all the trouble of signing up, unless hey have bots now that can sign up to mailing lists? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MySQL class. Thoughts?
Chris wrote: That won't tell you where a query comes from ;) Add a debug_backtrace into the class to also pinpoint where the query was called from. Complicated queries built on variables (or even just long queries built over multiple lines) will be hard to find just by looking at the mysql query log. I agree with chris and I do the same thing, also with a class or a wrapper function/s that handle your queries you can also decided on what databases the query should run, say you have Master-Slave replication setup with mysql, you could run selects on the slaves and updates/delete in the master without the class deciding which one it should run on Clive -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Please explain: index.php/index/index
leledumbo wrote: Is this web server specific? I can't get it to run under Microsoft IIS, but it works flawlessly in Apache. IIS 6 and below dont have an option like mod_rewrite, apparently IIS 7 does, I haven't tried it yet. There are a number of 3rd party apps that can add this functionality to IIS 6, some are free and some paid for, Im currently using Isap/rewrite from helicontech which works for my needs ( zend framework). Clive -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] session mysteriously killed
Hi we have an web based intranet system, users started reporting that they kept getting logged out, and the log outs were happening randomly. There is no coded any were that refers to sessions other than the login/logout and header file. Ive increased the session.cookie_lifetime to something stupid like 6 days, it was initially zero,, I might set it back to this, I also increased the session.gc_maxlifetime to a huge value, but still the problem persists. I have a bit of code in the header (where we check if the user has valid session credentials) logging messages when someone is logged out and from what file they were accessing with they got logged out, there is no discernible pattern, Im stumped, Does anyone have any idea how the session variables can be disappearing? Clive -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session mysteriously killed
c...@l-i-e.com wrote: Are you perhaps storing the session data in a DB? No its using the file system If the field type is, say, text, and you put something large in $_SESSION, you'll have truncated data, the session manager can't unserialize it, and you will have a silent failure when they try to do their next task -- They get logged out and there it is. Add a custom error handler and you can track what is going on, by logging each function call to the handler. that may be the only option here, the intranet app is being replaced, so Im trying not to do much work on the old one, just this strangeness is getting annoying. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Client/Server Printing
Ideally you want the document to print with the least amount of click or without having to open up 3rd party applications, would it be possible for the server to print to documents, I have done something like this before on a windows machine. Clive Paul M Foster wrote: I'd like a side check on what I'm doing to print on our internal network. We have an internal server/site which uses PHP code I've written to run the business-- invoicing, A/P, inventory, etc. Some things, like invoices and reports, need to be printed. Now remember, the code is on the server, and we access it from our client machines on our desks. When we print, we do so to our local printers, attached to the client machines. So the best way I could think of to making printing work was to generate PDFs of whatever needs to be printed, dump the PDF on the server, and provide a link to the PDF on the web page. The user clicks on the generated PDF, and his/her browser opens up Acrobat or xpdf, and prints from that application to their local machine. Is that a reasonable way to implement this? Any better ideas? Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session mysteriously killed
further to my last email, the bit of code that checks if the person is logged in looks something like this: if ( isset ( $_SESSION['loggedin'] ) ) { //check some other session variables } else { //log reason for logging the user out //redirect to login page } The variable, $_COOKIE['PHPSESSID'], has a value when a log out occurs and when I check the session save path, a file exists that corresponds the PHPSESSID sent via the cookie and it has all the right values, so $_SESSION['loggedin'] does exits and has a value. Its almost like php has a problem accessing the sess_ file sometimes. Clive -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can I make EasyPHP on Windows allow remote connections?
Rahul wrote: I have EasyPHP installed on my Windows system and can connect to the php+mysql using localhost in the browser but I was wondering if I can connect to this computer (which is at my office) from my home. I have a web address alloted to my computer at office. If that 'web address' is a public ip address or uri then it should not be a problem, otherwise your going to need to configure the internet gateway at work to route http (or any other port you choose) to your desktop at work, this is not a php question by the way, best to brush up on your network knowledge. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] RSS feeder in PHP5?
Richard Heyes wrote: Is there something in PHP5 which can generate the RSS feed? You don't need an extension to help you generate an XML feed. You dimply output XML data instead of HTML and send an appropriate content type header, eg: header('Content-Type: text/xml'); I was just about to send something similar :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Import files from directory
Merlin Morgenstern wrote: Has anybody an idea on how to do this? Thank you for any hint. I searched for this in google linux watch for new files and found this: http://www.linux.com/feature/150200 Clive -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Printing
Dan Shirah wrote: Hello all, Could someone please point me in the right direction for printing files through PHP? On I project I recently worked on, I used php to read a template file (rtf) and makes some changes and then save it in a folder on the server. This was a windows machine and I used a small program called batchprintpro. It simply monitors a directory and prints any new file that should appear. Its quite configurable and seems stable enough to print a few hundred documents per week. Clive -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Credit Card processing: Chase PaymenTech
phphelp -- kbk wrote: Anybody have modules, code, tips, land mines, or any other information for doing credit card processing with PaymenTech that you would be willing to share? Ken - I think your first step is to find another provider, support is everything, your code can be 110% correct, but if there is 1 item wrong in the comms you have with PaymenTech, then you can spend hours if not days with a broken application. This recently happened with me and HSBC bank in the UK, rubbish support, my code look right, but nothing worked, until after a number of days I managed to get through to one of the developers of there payment gateway system, he was able to a make a few changesto the xml I sending and just like that I was able to process payments. Move providers Clive -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Variable name for constants?
Anders Norrbring wrote: I've been experimenting with having a varaible constant name, but failed miserably... Can I please have a pointer? What I'm trying to do is something like this: $name = home; Then read the constant IMG_HOME, like IMG_$name, I'm not sure I make myself understood, but I hope so.. Anders. I dont think you can do that with a constant, but you can do this a normal variable: $test = 'the value of test variable'; $var ='test'; echo $$var; // will echo $test; Clive -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Variable name for constants?
I dont think you can do that with a constant, but you can do this a normal variable: I stand under correction form my previous email, it can be done: define('TEST', 'the value of constant TEST'); $var= 'TEST'; echo constant($var); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Foreign Keys Question
Colin Guthrie wrote: 'Twas brillig, and tedd at 11/12/08 18:46 did gyre and gimble: As for my Foreign Keys Question, I think the answer is that it enforces rules upon the configuration (i.e., deleting, altering, and such), but does not provide any significant service beyond that. Well that's a fairly significant service in itself. The whole deleting data case is where FK's have saved me significant amount of coding. The ON DELETE CASCADE option is key here... DELETE FROM students where student_id=1 will remove all traces of that student from the db... all the course they've attended, all the instructors who have taught them etc. keeps things nice and tidy without having to put the structure in your code all over the place. Col Is it just me or does anyone else here not like deleting from a database, I normally have a status field to indicated if a row has been deleted. What about historical data, would you not want to know that studentX was enrolled at some point in the past, if you just delete that student and all related data how would you know this? You could also have a 2nd database with the same table structure and move old/delete data into there. Clive -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Foreign Keys Question
Robert Cummings wrote: It depends on the data. Certainly for student enrolments I would want a paper trail (so to speak) and would just set a status field. But if it was say, an online shopping cart or cached data... I'd just purge it. Cheers, Rob. yes - you are right, I was just thinking about the student enrolment scenario :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need help on MySQL query
Rahat Bashir wrote: I need your help on writing a MySQL query. I see nothing php related in your question, try a mysql list. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] sms interfaces?
Rene Veerman wrote: hi, i'd like my app to send sms warnings of some events. if you know of a free / cheap sms service that can be called from php, please let me/us know. u earn extra points if it can send to dutch phones / any phone in the world ;) I have used these guys successfully before, bulksms.com and I know they have good coverage of the globe. Some mobile operators allow you to send a text to their users as an email for free ,ie [EMAIL PROTECTED], Clive -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: php framework vs just php?
Tony Marston wrote: I agree that finding the right framework to use can be very difficult, which is why a lot of programmers (like me) prefer to roll their own. But if you can find an off-the-shelf framework that does the job it can save you an awful amount of time. I agree with Tony. I think I have written many of my own 'frameworks' over the years, one mistake I made was never adding on to an existing one as I always thought I could do better 2nd ,3rd or Nth time around. I have recently had some exposure to the Zend Framework and I must say that I do like it :) , In particular I find the Zend_Form component very useful. Generating, validating and then inserting/updating data is super easy. This weekend I started a new project and started hand coding a login form, then though wth am I doing, a few lines of code and Zend_Form had my login form up and running. Im not saying that a custom framework is the right way, just that I would choose one thats considered a loosely coupled framework So you can choose what parts you want to use or not use, this is why I like the ZF, it allows me to choose my own toilet paper to wipe my ass with or even if I should give it a wipe not that I wouldn't. Clive -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Reading a Word document from PHP
Hi I know the new microsoft docx format is an xml document, so you could probably use the xml parser with that. Any chance you can get them to use a rtf file instead of a word file to convert to pdf, rtf is mostly readable text with some control words thrown in for formatting. clive Ashley Sheridan wrote: Hi All, I recently asked a question regarding reading a PDF with PHP. I've tried Zend_pdf, but all this is able to give me is the number of pages in a PDF, and cannot extract the text from the PDF files I have. I thought I'd try a different method, and try to extract the text straight from the Word document which is used to generate the PDF. Does anyone have any experience with this sort of thing, or enough to suggest a library which is capable of this? Ash www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Scope of the variables around PHP class
Define a class function and pass the array via this function or pass it via the classes constructor. VamVan wrote: Hello Guys, I have a problem here. I hope you can help me resolving it. Please see the code below array.php has $array1 = ('hello'='heelo',) require_once('array.php'); class Classa { } How can I access the array values in my class? I want to understand the scope. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Adding encryption to passwords
Per Jessen wrote: We use md5 for that sort of thing. there is also SHA-1 bit more overhead, bit more secure than md5 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] check if a file is included
I have a file called interceptor.php, which I would like to make use of in two ways 1. either call it directly from the browser or 2. included from another file I know I could use something like this to see if it was called via a url like http://www.site.com/interceptor.php : if (strstr('interceptor',$__SERVER[REQUEST_URI])) { // url } else { //probably included } but I would like to know if there is a neater, cleaner, sparkly way of doing this. Thanks Clive -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] check if a file is included
actually $_SERVER[script_name] is probably better if not being used from a webserver. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] geolocation
Hi, Have any developed a site that determines a users location based on IP address, Im not looking for accurate locations, just what country they are coming from. I know I could possible get a list of IP blocks allocated to countries or make use of some web server to get the information, I just want to know how others are doing this? If are using a specific method and know it to be robust and up to date please let me know. Thanks clive -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] loop weirdness
I presume you mean you see all the print_r's for each row and that you only see one row echo'd out in your html? You have your brackets in the wrong place, it should be something like this: if ($f_date != ) { while($row = ifx_fetch_row($info)) { //set your variables //echo out your html } //end while } //end if Dan Shirah wrote: Hello all! I'm having some weirdness with a loop. I am adding an conditional statement to my script to see if a condition is met before running a loop. All of the code up to this point works great so I have not included it since it is very long and extensive. Basically I have a query that runs and is output to $info. This is where the code below picks up. Whenever I add the if() I only get one result returned. But if I simply delete the if() statement I get all of the rows returned. Is there some weirdness where the closing backet of the if() statement gets interpretted by PHP to be the closing bracket of the while loop? print_r($row); does display all of the results from my query so I know they are in there. So the only thing I could think of is the curly braces being used for the while() before the if() ?php if ($f_date!=) { // Start of IF while ($row = ifx_fetch_row($info)) { // Start of While $case_date = $row['caa61140005']; $case_type = substr($row['caa38840002'], 4); $case_id = $row['caa443400018']; $case_num = TRIM($row['caa44340041']); $case_title = TRIM($row['caa44340002']); $case_category = TRIM($row['caa443400013']); print_r($row); } // End of IF ? tr td width='300' id=?php echo $case_num; ? height='13' align='center' class='tblcell'div align='left' id=?php echo $case_num; ?img src=Images/Next1.gifa href=javascript:caseDetail('?php echo $case_id; ?','?php echo $case_title; ?','?php echo $party_name; ?','?php echo $case_num; ?')?php echo $party_name.br /\n.$case_num; ?/a/div/td /tr ?php } //End of While ? Any ideas? Thanks, Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] loop weirdness
I presume you mean you see all the print_r's for each row and that you only see one row echo'd out in your html? You have your brackets in the wrong place, it should be something like this: if ($f_date != ) { while($row = ifx_fetch_row($info)) { //set your variables //echo out your html } //end while } //end if Dan Shirah wrote: Hello all! I'm having some weirdness with a loop. I am adding an conditional statement to my script to see if a condition is met before running a loop. All of the code up to this point works great so I have not included it since it is very long and extensive. Basically I have a query that runs and is output to $info. This is where the code below picks up. Whenever I add the if() I only get one result returned. But if I simply delete the if() statement I get all of the rows returned. Is there some weirdness where the closing backet of the if() statement gets interpretted by PHP to be the closing bracket of the while loop? print_r($row); does display all of the results from my query so I know they are in there. So the only thing I could think of is the curly braces being used for the while() before the if() ?php if ($f_date!=) { // Start of IF while ($row = ifx_fetch_row($info)) { // Start of While $case_date = $row['caa61140005']; $case_type = substr($row['caa38840002'], 4); $case_id = $row['caa443400018']; $case_num = TRIM($row['caa44340041']); $case_title = TRIM($row['caa44340002']); $case_category = TRIM($row['caa443400013']); print_r($row); } // End of IF ? tr td width='300' id=?php echo $case_num; ? height='13' align='center' class='tblcell'div align='left' id=?php echo $case_num; ?img src=Images/Next1.gifa href=javascript:caseDetail('?php echo $case_id; ?','?php echo $case_title; ?','?php echo $party_name; ?','?php echo $case_num; ?')?php echo $party_name.br /\n.$case_num; ?/a/div/td /tr ?php } //End of While ? Any ideas? Thanks, Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template system in PHP
Xavier de Lapeyre wrote: Do any of you guys gurls know of a way to implement that template system. Smarty ? (The best one I know of is that of Wordpress) Regards, Xavier de Lapeyre Web Developer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Schedule tasks from server
Pieter du Toit wrote: 98% of the pages is PHP, and i dont know if all my code is *nix compatable, it should be, but i dont want to take the risk by moving, i already have to much to do still. As Richard said ,theirs the task scheduler in windows, but I would go with Paul's suggestion and move your site to a linux box, it will probably be better in the long run. Clive Paul Scott [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Mon, 2008-02-04 at 16:46 +0200, Pieter du Toit wrote: I am using paradigmsolutions.co.za. I read about cronjobs, but aparently it is only available on unix or linux hosting, is this true? Well, why not just host on *nix then? I see your site is a MS Frontpage one, but most linux based ISP's also support that anyway. That way you get the best of both worlds. Err, just one question though, if you are using FP, where does the PHP come in? --Paul All Email originating from UWC is covered by disclaimer http://www.uwc.ac.za/portal/public/portal_services/disclaimer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] text messages
blackwater dev wrote: I know this isn't specific to php but I need to add some code to my php pages to start sending out text messages. If anyone does this, how do you do it? Do you simply use a free service like teleflip or do you use a paid aggregator company? I use a paid service, called bulksms, they have a php class you can use to integrate with your app or you can you their api, very easy as well. Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] flash with PHP
FlashKnowledge = 0; phpKnowledge = 1; I remember some time back finding a class for php and a class/unit/addon for flash that allowed communication between php file and flash files, just google for it Clive Alain Roger wrote: Hi, i would like to have a flash menu in my PHP website. this is no problem. My problem is how to exchange data between PHP andFlash (in both direction). i found a lot of posts on this theme, but nothing with really works under ActionScript 3 and PHP. does anyone already solved such topic ? thx. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] are email address could be spammed
http://www.mail4liste.de/viewtopic.php?p=259845sid=4b4f436983abded92e9a090cdea0c688 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Looks like a bug with Smarty
if ($question == 'php') domail('phplist',$question); if ($question == 'smarty') domail('smartylist',$question); Hi All, I using html_options smarty tag to output an associative array in select drop down. Here a sample associative array: array(5) { [CN-PEK-KEJ]= array(1) { [198]= string(7) TechTst } [IE-DUB-GAS]= array(2) { [177]= string(10) store room [39]= string(10) TechStop 2 } [UK-LON-BEL]= array(1) { [88]= string(16) TechStop-LON-BEL } [IE-DUB-GOR]= array(1) { [159]= string(10) TechStop 1 } [US-NYC-9TH]= array(1) { [194]= string(12) TestTechStop } } and the syntax I have used to output this was: {html_options name='locationId' options=$locations selected=$selectedLocation} where in I assign $selectedLocation with one of the options after selecting them. Even after everything being right, the option thats been selected is not set but it again goes back to show the first option after submit. Looks like either smarty misinterprets this selected option or is there something wrong from my end. Cheers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] checking user input of MM-DD-YYYY
Adam Williams wrote: I'm having users enter dates in MM-DD- format. is there a way to check if what they have entered is invalid (like if they enter 1-15-2008 instead of 01-15-2008) ? explode() and checkdate() perhaps? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] anaylyze email
Depending on your mail server, you could possibly get your mail server to run a php script on an incoming email. Clive Yui Hiroaki wrote: Thank you for your response. I try to write a code. I actualy want to do; 1) some body send email to me; for example; to [EMAIL PROTECTED] from [EMAIL PROTECTED] 2)read it's email 3)return to [EMAIL PROTECTED] so I can not do this 2) I try to read pop3. I can not find any example! Regards, Yui -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] $_GET and multiple spaces.
Hi - What Al said, but you want to use the url_encode/url_decode functions in php Clive Churchill, Craig wrote: Hello, One of the values I'm passing in a URL string contains multiple spaces. a href=browse.php?DarScientificName=Argononemertes australiensis.../a (The multiple spaces are between Argononemertes and australiensis) However when I retrieve the value using $_GET[DarScientificName] there is only a single space between the two names which I understand is the intended behaviour? Is there a way to preserve the multiple spaces? Thanks Craig. Craig Churchill Collection Systems Specialist Museum Victoria GPO Box 666 Melbourne VIC 3001 Australia Telephone +61 3 8341 7743 Email [EMAIL PROTECTED] museumvictoria.com.au This e-mail is solely for the named addressee and may be confidential.You should only read, disclose, transmit, copy, distribute, act in relianceon or commercialise the contents if you are authorised to do so. If you are not the intended recipient of this e-mail, please notify [EMAIL PROTECTED] by e-mail immediately, or notify the sender and then destroy any copy of this message. Views expressed in this e-mailare those of the individual sender, except where specifically stated to be those of an officer of Museum Victoria. Museum Victoria does not represent,warrant or guarantee that the integrity of this communication has been maintained nor that it is free from errors, virus or interference. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to pass connection as global variable ?
Hi Chris, I recreated a new connection in faq.php and it's working now. I had the impression that 1 connection could last during a user session, but apparently a user session may need many connections. Thanks again, Cor Have a read on persistent connections Regards, Clive. {No electrons were harmed in the creation, transmission or reading of this email. However, many were excited and some may well have enjoyed the experience.} -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] A very strange loop!
Xell Zhang wrote: for ($i = 'A'; $i 'Z'; $i++) { echo $i . ' '; } Rather do it like this: for ($i = 65; $i 91; $i++) { echo chr($i) . ' '; } -- Regards, Clive. Real Time Travel Connections {No electrons were harmed in the creation, transmission or reading of this email. However, many were excited and some may well have enjoyed the experience.} -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: what trick is this? How to do it?
Man-wai Chang wrote: I asked here because I believe good PHP programmers are usually well-versed in client-side stuffs. :) That comment reeks of NLP :) clive -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Where does PHP look for php.ini??
Nathan Nobbe wrote: On 7/6/07, Tijnema [EMAIL PROTECTED] wrote: Completely missed it LOL, it looks for it in /usr/lib :S Is that normal? i beleive it depends on the OS/distribution. on gentoo php.ini is located my ubuntu box looks like this: etc/php5 |-- apache2 | `-- php.ini |-- cgi | `-- php.ini `-- cli `-- php.ini -- Regards, Clive. Real Time Travel Connections {No electrons were harmed in the creation, transmission or reading of this email. However, many were excited and some may well have enjoyed the experience.} -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Another simple question (Probably)
Jason Pruim wrote: Okay so given this section of code: $taskTime=mktime(00,00,00,$_POST['txtReschedule']); im not certain, but I dont think you can pass the date to mktime as 1 variable, the function requires the following mktime($hour, $minute,$second, $month , $day ,$year); so maybe you need to split up your posted variable clive echo HTML tr td bgcolor={$rowColor}ID#, {$row['id']} /td td bgcolor={$rowColor}TicklerName, {$row['task_name']} /td td bgcolor={$rowColor}Instructions, a href='{$row['task_desc']}'Instructions/a/td td bgcolor={$dowColor}DayOfWeekWord, {$dowword} /td td bgcolor={$rowColor}DateToReschedule, input type='text' name='tasks[{$row['id']}][txtReschedule]' value=''/td td bgcolor={$rowColor}DateRescheduled, {$Date}/td td bgcolor={$rowColor}a href='update.php?taskid={$row['id']}taskdate={$taskdate}'Click here!/a/td td bgcolor={$rowColor}CheckboxForWhenDone, input type='checkbox' name='tasks[{$row['id']}][chkDone]' value='{$row['id']}'/td /tr HTML; Why am I getting a time stamp of: 1165640400 Sat, Dec-09-06? I have been fighting with trying to figure this out and finally decided to show my ignorance of the language and ask for help :) Besides, the boss wants this done :) Jason ?PHP if($brain ==Monday){ echo Let me go home! }; ? -- Regards, Clive. Real Time Travel Connections {No electrons were harmed in the creation, transmission or reading of this email. However, many were excited and some may well have enjoyed the experience.} -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Brain Teasers
ok this one should be easy: ? $animal = array (pig,cow,bat,chicken,dog); for ($i = 0; $i sizeof($animal); $i++) { $sighted = ($animal[$i] != bat ? see : blind); } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP Brain Teasers
?php class money { LOL, a penny saved is a penny earned -- Regards, Clive. Real Time Travel Connections {No electrons were harmed in the creation, transmission or reading of this email. However, many were excited and some may well have enjoyed the experience.} -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Controlling project version
svn is what I prefer. clive -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [BULK] Re: [PHP] OK to have many files in one folder?
I have no clue how big the files are, but you might want to store them in a database. That can speed up things, but don't ask me how much ;) Tijnema no dude, while database are convenient, files systems are faster, I mean thats what they were designed for, serving files. For lots of files I would store them in directories and sub directories. - -- Regards, Clive. Real Time Travel Connections {No electrons were harmed in the creation, transmission or reading of this email. However, many were excited and some may well have enjoyed the experience.} -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Competition - Win a copy of Zend Studio
a friend of mine demo'd code that he had written many years ago in perl to solve this exact problem, he converted it to php a few years ago for fun. Im going to try and get him to enter the competition. Clive {No electrons were harmed in the creation, transmission or reading of this email. However, many were excited and some may well have enjoyed the experience.} -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] does this code look like it would check a file extensions, and disallow php files or exe files to be attached
why don't you run it and find out. with errors turned on you will have quickly found out if it worked or not $filelinks=t3lib_div::_POST('file_name'); // the posting of the file name ok Ive never seen syntax like that before, maybe some else can help, looks like your doing this code from within a class that inherits from another class. $exttypes = php3,php,exe; // list of extensions that shouldnt be used $fileextension = substr($filelinks,0,strpos($filelinks,.)); //get the no should be: fileextension = substr($filelinks, strpos($filelinks,.)+1 , strlen($filelinks)); extension after the . if ($fileextension == $exttypes['php']['php3']['exe']) { //if the hmm not sure about this either, you could do: $exttypes = |php3|php|exe|; if (strstr( $exttypes, |fileextension|)) { } else { } or use explode() and in_array() file extension equals php, php3, or exe echo mime type doesn't work; //if the extension is php, php3, exe, than echo doesn't work } if ($fileextension != $extypes['php']['php3']['exe']) { //if the file extension doesn't equal php, php3, or exe than // store the file $filelinks = $this-storeFile(); } ? {No electrons were harmed in the creation, transmission or reading of this email. However, many were excited and some may well have enjoyed the experience.} -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [BULK] [PHP] Redirecting to a parent page
Yamil Ortega wrote: Lets say that I have the next structure on my web directory /file1.php /procces/file2.php /file3.php http://localhost/apache2/file1.php try this: header( refresh:'3'; url=./apache2/file3.php); Regards, Clive. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [BULK] RE: [PHP] Re: [BULK] [PHP] Redirecting to a parent page
Yamil Ortega wrote: Ok, but what happens if I change server and there is no more apache2 directory? Do I have to change all the headers in my 37 web pages? do this: // in a config file, or header file $sitename = http:/localhost/apache2/; eader file // whereever it is needed header(Location: $sitename/file3.php); You may also want to look at the object buffer and perhaps clear that before doing a redirect. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Effect of syntax error in php.ini
Hi I have come across some very strange behavior with php-4.3.9-3.22.5 when using Moodle 1.8+ on a CentOS 4.5 Linux platform. If I accidentally corrupt the php.ini file as follows and restart Apache all is well and admin/index.php displays correctly. The corrupt section in php.ini is shown below: ; Resource Limits ; ;;; max_execution_time = 30 max_input_time = 60 memory_limit = 60M ; Maximum amount of memory a script may consume If I correct the comment line by removing the carriage return after the word script and restart Apache the page admin/index.php just comes up blank. The uncorrupted section in php.ini is shown below: ; Resource Limits ; ;;; max_execution_time = 30 max_input_time = 60 memory_limit = 60M ; Maximum amount of memory a script may consume What effect does introducing a syntax error into php.ini have? Anyone any idea what on earth is happening here??? Any suggestions most welcome... Clive Clive Gould HE PAL ICT Bromley College -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] linking to an image with document_root
blueboy wrote: May be a stupid question but can I link to images with doscument root there are no stupid questions, only stupid answers. $img_url= $_SERVER['DOCUMENT_ROOT'].'/images/holder.gif'; no you cant; do this in a script on your server: echo pre; print_r($_SERVER); and have look at the variables you can make use of, I would imagine $_SERVER[SERVER_NAME] might be the ones you want. clive echo img src=\$img_url\ width=\250\ height=\163\/; I am certain the path is correct, If not what are my alternatives? R. -- Regards, Clive. Real Time Travel Connections {No electrons were harmed in the creation, transmission or reading of this email. However, many were excited and some may well have enjoyed the experience.} -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] uploading really big files
Angelo Zanetti wrote: Dear all We need to develop a system where we can upload really big files. IE 15 - 25 Mb. I know its not a php answer, but if you have ever uploaded a file with facebook then you will have seen the little applet they push down to your browser, perhaps investigating something like might prove useful, I doubt they wrote it themselves, then again maybe they did. -- Regards, Clive. Real Time Travel Connections {No electrons were harmed in the creation, transmission or reading of this email. However, many were excited and some may well have enjoyed the experience.} -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Uploading Files Should I use MySQL or Server for storage?
itoctopus wrote: I have tried both, and I tell you that I really felt that the filesystem is a more convenient way of doing it. I have to agree, filesystems were after all designed to store files. I reckon reading a file from disk is much quicker than reading from a database, maybe only fractionaly though. -- Regards, Clive. Real Time Travel Connections {No electrons were harmed in the creation, transmission or reading of this email. However, many were excited and some may well have enjoyed the experience.} -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Download speed limit
Rangel Reale wrote: Yes, I tried, this works, but I would like to control the send speed more, preferably via URL, as this programs will only be accessed by my desktop application, and I have full control of them. ok if its only your application thats going to use this data, you could 1. setup a ftp server that does bandwidth limiting. Then your application downloads the file via ftp. 2. rsync has a bandwidth limiting option aswell. But, if there is no other way, this will be the way! - Original Message - From: Greg Donald [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Thursday, May 17, 2007 6:55 PM Subject: Re: [PHP] Download speed limit On 5/17/07, Rangel Reale [EMAIL PROTECTED] wrote: Hmm that apache module isn't quite what I need, it just accepts or refuse connections based on bandwidth usage, it does not throttle the connection. Have you tried something like this? ?php $file = '/opt/local/apache2/htdocs/test_file.txt'; set_time_limit( 0 ); $handle = fopen( $file, 'rb' ); if( !$handle ) { die( 'fopen() failed' ); } header( 'Content-Type: text/plain' ); header( 'Content-Length: ' . filesize( $handle ) ); header('Content-Disposition: attachment; filename=' . basename( $file ) . '' ); while( ( !feof( $handle ) ) ( connection_status() == 0 ) ) { print( fread( $handle, 1024 * 8 ) ); sleep( 1 ); flush(); } fclose( $handle ); I get right at 8K/sec using that. -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: 269.7.0/803 - Release Date: 13/5/2007 12:17 -- Regards, Clive. Real Time Travel Connections {No electrons were harmed in the creation, transmission or reading of this email. However, many were excited and some may well have enjoyed the experience.} -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need a new shared host with php
Edward Kay wrote: Check out http://www.webhostingtalk.com for both discussions and searching on any possible hosts before signing up. If you can stretch your budget a bit more, go for a VPS. Shared hosting is a real pain when other users write poor code that hog the server. I use ServInt and would recommend them. I 2nd Servint, -- Regards, Clive. Real Time Travel Connections {No electrons were harmed in the creation, transmission or reading of this email. However, many were excited and some may well have enjoyed the experience.} -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] What is the best way to protect the PHP page that returns the AJAX data? [solved]
Robert Cummings wrote: A Guru would have spent 60 seconds testing to see if the session_start() scenario worked BEFORE posting to the list :B /me was thinking the same -- Regards, Clive. Real Time Travel Connections {No electrons were harmed in the creation, transmission or reading of this email. However, many were excited and some may well have enjoyed the experience.} -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to know a requets from web page or client.
Le Phuoc Canh wrote: How can we know a request from web page( ex : firefox, IE..) or from client( ex : window media, winamp, ...). Please help me ! you need to look at the http request header, you can use the $_SERVER['HTTP_USER_AGENT'] variable to access that. Please note some application may provide a false identity, ie Opera identifying itself as IE. -- Regards, Clive. Real Time Travel Connections {No electrons were harmed in the creation, transmission or reading of this email. However, many were excited and some may well have enjoyed the experience.} -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sending the results of a query without using a file
Todd Cary wrote: Some shared servers do not allow the creation of a file, so I am looking for a way to take the results of a query (MySQL), create a CSV output and have it in a sendable format for the user without creating a file. are you sure, then how could you say ftp the files to the server, are you not trying to create files in the wrong directory? hmm if you want to allow the user to download the file, then just send the correct headers, using the header() function, for the csv format and then echo the contents of the file. remember your application may spit out some other bits of text and this will interfere with sending the headers so you may also need to look at the output control functions to clean the outout buffer and then send your headers and data: http://www.php.net/manual/en/ref.outcontrol.php Regards, Clive. {No electrons were harmed in the creation, transmission or reading of this email. However, many were excited and some may well have enjoyed the experience.} -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [X-POST] Fastest way to dump this huge table
I'd say give some attention to the zip method you use. or better yet rsync the file, send only what has changed. -- Regards, Clive. Real Time Travel Connections {No electrons were harmed in the creation, transmission or reading of this email. However, many were excited and some may well have enjoyed the experience.} -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP Text Messaging
Michelle Konzack wrote: I buy from several European GSM-Providers bigger contingents of SMS's and have per SM-Provider 4-16 SIM-Cards... (My Server has 64 Siemens S40 attached) I pay per SMS 0.024 to 0.042 Euro and sell it for 0.06 to 0.18 Euro. The clients do Pre-Pay which mean I have no risk... I send per month around 2 million messages. Which mean, I earn effectiv nearly 0.01 Euro per message. and this is done only with a very OLD HP Vectra XA5/200MMT (P1/200 with 192 MByte of memory). Thats very impressive, but I know in South African there are companies that do what you do, but they connect to each respective mobile phone provider by means of an internet connection. There are however security and cost requirments to do so. Coincidentally I once ran into a local guy who was doing what you were doing, but he stop doing it a number of years ago and simple became a WASP (wireless accesss service provider) My bank, for instance, sends me sms's on any transaction that happens on my account, I doubt they would have used an array of mobile phones to accomplish this. Sometimes, when I use my credit card, I get the sms before the credit card slip has been printed out :) -- Regards, Clive. Real Time Travel Connections {No electrons were harmed in the creation, transmission or reading of this email. However, many were excited and some may well have enjoyed the experience.} -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] slow performance
Do you know any resource, describing how php works (like the thing about compiling opcode, and stuff)? How does php handle simultaneous requests? Are there multiple threads spawned? PHP doesn't do threading, apache does however every request it receives spawns a new thread ( there is however a thread limit in apache if Im not mistaken), but a single php cant unless you simulate it with arrays and loops. clive -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Text Messaging
Philip Thompson wrote: I have Googled this topic and found a few, but find it hard to judge which ones are good. Thanks in advance, ~Philip try bulksms, they have representation in a number of countries, they have php class to interface with them or just simple http posting does the trick ,Ive used them successfully a number of times in South Africa. http://www.bulksms.com/ -- Regards, Clive. {No electrons were harmed in the creation, transmission or reading of this email. However, many were excited and some may well have enjoyed the experience.} -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Migrating php4 to php5 on a shared host
Al wrote: Anyone had experience or comments on the subject. setup php5 dev (local||hosted) server, setup site on dev server, test clive -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] echo or print ?
What do you guys use, and what is the advantage (if ther is any) of print over echo? And I am not talking about print_r or anything, just the regular print. :o) print returns a result, echo doesn't. This makes echo slightly faster than print, but I doubt theres any significant speed improvement using echo instead of print. I use echo, but thats just because its a habit. -- Regards, Clive. {No electrons were harmed in the creation, transmission or reading of this email. However, many were excited and some may well have enjoyed the experience.} -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Retrieving parameters passed from .html...?
itoctopus wrote: yup, $_GET to get stuff from the URL $_POST to get stuff from the form $_SESSION to get stuff from the session $_FILES in case you have files in your form, they will be stored here and $_REQUEST to get $_GET, $_POST, and $_COOKIE all in one -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Question on Portfoilo's
Larry Garfield wrote: This is why one should work on an open source project. Much easier to show off legally. :-) unfortunately we aren't all fortunate enough to work for an open source project and earn a living, except Paul of course. Regards, Clive. {No electrons were harmed in the creation, transmission or reading of this email. However, many were excited and some may well have enjoyed the experience.} -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mixture of GET and POST
This has nothing to do with php, I suggest you read up on how html forms work and you may need to learn some javascript. clive. I have 3 'action' buttons and I am trying to send the $id from the radio button and the action to the same page so I can either, Add Edit or Remove the property from the database. Any ideas how I can get this to work? I can either POST the id's or GET the action but I can't seem to return both to the browser. Ta, R. -- form id=form1 name=form1 method=post action= div id=button_holder a href=?action=addid=?=$id;?Add Property/a a href=?action=removeRemove Property/a a href=?action=editEdit Property/a /div div id=table_header /div table id=properties_table ?php $query = SELECT * FROM properties; $result= mysql_query($query); while ($row = @mysql_fetch_array($result, MYSQL_ASSOC)){ ? trtd class=col_one input type=radio name=id value=? echo $row['property_id'];?/td td class=col_two?php echo $row['property_id'];?/td td class=col_one?php echo $row['address'];?/td td class=col_two?php echo $row['postcode'];?/td td class=col_one£500/td td class=col_twoLive/td /tr ? } ? /table /form -- Regards, Clive. Real Time Travel Connections {No electrons were harmed in the creation, transmission or reading of this email. However, many were excited and some may well have enjoyed the experience.} -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Ide help needed
Does anyone knows any IDE for PHP like VisualStudio.net? look at delphi for php, its not delphi the language but a IDE written by borland to develop web apps using forms/drag 'n drop and php. Windows only im afraid and the only php IDE of its kind that Ive come across. I use linux so I wont be using but you might like it. http://codegear.com/Products/Delphi/DelphiforPHP/tabid/237/Default.aspx -- Regards, Clive. Real Time Travel Connections {No electrons were harmed in the creation, transmission or reading of this email. However, many were excited and some may well have enjoyed the experience.} -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php-mysql problem
Me2resh Lists wrote: the query is : $SQL = SELECT DISTINCT(EMail) FROM mena_guests WHERE Voted = 'yes' LIMIT $startingID,$items_numbers_list; the only php I see it $SQL,$startingID,$items_numbers_list. This is a mysql question. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php-mysql problem
cajbecu wrote: clive wrote: Me2resh Lists wrote: the query is : $SQL = SELECT DISTINCT(EMail) FROM mena_guests WHERE Voted = 'yes' LIMIT $startingID,$items_numbers_list; the only php I see it $SQL,$startingID,$items_numbers_list. This is a mysql question. so, you don`t know the answer, right? cajb. Well if I understand the question correctly, then yes I could have an answer. I have solved something similar a while back, unfortunately I don't remember the correct sql and would have too populate a db table and try a few sql commands which is something me2resh should do until he gets the correct results. clive -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php-mysql problem
if I asked you whether your wife/girlfriend enjoyed having sex with your best friend while you are at work then you may or may not know the answer but it is hopefully clear that this is not the list to ask such a question (but no doubt that there is a list somewhere that caters to that kind of shit) ... conceptually what goes for your other half also goes for SQL. ha ha thats funny, but true and well explained :) - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Add New Records Only!
you could do a serialized md5 of sum of the more unique columns from your db abd use that as a unique identifier for the row. Then you would need to compare this 'key' before doing a insert. Also keeping a log of the date and time of the last operation would help as then you only need to select rows newer than that dates, thats provided of course your source data has a datetime column. -- Regards, Clive. Real Time Travel Connections {No electrons were harmed in the creation, transmission or reading of this email. However, many were excited and some may well have enjoyed the experience.} -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Redirecting in a PHP script
Larry Bradley wrote: I need to goto different PHP pages in my web site depending on what happens within some PHP code. For example, if the user is not logged in when he goes to a page, I want to send him to a LOGIN page. I've have everything working fine, using the following Javascript code: $location = 'login.php'; echo script language='javascript'\n; echo document.location.href = ' . $location . ';\n; echo /script\n; I also played around with using the header(location: ...) function. I understand that the header() function must be issued before any HMTL is output. But I'm not sure about the Javascript code. In every instance in my code, I use the Javascript before any HTML - this type of action normally occurs in PHP code called via a form POST. I presume that the Javascript code really does the same as the PHP stuff, and thus must obey the same rules, but I'm not sure. Comments? Larry Bradley Orleans (Ottawa), Ontario, CANADA You could just put the bit of code that does the redirect above the HTML, or use ob_start() at the beginning of your php file and ob_end_flush() at the end, if you need to do a redirect then call ob_end_clean() before the header() function. and as some one else mentioned with clever use of a switch-case and includes you can avoid header() redirects entirely. Clive -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Caching options - trunkcache?
Merlin wrote: I am looking for a replacement of php trunkcache. I think you meant turck mmcache? have a look at these: http://eaccelerator.net (derivative of mmcache last release: 2006/02/15) http://www.php-accelerator.co.uk/ -- Regards, Clive. Real Time Travel Connections {No electrons were harmed in the creation, transmission or reading of this email. However, many were excited and some may well have enjoyed the experience.} -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Joke of the day problem
Delta Storm wrote: Hi, again me with the silly questions... you could have another table in your database that logs the id of the current joke and the date it was shown on, then simply 'select jokeid,dateshown from jokelog order by dateshown limit 1' will get you the last joke and when it was used, if the date is yesterdays date then get a new joke from the joke table. you could also have do the same but store 1 entry in a file, file io is sometimes quicker than a query on a large db. -- Regards, Clive. Real Time Travel Connections {No electrons were harmed in the creation, transmission or reading of this email. However, many were excited and some may well have enjoyed the experience.} -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Opinion on on-line payment and banking gateway
That sounds good. Could I know more about this clearing service? I mean, to whom should my friend contact? Some bank? His company is in Chicago. So, is there any central banking organization in United-States that he should contact? Or some bank in Chicago? try worldpay, they are one of the oldest payment gateways -- Regards, Clive. Real Time Travel Connections {No electrons were harmed in the creation, transmission or reading of this email. However, many were excited and some may well have enjoyed the experience.} -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Combining sound files
However, I can't do the same with .WAV files. Does anyone know a way to combine .WAV files similar to the way shown above? Can you not convert the wav files to mp3's then combine them? -- Regards, Clive. Real Time Travel Connections {No electrons were harmed in the creation, transmission or reading of this email. However, many were excited and some may well have enjoyed the experience.} -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Combining sound files
That's a good point, then all I would have to do is to change the resultant mp3 file to a wav file. However, I'm not aware of how to do that using php. I would hope it's as easy as changing a jpg to a gif file, but I have never done a mp3 to a wav conversion before. I'll investigate that. you could look at lame? and you will have to call it from php using exec() or shell_exec() -- Regards, Clive. Real Time Travel Connections {No electrons were harmed in the creation, transmission or reading of this email. However, many were excited and some may well have enjoyed the experience.} -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] $_SERVER['PHP_SELF'] in a included file
A project that I work on has a index.php that includes other files depending on certain requirements. so index.php includes a.php; in a.php if you echo $_SERVER['PHP_SELF'] it echos index.php and I understand why it does this. But, I want echo the file name of a.php from a.php and I dont want to add a $filename='a.php'; at the top of a.php, although I have thought of using subversion and a find and replace to insert $filename=$Id$; at the top of all the files. Does anyone know know of another way I can get a included files filename? Sorry if I have posted this question in the past, its been a while since I last thought of this problem. Regards, Clive. Real Time Travel Connections {No electrons were harmed in the creation, transmission or reading of this email. However, many were excited and some may well have enjoyed the experience.} -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] JPG Not supported on my server, but GDlib enabled?
can somebody point me to the right direction? google? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [BULK] [PHP] Enable login prompt with main page of phpmyadmin
[EMAIL PROTECTED] wrote: I just install the phpMyAdmin 2.9.2 on the Web... So, how to enable the login prompt with the main page ? Well done, now read there help files! - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mozilla/Opera issue
Your code is probably flawed,try putting some debug code in, echo out some variables and see what happens. -- Regards, Clive. Real Time Travel Connections {No electrons were harmed in the creation, transmission or reading of this email. However, many were excited and some may well have enjoyed the experience.} -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] counting hyperlink clicks in php
Denis L. Menezes wrote: Dear friends. I have a site where I have news headers. I wish to count the clicks on the news headers so that I can see how many times each of the the news has been viewed. This way I can show the most viewed news. Can one of you please advise hwo this can be done? add to each news item like clicked=1 and in the page where you display the news item, checked if clicked exists, if does write it to a file or a db (obviously with the news item id), if your using mysql, the heap table type is quite useful, you will however need to move the info to a more permanent table every x amount of clicks. clive -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] insert html into php variable
?php ob_start(); include( 'someFile.php' ); $content = ob_get_contents(); ob_end_clean(); ? no I think he needs file_get_contents(); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] insert html into php variable
Robert Cummings wrote: On Mon, 2007-02-12 at 14:52 +0200, clive wrote: ?php ob_start(); include( 'someFile.php' ); $content = ob_get_contents(); ob_end_clean(); ? no I think he needs file_get_contents(); While that will certainly read PHP into a variable, it won't evaluate the contents. Then you're stuck with eval. This has the undesirable effect of not being able to take advantage of any opcode cache that may be installed. true, but Ross did not mention anything about evaluating/running code in the included file , if he need thats then yes your option is better. -- Regards, Clive. Realtime Travel Connection. {No electrons were harmed in the creation, transmission or reading of this email. However, many were excited and some may well have enjoyed the experience.} -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Opera advice needed!
William Stokes wrote: Hello, I just noticed when I published a new menu system that it does NOT work in the ISP hosted server. However it works ok on my test server. Here's the test I have done all in same client machine (=unchanged browser settings): works fine in opera 9.10 ubuntu edgy eft. clive -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [BULK] [PHP] Use array returned by function directly?
[EMAIL PROTECTED] wrote: What's the best way to achieve something like this: explode($needle, $array)[3] It's too clumsy to use temporary array, and I suppose, quite slow. Is there any option, or I'll have to stick to temporary arrays? Not sure what you are trying to do. 1. Are you trying to explode the values of an array.(doesn't make sense I know) 2. Search for a value in a array and then return them as a new array - there are other php function for this. Please explain more clearly what your intentions are? Best Regards, Ivailo Karamanolev -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Send Email to Mobiles
Marcelo Ferrufino Murillo wrote: Hi guys, I need to send a email to mobiles I don´t know if I have to use the function mail( ) or if I have to use other one. Thanks your help if your intention is to send the mobile phone a sms, then you are going to have to use a gateway company of sorts, in SA we have a few and they provide a number of interfaces: some to email to sms, some have a http api. Ive also seen ftp api, but those are for bulk sms'ing. clive -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] most powerful php editor
Vinicius C Silva wrote: hi everyone! i'd like to ask something maybe commonly asked here. what is the most powerful php editor? Just thought I'd add my bit, I used to use phpedit when I developed on a windows systems, then I started using Zend. Ive now moved to linux and still use Zend and I am slowly learning VIM. Now, eddie, the dude I work with is a vi master, he does stuff in that editor that Zend can't even comprehend. Watching eddie work with vi, is like watching a conductor conducting a orchestra, quick, efficient and pretty much amazing. clive ps. I dont really listen to orchestral music. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] having trouble with is_file() and is_dir() on 5.1.2
try using this, from php manual, clive ?php echo filetype('/etc/passwd'); // file echo filetype('/etc/');// dir ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] having trouble with is_file() and is_dir() on 5.1.2
everything without an extension is a directory You will notice that the only directory detected by this code is templates. There are no files detected by this code. Does this have something to do with stat cache? I want to make one array with directories and one array with files. I can't see any syntax or logic problems. Thanks in advance; JK As far as I know is_dir and is_file require a full path , as chris mentioned, how are you populating $cont; clive -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] is there another way ??
Ali Nasser wrote: can you please check these out and tell me if there another way without installing externsions?? no sorry I cant check for you! http://groups-beta.google.com/group/cpdevgroup/web/how-easy-is-these-project?_done=%2Fgroup%2Fcpdevgroup%2Fweb%2Fhow-easy-is-these-project%3Fmsg%3Dns -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Forms and destroying values
Beauford wrote: Hi, How do I stop contents of a form from being readded to the database if the user hits the refresh button on their browser. Perhaps a session variable that is set once the form is submitted. Depending on the data you could also look at having a primary key in the database. You could also have a hidden form variable that has some random value, once used, it cant be used again. clive -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] $POST Q
William Stokes wrote: Hello, Can someone tell me what wrong or to how to manage this? //default $limitorig = 10; echo select name=\USRlimitorig\; echo option selected value=$limitorig/option; echo option10/option; echo option20/option; echo option30/option; echo input type=\submit\ name=\resetlimit\ value=\GO\; firstly its better to use option value='10' 10 /option this might also solve your problem if I understand your question correctly. When the form is first printed the selected default (10) value is shown OK and if something is selected everything is fine. If I just hit GO without changing the select menu the form fails because USRlimitorig will be empty. So how to post the $limitorig if user doesn't change it but hits GO anyway? Thanks -Will -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Havn't been on the list in a while
Jim Lucas wrote: Seems like this list has slowed down alot. Anybody else notice this, or am I just missing something? jl well it is almost the end of the year perhaps some people are on holiday already? clive -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Send emails from PHP ... in a secure way
Ruben Rubio wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I have a question sending mails from PHP. Actually I am using phpmailer (is good!!) but when this class sends an email and there is an error (Mail server is not ready) It just reports error and email is lost. how are you sending the email , via smtp or sendmail or what ever mta is on the system. With the MTA it should be que'd. Id you get an error with the MTA then something is very wrong Why cant you save the email in a file or a database and then send it later your self? clive -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Remote MySQL connection via PHP file
cajbecu wrote: i suggest you: database.conf (the file on another server) host=localhost user=test pass=test anothervar=anothervalue have you thought of the security implications of this, a text file with user names/passwords, thats rather insecure I would say, on your script: $temp = file(http://../database.conf); foreach($temp as $val) { $temp2 = explode(=,$val); $$temp2[0] = $temp[1]; } after that, you`ll have: $host = 'localhost' $user = 'test' $pass = 'test' $anothervar ='anothervalue'; mysql_connect($host,$user,$pass); (bla bla) hope this help; On 12/1/06, Scott [EMAIL PROTECTED] wrote: Hi all, I've been searching around for a while, but cannot find a solution. For a project of mine, I need to keep the connection information to a MySQL server database on another server. Example remote file: ?php $user = joe; $pass = 1234; ? Example local file: ?php include http://www.remoteserver.com/remote_file.php;; // Use variables $user and $pass somehow... ? I've tried including the file which has the username/pass, etc information via HTTP, but this doesn't seem to work. I assume because it returns what a web browser would return if this file was loaded into one, a blank screen. I've tried using the return statement in the file which houses the information, but this seems to return a boolean value (1 or 0)... not sure what's up with that. Any help with this would be most appreciated. Thank you. Scott -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Remote MySQL connection via PHP file
Scott wrote: Hi all, I've been searching around for a while, but cannot find a solution. For a project of mine, I need to keep the connection information to a MySQL server database on another server. ?php include http://www.remoteserver.com/remote_file.php;; // Use variables $user and $pass somehow... ? why do you need to do this, would it not be simpler for the db admin to give you a username and password for the database, or provide some sort of xml interface, on the remote server, to access the database. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php