[PHP] named anchors and query strings
Hi Guys, How do you reference both a named anchor and a query string in a link? i.e. a href=page.php?location=01#bottomlink text/a I am not sure if this is even possible? thanks Scott -- 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] getting values inside PHP from outside script
thanks heaps mate. Chris Lambert [EMAIL PROTECTED] wrote in message 000c01c12e95$b217e600$6401a8c0@server">news:000c01c12e95$b217e600$6401a8c0@server... The easy ugly one line solution: $csvalues = explode(,, implode(, file(http://au.finance.yahoo.com/d/quotes.csv?s=NABm=af=sl1d1t1c1ohgve=. csv))) /* Chris Lambert, CTO - [EMAIL PROTECTED] WhiteCrown Networks - More Than White Hats Web Application Security - www.whitecrown.net */ - Original Message - From: Scott Mebberson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, August 26, 2001 9:04 PM Subject: [PHP] getting values inside PHP from outside script | Hi Guys, | | I want to write a script that retrieves quote prices off the ASX (Australian | Stock Exchange) and then adds it to the database. | | I think the only way I can do this is by using the yahoo finance query. | I need to know how I can call a string within my PHP script and then get the | results. The results are returned in a comma delimited format. Any ideas? | | use | http://au.finance.yahoo.com/d/quotes.csv?s=NABm=af=sl1d1t1c1ohgve=.csv to | see the results. | | thanks | | Scott. | | | | -- | 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] new socket() function in PHP which is 4.0.6
Hi Guys, I am trying to setup a socket relay server. Has anyone tried this? Thanks Scott. -- 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] getting values inside PHP from outside script
Hi Guys, I want to write a script that retrieves quote prices off the ASX (Australian Stock Exchange) and then adds it to the database. I think the only way I can do this is by using the yahoo finance query. I need to know how I can call a string within my PHP script and then get the results. The results are returned in a comma delimited format. Any ideas? use http://au.finance.yahoo.com/d/quotes.csv?s=NABm=af=sl1d1t1c1ohgve=.csv to see the results. thanks Scott. -- 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] Array's in classes
Hi Guys, I have written a class in which it uses the global command to get the value of a variable from outside of this class which I use within the class. I have recently changed this variable to an array and added 5 extra keys to this array. It is a string indexed array. In now seems as though PHP wont import the array. It is really weird though because if I access the key of an array such as $database[hostname] is just echo's nothing at all to the browser. It also echo's nothing to the browser if I use $database[0]. But, if I echo just $database to the browser it returns Array ? Does anybody have any idea of why this is happening? Thanks Scott. -- 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] `pwd` - what does this mean?
Hi Guys, I actually know what it means. Well, I think it means the current directory? Anyway... what exactly is it and where can I find some more information about it? I couldn't find much on php.net - also, is there any other ones(whatever it is) like this? Thanks. Scott. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: `pwd` - what does this mean?
I typed it on my server (SunOS 5.7) and it said, it returns the current working directory. So this is a unix command executed from PHP? Is there any other useful unix commands which can be executed from PHP? Does anybody have a list? Scott Mebberson [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi Guys, I actually know what it means. Well, I think it means the current directory? Anyway... what exactly is it and where can I find some more information about it? I couldn't find much on php.net - also, is there any other ones(whatever it is) like this? Thanks. Scott. -- 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] `pwd` - what does this mean?
Thanks for your reply but what does this (man -k | grep (1)) do? Thanks Don Read [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On 15-Aug-2001 Scott Mebberson wrote: Hi Guys, I actually know what it means. Well, I think it means the current directory? It executes the Unix command pwd. pwd - print working (current) directory. Anyway... what exactly is it and where can I find some more information about it? I couldn't find much on php.net man pwd - also, is there any other ones(whatever it is) like this? man -k | grep (1) Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- 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] I need everyones opinon!
Hi Guys, When naming classes and function's within the class(and even functions(probably more so?)) do you use a common string infront of everything? For example HM_function_name() The reason I am asking is because what if you want to easily intergrate a class/function with lots of other classes/function and then you find out there is two with the same name? Any thoughts on this would be good! -- 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] writing updateable code
Has anybody ever written some code for a product and want it to be able to update itself... and made it look for updates? Does anybody have some ideas or information on this? Thanks Scott. -- 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] PHP scripts in HTML
Hi Don, This wont work as PHP is a server side scripting language. So by the time your page gets displayed in a browser, php has already packed up and gone home. It has done it's job and exited your page. For your webserver to recognise php it must be incompessed in ?php ? tags, or ? ?. This is so your webserver knows when to start up php (so to speak). Inserting the script... statement like you did is to late, because all of the information has already be passed to the browser and php can't write any more information to the page. Hope this helps. "Don" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I would like to know if there is a way to accomplish the following: In my HTML file, I have the following: script language="php" src="/phpscript/testscript.php"/script In the testscript.php file, I have: ?PHP echo "Hello Don"; echo "What is up?"; ? When I run the html file, I do not see the PHP code but if I place the above code directly in my HTML file, it displays. -- 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] uploading files
Hi Guys, From your experiences, please answer my questions relating to uploading files. Can you get php to upload an image if you have the direct location of the file (ie. c:\bar\foo\bar\foobar.jpg), but the only thing is that I am not getting this from a form file input with the ENCTYPE of the form set to "multipart/form-data". I am getting the location from a string that is open from a file. Is it still possbile? Also, is there anyway around this?? Thanks Scott Mebberson [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] Structuring large PHP programs
I would use a combination of both, Have all of your backend settings (including db info) in one include, and all of your user customisable settings (if you have any) in another include and finally another include for all your functions, so that any function is aviable at anytime. But this doesn't mean that you need to have three include() statements at the top of your page. Simply make refference to require('settings.inc'); then in this settings.inc file maintain all of your other includes to files. This way if you want to create another include, all you have to do is add it to settings.inc and then it is inlcuded in everyfile that settings.inc is included in! Scott Mebberson Redblue Design "John McCreesh" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... What is the best practice for structuring a PHP program which is becoming too large to manage as a single file? Should it be broken into a number of includes, e.g.: switch ($whatever) { case 0: include('case0.php'); break; case 1: include('case1.php'); break; case 2: include('case2.php'); break; } or a number of functions: require('mylib'); switch ($whatever) { case 0: case0(); break; case 1: case1(); break; case 2: case3(); break; } Any thoughts, references to articles (couldn't find anything in PHPBuilder), etc gratefully received... Thanks - John -- 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] Environment Variables ???
The HTTP_IDENT env. variable was depreciated due to its limited use. REMOTE_USER does have a value if the user has been authenticated. If the authentication was successfull then the users name is stored in here. Use HTTP_REFERER if you want to know where the visitors were before they came to your site or a page on it. ""Barry Fawthrop"" [EMAIL PROTECTED] wrote in message 00db01c096c7$67511800$[EMAIL PROTECTED]">news:00db01c096c7$67511800$[EMAIL PROTECTED]... Why do the Environment Variables REMOTE_IDENT REMOTE_USER HTTP_FROM HTTP_IDENT and others exists IF they don't return any information ??? Is there anyway to find out Who visit's your site. (1) I'm trying to determine between Search Engines and actual Visitors (2) I'm trying to see who is interested in what I have. I have mailing list and guestbook, yet no-one clicks these Are there any "tricks" I can use to see who these people are ?? This is for a Christian Ministry site, if this is a factor Thanks Barry -- 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] email.. (check this one out!)
Try to write some substr loop thats get the line and splits it up into 100 words then concenates all of the value you split with a \n in between ""FredrikAT"" [EMAIL PROTECTED] wrote in message 96eu04$uef$[EMAIL PROTECTED]">news:96eu04$uef$[EMAIL PROTECTED]... Hi! I want to send a email usin' email() (plain text!), but I have a problem. What i want to send! $email_body = "This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, "; I want to output it something like this: This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, (Can I do that without using HTML? Is there a php-function to set width?) - Fredrik A. Takle [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] uploading files with just a string c:\temp\whatever.txt
Doesn't anybody know anything?? Even a nope it can't be done is a better response than nothing? Thanks guys ""Scott Mebberson"" [EMAIL PROTECTED] wrote in message 96fcni$kg$[EMAIL PROTECTED]">news:96fcni$kg$[EMAIL PROTECTED]... Hi Guys, Does anybody know how to upload a file if the only information you have is the string to the location of the file on the clients hard drive. Also, the string was not retrieved using the form method, which I know about. This method can't be used and I need to be able to upload with only the location information. PHP3 is the ver that I am using. Thanks Scott Mebberson [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] uploading files with just a string c:\temp\whatever.txt
So does anybody have a work around. I need this becase I am creating a web updating system using my own code and text box. Ie, I use reg epx's to search through 'my code' and change it to proper html. Then I search through and find all file references in order to upload them. But them I am stuck with strings to files on people's hard drives, with no way of uploading?? Any ideas?? Thanks guys for helping out ""Scott Mebberson"" [EMAIL PROTECTED] wrote in message 96fcni$kg$[EMAIL PROTECTED]">news:96fcni$kg$[EMAIL PROTECTED]... Hi Guys, Does anybody know how to upload a file if the only information you have is the string to the location of the file on the clients hard drive. Also, the string was not retrieved using the form method, which I know about. This method can't be used and I need to be able to upload with only the location information. PHP3 is the ver that I am using. Thanks Scott Mebberson [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] php vs perl
When Jason says 'especially when your note using the cgi' he means the cgi version of PHP (I think) in preference to installing PHP as an apache module. ""Jason Brooke"" [EMAIL PROTECTED] wrote in message 04ad01c0970f$927eeff0$0100a8c0@jb">news:04ad01c0970f$927eeff0$0100a8c0@jb... Is there any reason why php is better than perl for shopping carts and/or product catalogs? Thanks, Jeff It's hard to just come out and say that php is better than perl for shopping carts because there's too many factors to take into consideration. If you were a person who'd never used either, I'd guess that php might be better to use because the essential ingredients are pretty much already included with php, such as session handling, form and url data processing, and a wide variety of database functions. That's not to say the same things aren't fairly easy to plug right into perl by way of readily-available modules, but it's probably a bit of extra work, especially for the beginner. Someone who already uses perl would likely have libraries for these things already installed/handled anyway though. I think the syntax might be a little easier to understand in php too, although it's sure to be a personal preference thing to a large extent. To me, the bottom line is go with the one you feel most productive/comfortable with. They're both about as cross-platform portable as each other (I think?) and both are pretty robust under heavy load, especially when you're not using the cgi. jason -- 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] Reg. Exp. Help
I have written a regular expression that searches for any occurance of src="*" in a html page and rewrites it so that it is equal to src="http://www.whereever.com/images/filename.jpg" - If there are five occurances of this match then it replaces them all. Is there anyway to make it only run once. Then if I want to loop and do it again. I want to do this so I can put the contents of the original * in src="*" into and array and access them later for uploading the files. Thanks Scott Mebberson [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] Reg. Exp. Help
I really need help with this. I have written a regular expression that searches for any occurance of src="*" in a html page and rewrites it so that it is equal to src="http://www.whereever.com/images/filename.jpg" - If there are five occurances of this match then it replaces them all. Is there anyway to make it only run once. Then if I want to loop and do it again. I want to do this so I can put the contents of the original * in src="*" into and array and access them later for uploading the files. I think that maybe preg_match() or preg_match_all() is the answer but I have know idea on how to make the regular expression I am using perl comptaible. Here it is: $txt = ereg_replace("src=\"([^]+)\.(gif|jpg)\"", "src=\"http://www.ezigraphics.com/images/about_0001." . //2. "\"", $txt); Any ideas is a huge help - thankyou Thanks Scott Mebberson [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] Arrgghh, Regular Expressions?!?!
Hi guys, I need to write a regular expression search that can search through a block of HTML code and find anything similar to these: IMG alt="" border=0 hspace=10 src="" vspace=20 IMG align=baseline alt="" border=0 hspace=0 src="" IMG align=right alt="" border=1 hspace=2 src="" vspace= IMG align=textTop alt="" border=0 hspace=0 src="" IMG align=baseline alt="" border=0 hspace=0 src="" IMG alt="" border=0 hspace=0 src="" IMG alt="" border=2 hspace=0 src="" IMG alt="" border=2 hspace=0 src="" style="" vspace=2 IMG align=left alt="" border=2 hspace=0 src="" style="" vspace=2 And return what I want in an array. I need the search or piece of code to be able to differ as to which one it is using, ie/ with align or without align. I need all of the values returned in an array. Does anybody think that they could help me out with this one. I know that it is pretty tricky but I am not that good with reg exp and I need some help. Anything is very much appreciated. Thanks Guys!! Scott Mebberson -- 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] installing PHP 4.0.4pl1 on Redhat 6.2
Hi Guys, Can you install PHP 4.0.4pl1 on Redhat 6.2 - Also, apache will be installed and configured with the installation of Redhat 6.2 so is PHP 4.0.4pl1 still compatible with Redhat 6.2 and whatever version of Apache gets installed with it?? Does anybody know about MySQL aswell? Thanks Guys -- 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] Can php listen to server ports
Hi Guys, Can php listen to server ports to capture any data that is coming in? I am running linux and PHP so if there is anyother way to get the information into PHP. Anything you can offer will be a great help. Thanks Scott. -- 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]