[PHP] Good host needed
Hi guys. I know this is OT, but I don't know where else to ask. I'm in South Africa, and I'm looking for a GOOD webserver host in the States. Bandwidth is a big thing, as well as using UNIX, else Linux. I would like to be able to manage the server from home,and not phone in every I need to do something. And I'm looking for good bandwidth. Any recommendation will do, as I'll be looking at all the companies, and see who offers the best. Thanx Rudi Ahlers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Good host needed
No, no, no, what I meant was, I want to rent some servers, in order for me to start a webhosting company myself. Rudi Ahlers UNIX Specialist and Web Developer Bonzai Web Design - http://www.bonzai.org.za Cell: 082 926 1689 - Original Message - From: Chris Bailey [EMAIL PROTECTED] To: Rudi Ahlers [EMAIL PROTECTED]; PHP General [EMAIL PROTECTED] Sent: Thursday, November 29, 2001 11:33 PM Subject: RE: [PHP] Good host needed Check the mailing list archives. This topic comes up about once a month or so, and a lot of good hosts have been listed, all of which support PHP, MySQL, and typically have SSH or at least telnet access, FTP access, etc. -Original Message- From: Rudi Ahlers [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 29, 2001 1:11 PM To: PHP General Subject: [PHP] Good host needed Hi guys. I know this is OT, but I don't know where else to ask. I'm in South Africa, and I'm looking for a GOOD webserver host in the States. Bandwidth is a big thing, as well as using UNIX, else Linux. I would like to be able to manage the server from home,and not phone in every I need to do something. And I'm looking for good bandwidth. Any recommendation will do, as I'll be looking at all the companies, and see who offers the best. Thanx Rudi Ahlers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Classes
Thanx for all the explanations, it did help quite a bit, although I don't have a use for a class yet, I might just use one to see how it works, and when to use it, and when not to use it. Regards Rudi Ahlers - Original Message - From: Christopher William Wesley [EMAIL PROTECTED] To: Rudi Ahlers [EMAIL PROTECTED] Cc: PHP General [EMAIL PROTECTED] Sent: Sunday, November 25, 2001 1:28 PM Subject: Re: [PHP] Classes On Sun, 25 Nov 2001, Rudi Ahlers wrote: Can anyone explain classes to me please? On many sites have I seen classes, There are people earning PHD's while explaining classes. I know your question originates from using PHP, and this is a PHP general mailing list ... but your question is just a tad too general for this list. I'm not sure how these work, or how to use them. I'm still learning about Classes aren't unique to PHP. You need to learn a true object-oriented programming language (C++, Java, ... etc.) to really learn classes. Truly gifted individuals can learn object-oriented programming w/o too much help, but they'd first have a firm grip on programming. I'd expect the average, novice programmer to need a good amount of help learning understanding objecte-oriented programming ... like that attained from a University, a good High School, or a lot of independent study and time experimenting with code. That said ... You weren't completely missing the boat with your analogy of a class to a variable, but in the same breath, that idea is totally missing the boat (I can see from where you're coming, and to where you're headed). Classes are an IDEA. They're not actually anything. They're the definition of private and public data members and methods that should make up an object. When a class is instantiated, an object is created with the defined data members and methods available. You can then use the objects' methods to set, get, alter, or otherwise interact with its data members, or to simply perform a set of related operations. Insert a couple semesters of theory here. That's my feeble attempt to explain classes. It's abstract, I know, and possibly not a help at all. But it's because of the paragraph above this one. Let's look at some petty code: class chair{ // DATA var num_legs; var color; var num_arms; // METHODS function chair( $legs = 3, $arms = 0 ){ //CONSTRUCTOR $this-num_legs = $legs; $this-num_arms = $arms; } function setLegs( $legs ){ $this-num_legs = $legs; return; } function getLegs( ){ return $this-num_legs; } // ... *clip* ... } Above is the [incomplete] definition of a chair class. As you can see, the class is useless. But you can instantiate the class, and create a useable object ... you can now create a chair. $myChair = new chair( 4, 2 ); Now I have a chair [object] with 4 legs and 2 arms, called $myChair. Let's have the chair tell us how many legs it has ... $numLegsOnMyChair = $myChair-getLegs(); print( My Chair has $numLegsOnMyChair legs. ); Lets change how many legs the chair has ... $myChair-setLegs( 7 ); // very odd, seven-legged chair We should have a chair with 7 legs now, instead of 4. Prove it ... $numLegsOnMyChair = $myChair-getLegs(); print( My Chair has $numLegsOnMyChair legs. ); (As you alluded to previously, the object $myChair is seemingly a variable that has access to scripts ... but I hope you see now that $myChair is an object with methods and data members, not a variable.) That's very simple, and not too useful. Which brings me to the next point. Knowing object-oriented programming is to know when and when not to use it (especially with PHP). I don't need a class definition and an object for a one-time use 7-legged chair. But I may need a class definition if I were making many complete graph data structures, each with a number of nodes equal to a unique number in the Fibonacci sequence. I wouldn't want to re-code the basic logic of a complete graph over and over for each graph. I could just instantiate graph objects, each with different numbers of nodes, much like I did with the chair, above. /ramble g.luck, ~Chris /\ \ / September 11, 2001 X We Are All New Yorkers / \ rm -rf /bin/laden -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] changing a variable according to the input in a checkbox
How would I be able to change a variable from the input in a checkbox? I need to write an sms script, that would be able to sms to three different providers, and I only want the use to type in the phone number. Thus, if he types in 083xx, it should goto provider 1, if he types in 082xx, it should goto provider 2, and if he types in 084xx, it should goto provider 3. I have a simple mail script, with $phone for the phone number variable, and this is the one that needs to change. Rudi Ahlers UNIX Specialist and Web Developer Bonzai Web Design - http://www.bonzai.org.za Cell: 082 926 1689 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Classes
Hi Can anyone explain classes to me please? On many sites have I seen classes, I'm not sure how these work, or how to use them. I'm still learning about php, and I get it going nicely. Is a class something like a variable (but as a whole script) that I simply include into my other scripts? Your help would be grateful as I'm still learning, and all info or knowledge helps Regards Rudi Ahlers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Setting variables from a text file
Hi Say I have a text file, separated by | ( a pipe). Now, I want to extract that info, in the form of variables. I can extract and display the info in the text files, but that's not what I want. I want to be able to tell it that the first entry should be variable1, the second entry should be variable2, etc. I add the info into the file with a script, that always adds variable1 into field one, variable2 into field2, etc. These variables are taken from a form. Now, I need to pass those variables onto another script, but I need to be able to extract them. Can anyone help me with this please? Thank you Rudi Ahlers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] FTP Clients
Sorry for the totally OT question, but can anyone recommend a good, FREE, FTP client for windows? I now have to pay for AceFTP aswell, which used to be free. Thank you Rudi Ahlers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Setting variables from a text file
I couldn't get this to work. Here is my complete script: ? function WriteToFile ($URL, $Description) { $file = bonzai.txt; $open = fopen ($file, a); if ($open) { fwrite ($open, $URL\t$Description\n); fclose ($open); $Worked = TRUE ; } else { $Worked = FALSE; } return $Worked; } function ReadFromFile() { $file = bonzai.txt; $open = fopen ($file, r); if ($open) { print (URLs currently listed in the data file:P\n); $data = file ($file); for ($n = 0; $n count($data); $n++) { $GetLine = explode(|, $data[$n]); print ($GetLine[0]p\n); } fclose ($open); print (hrP\n); } else { print (Unable to read from bonzai.txt!BR\n); } } ReadFromFile(); ? It gives me some error. I'm still pretty new to php, so I still need to learn all of this. Regards Rudi Ahlers - Original Message - From: Jeff Lewis [EMAIL PROTECTED] To: Rudi Ahlers [EMAIL PROTECTED]; PHP General [EMAIL PROTECTED] Sent: Wednesday, November 14, 2001 10:11 PM Subject: Re: [PHP] Setting variables from a text file Someone may have a better way but you can read each line (assuming the file uses \n for a new record) and use: arrayname = explode(|,$variable_holding_line_from_file); Then you can do assign the variables as such: $name = $arrayname[0]; etc Could be a better way from the list :) Jeff - Original Message - From: Rudi Ahlers [EMAIL PROTECTED] To: PHP General [EMAIL PROTECTED] Sent: Wednesday, November 14, 2001 3:08 PM Subject: [PHP] Setting variables from a text file Hi Say I have a text file, separated by | ( a pipe). Now, I want to extract that info, in the form of variables. I can extract and display the info in the text files, but that's not what I want. I want to be able to tell it that the first entry should be variable1, the second entry should be variable2, etc. I add the info into the file with a script, that always adds variable1 into field one, variable2 into field2, etc. These variables are taken from a form. Now, I need to pass those variables onto another script, but I need to be able to extract them. Can anyone help me with this please? Thank you Rudi Ahlers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] site last updated
Would there be a way of adding one script to a common footer, which in included in any file, and this script can check any file on the server, and echo the last updated string to a file. Thus, you don't need to add the script to the file, the footer automatically echos that info to any file on the server. Would that be possible? Cause then you could simply add pages, and the whole footer could be echoed to it. Rudi Ahlers UNIX Specialist and Web Developer Bonzai Web Design - http://www.bonzai.org.za Cell: 082 926 1689 - Original Message - From: Chip [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, November 04, 2001 7:32 AM Subject: Re: [PHP] site last updated On Saturday 03 November 2001 21:12, Steve Werby wrote: Ryan Christensen [EMAIL PROTECTED] wrote: You can do this in a per-page basis w/: $modified = stat(yourfile.html); echo date(l, F dS,$modified[9]); Also see getlastmod() and filemtime(). I am interested in this also. I understand the way it is working here, but what about using a common footer.inc which contains the last modified script, to show the last modified date of another inc file, body.inc, inside page.php? This would have to know the body.inc file name loaded into page.php I guess. That'd sure be easier than adding the script to several hundred seperate pages. -- Chip W. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] .inc files
Hi I was wondering, is there a different way using .inc files? I have a lot of .inc files, which are displayed as normal text when you call it in the browser. I would like to still have a file with the username / password / database / etc in, but make it say config.inc.php. How would I get the app to read a file like that, where say $admin=rudi; But also, how would I be able to change the values from another file? ie. write to it, and delete lines in it? I'm still learnin PHP, and it's great and a lot of fun. Regards Rudi Ahlers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Displaying images in another page
Hi I would like to setup a banned ad server, and I will need the images to be displayed in standard html pages, where the users don't have php access. Thus, they should be able to call up the image from a normal html page, ie: img align=center border=0 src=http://www.adserv.webonline.co.za/phpads.php3?what=main; Can anyone give me some tips on howto do this? And any other tips for banner ad servers would be great as well. Regards Rudi Ahlers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]