|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
php-general Digest 6 Aug 2005 07:39:01 -0000 Issue 3609
php-general-digest-help
lists.php.net
Date: Sat Aug 06 2005 - 02:39:01 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
php-general Digest 6 Aug 2005 07:39:01 -0000 Issue 3609
Topics (messages 220094 through 220136):
Re: String to Stream
220094 by: Eric Gorr
220095 by: Jay Blanchard
220098 by: Eric Gorr
220099 by: Jay Blanchard
220100 by: Michael Sims
220102 by: Eric Gorr
220103 by: Jay Blanchard
220107 by: Jochem Maas
220111 by: Eric Gorr
220112 by: Miles Thompson
220113 by: Jochem Maas
220115 by: Eric Gorr
220116 by: Jay Blanchard
220118 by: Jochem Maas
Re: need help finding parsing error please
220096 by: Jochem Maas
220114 by: Matthew Weier O'Phinney
Re: Magic Quotes or Curley Quotes or Something
220097 by: Jochem Maas
220122 by: Lance Earl
Re: how to check http:// or https:// ?
220101 by: Jochem Maas
220104 by: Marco Tabini
220110 by: Jochem Maas
220119 by: afan.afan.net
220121 by: Matt Blasinski
Re: Is gethostbyaddr() slow?
220105 by: Kristen G. Thorson
Sending post data from a script
220106 by: Paul Nowosielski
220108 by: Jay Blanchard
220109 by: Jochem Maas
220117 by: Manuel Lemos
220134 by: Vedanta Barooah
PHP 5.0.4 on AMD64
220120 by: Joseph Oaks
220130 by: Holografix
220131 by: Joseph Oaks
Javascript Src and HTTP_REFERER
220123 by: Cabbar Duzayak
220133 by: Joe Wollard
Re: [NEWBIE GUIDE] For the benefit of new members
220124 by: Rick Emery
220125 by: Chris W. Parker
220126 by: Rick Emery
220127 by: Chris W. Parker
220129 by: Rick Emery
Can I retrieve a stored php session variable from within a javascript function?
220128 by: Mauricio Pellegrini
Return Path
220132 by: sub.pudlz.com
Re: varibles defination
220135 by: edwardspl.ita.org.mo
PHP based Menu Builder for Flash (by Stephen Fegan)
220136 by: Gurdeep Singh (Guru)
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
Jay Blanchard wrote:
> What, exactly, do you want to accomplish?
I want to be able to treat a string as a stream.
For example, the C++ STL contains istringstream, which allows one to
treat strings as streams.
(http://www.cplusplus.com/ref/iostream/istringstream/)
If you are truly wondering why such functionality is useful and examples
of usefulness, I might recommend asking at comp.lang.c++
(http://groups-beta.google.com/group/comp.lang.c++).
attached mail follows:
[snip]
Jay Blanchard wrote:
> What, exactly, do you want to accomplish?
I want to be able to treat a string as a stream.
[/snip]
I know C++ and I know what you are talking about here. As I said before,
you would have pretty high overhead to do this in PHP. However, if I
know what you want to do with the string more specifically (I asked for
examples, which you have not given) I can get you to the right PHP
functions. PHP does not have a class or function similar to
isstringstream (I have not checked phpclasses.org to see if someone has
written one, so there might be one there).
So, please provide a more precise example. You could always write an
extension if the answers I have given are not satisfactory, but I think
that PHP has many built in string functions that it can probably
manipulate a string any way that you would desire.
attached mail follows:
Jay Blanchard wrote:
> However, if I
> know what you want to do with the string more specifically (I asked for
> examples, which you have not given) I can get you to the right PHP
> functions.
I am familiar with all of the PHP string functions.
> PHP does not have a class or function similar to
> isstringstream
Ok.
I thought it might since PHP does apparently have some generic stream
functionality.
see: http://us3.php.net/stream
> (I have not checked phpclasses.org to see if someone has
> written one, so there might be one there).
I could not find any. Entering 'string stream' into the search field did
not appear to turn up anything useful.
> So, please provide a more precise example.
Please see useful examples related to istringstream. A google search
would be useful here.
> You could always write an
> extension if the answers I have given are not satisfactory, but I think
> that PHP has many built in string functions that it can probably
> manipulate a string any way that you would desire.
As you have already stated, the PHP built in string functions are not
directly capable of treating a string as a stream.
But thank you, it would appear that I will either need to write the
string out to a file and then read it back in or just use the builtin
string functions to process the string.
Neither solution was particularly appealing which is why I asked the
question.
attached mail follows:
[snip]
Neither solution was particularly appealing which is why I asked the
question.
[/snip]
I see. Sorry I couldn't be more helpful. And I thought you wore looking
for a more precise function rather than the whole lot of things that can
be accomplished with isstringstream.
attached mail follows:
Eric Gorr wrote:
> Again, I would like to treat the string as a stream.
>
> One possible way to accomplish this would be to simply write the
> string to a temporary file, open the file with fopen and then use
> fscanf, fseek, etc. to process the text.
>
> However, I am assuming there is an easier way (i.e. a method without
> the file io overhead) to be able to treat the string as a stream.
If you're willing to go the lengths of writing out a temporary file and the overhead
is the only thing that is stopping you, AND you are running on Linux, consider using
a tmpfs volume (RAM-based) and write your temp files there. That should almost
eliminate any overhead of writing the file out. tmpfs is flexible, as it grows (up
to a maximum you can set) and shrinks as necessary, and can even have its contents
paged out to the swap file if they haven't been accessed in a while. Assuming
you've got the RAM to spare, setting one up is as simple as creating a directory and
adding an entry to /etc/fstab. I've used tmpfs volumes for similar things in the
past with great success. FWIW...
attached mail follows:
Jay Blanchard wrote:
> [snip]
> Neither solution was particularly appealing which is why I asked the
> question.
> [/snip]
>
> I see. Sorry I couldn't be more helpful. And I thought you wore looking
> for a more precise function rather than the whole lot of things that can
> be accomplished with isstringstream.
Looks like it wouldn't be terribly difficult to get something like this
up and running.
I was just taking a look at:
http://us3.php.net/manual/en/function.stream-wrapper-register.php
I'm kinda surprised no one has written a wrapper for strings yet...
--
== Eric Gorr =============================== http://www.ericgorr.net ===
"Government is not reason, it is not eloquence, it is force; like fire,
a troublesome servant and a fearful master." - George Washington
== Insults, like violence, are the last refuge of the incompetent... ===
attached mail follows:
[snip]
Looks like it wouldn't be terribly difficult to get something like this
up and running.
I was just taking a look at:
http://us3.php.net/manual/en/function.stream-wrapper-register.php
I'm kinda surprised no one has written a wrapper for strings yet...
[/snip]
Perhaps because there is such a wealth of string handling functions now
that not anyone has seen a need to do so. That is why I suggested that
you might be interested in writing an extension if you see it being a
valuable tool to have in your arsenal.
attached mail follows:
Eric Gorr wrote:
> This should be a fairly easy question for someone who already knows the
> answer...
>
> What I would like to be able to do is take a string and place it into a
> 'resource' so I can use functons like fscanf, fseek to process the string.
>
> Is this possible? If so, how?
http://php.net/manual/en/function.stream-wrapper-register.php is as close as it gets
I think. - total overkill for manipulating strings IMHO - (me thinks there is atleast
one other in agreement) - there is a reason php has all those built in string functions :-)
>
> p.s. While I would be interested in possible alternative solutions, I
> would like to know how to accomplish this task even if it does not end
> up being the solution I use.
>
>
attached mail follows:
Jochem Maas wrote:
> http://php.net/manual/en/function.stream-wrapper-register.php is as
> close as it gets
> I think. - total overkill for manipulating strings IMHO - (me thinks
> there is atleast
> one other in agreement) - there is a reason php has all those built in
> string functions :-)
And there are good reasons why other very intelligent people thought
that including such functionality directly in the C++ STL and many other
libraries was a good idea too.
--
== Eric Gorr =============================== http://www.ericgorr.net ===
"I believe each individual is naturally entitled to do as he pleases
with himself and the fruits of his labor, so far as it in no way
interferes with any other man's rights." - Abraham Lincol
== Insults, like violence, are the last refuge of the incompetent... ===
attached mail follows:
But WHY WHY WHY would one want to treat a string as a stream, when PHP has
such good string handling functions?
THATS not been explained.
(Unless, knowing C and its limited string handling capabilities, one is
looking for a familiar hammer.)
It's Friday - time to go socialize - Miles
PS How do you like Canada's new Governor General? Sharper looking than the
average, middle-aged-to-ancient white male politico, which is what we have
historically been saddled with. /mt
At 04:24 PM 8/5/2005, Eric Gorr wrote:
>Jay Blanchard wrote:
>>[snip]
>>Neither solution was particularly appealing which is why I asked the
>>question.
>>[/snip]
>>I see. Sorry I couldn't be more helpful. And I thought you wore looking
>>for a more precise function rather than the whole lot of things that can
>>be accomplished with isstringstream.
>
>Looks like it wouldn't be terribly difficult to get something like this up
>and running.
>
>I was just taking a look at:
>
>http://us3.php.net/manual/en/function.stream-wrapper-register.php
>
>I'm kinda surprised no one has written a wrapper for strings yet...
>
>
>--
>== Eric Gorr =============================== http://www.ericgorr.net ===
attached mail follows:
Eric Gorr wrote:
> Jochem Maas wrote:
> > http://php.net/manual/en/function.stream-wrapper-register.php is as
>
>> close as it gets
>> I think. - total overkill for manipulating strings IMHO - (me thinks
>> there is atleast
>> one other in agreement) - there is a reason php has all those built in
>> string functions :-)
>
>
> And there are good reasons why other very intelligent people thought
> that including such functionality directly in the C++ STL and many other
> libraries was a good idea too.
indeed - but php !== c++ obviously.
personally I don't get your angle on this one, but like Jay I'd be interested
to know how you think this might be useful - so if you could give an explicit
(as poss.) example it might help us to understand.
btw do you think the functionality surrounding stream_wrapper_register()
will do it for you?
>
>
>
attached mail follows:
Jochem Maas wrote:
> Eric Gorr wrote:
>
>> Jochem Maas wrote:
>> > http://php.net/manual/en/function.stream-wrapper-register.php is as
>>
>>> close as it gets
>>> I think. - total overkill for manipulating strings IMHO - (me thinks
>>> there is atleast
>>> one other in agreement) - there is a reason php has all those built
>>> in string functions :-)
>>
>>
>>
>> And there are good reasons why other very intelligent people thought
>> that including such functionality directly in the C++ STL and many
>> other libraries was a good idea too.
>
>
> indeed - but php !== c++ obviously.
>
> personally I don't get your angle on this one, but like Jay I'd be
> interested to know how you think this might be useful - so if you
> could give an explicit (as poss.) example it might help us to
> understand.
Well, as I mentioned before, you are welcome to look into the
surrounding useful examples for istringstream, etc. I can't think of a
single reason why similar reasons why istringstream, etc. is useful
would not apply to a php stream_wrapper for strings.
As for why things like istringstream, etc. are useful, you can also head
over comp.lang.c++ and ask...I, quite simply, have no interest in a
debate or discussion I already know the final answer to....i.e. it is
useful.
> btw do you think the functionality surrounding stream_wrapper_register()
> will do it for you?
I don't see any reason why not at the moment.
--
== Eric Gorr =============================== http://www.ericgorr.net ===
"I believe each individual is naturally entitled to do as he pleases
with himself and the fruits of his labor, so far as it in no way
interferes with any other man's rights." - Abraham Lincoln
== Insults, like violence, are the last refuge of the incompetent... ===
attached mail follows:
[snip]
Well, as I mentioned before, you are welcome to look into the
surrounding useful examples for istringstream, etc. I can't think of a
single reason why similar reasons why istringstream, etc. is useful
would not apply to a php stream_wrapper for strings.
As for why things like istringstream, etc. are useful, you can also head
over comp.lang.c++ and ask...I, quite simply, have no interest in a
debate or discussion I already know the final answer to....i.e. it is
useful.
[/snip]
That is all cool Eric, we weren't looking for a debate or dicussion
either, we were trying to help. Usually people post here with a more
specific problem or issue that they are looking for a solution to.
attached mail follows:
Eric Gorr wrote:
> Jochem Maas wrote:
>
>> Eric Gorr wrote:
>>
>>> Jochem Maas wrote:
>>> > http://php.net/manual/en/function.stream-wrapper-register.php is as
>>>
>>>> close as it gets
>>>> I think. - total overkill for manipulating strings IMHO - (me thinks
>>>> there is atleast
>>>> one other in agreement) - there is a reason php has all those built
>>>> in string functions :-)
>>>
>>>
>>>
>>>
>>> And there are good reasons why other very intelligent people thought
>>> that including such functionality directly in the C++ STL and many
>>> other libraries was a good idea too.
>>
>>
>>
>> indeed - but php !== c++ obviously.
>>
>> personally I don't get your angle on this one, but like Jay I'd be
>> interested to know how you think this might be useful - so if you
>> could give an explicit (as poss.) example it might help us to
>> understand.
>
>
> Well, as I mentioned before, you are welcome to look into the
> surrounding useful examples for istringstream, etc. I can't think of a
> single reason why similar reasons why istringstream, etc. is useful
> would not apply to a php stream_wrapper for strings.
I know google - the c++ stuff is a little (my first understatement of the day :-)
over my head - couldn't find anything that made things clearer for me.
>
> As for why things like istringstream, etc. are useful, you can also head
> over comp.lang.c++ and ask...I, quite simply, have no interest in a
> debate or discussion I already know the final answer to....i.e. it is
thanks for the heads up.
> useful.
some people would say the same about guns - I don't get that either.
>
>> btw do you think the functionality surrounding stream_wrapper_register()
>> will do it for you?
>
>
> I don't see any reason why not at the moment.
thats good I guess :-)
>
>
attached mail follows:
Matthew Weier O'Phinney wrote:
> * Bruce Gilbert <webguync
gmail.com>:
>
>>Hello,
>>
>>I am getting this on the following code, and I am not sure what is
>>causing the error and need some pros to take a look at it for me.
>>
>>the error is:
>>
>>Parse error: parse error, unexpected '{' in
>>/hsphere/local/home/bruceg/inspired-evolution.com/Contact_Form2.php on
>>line 161
the error is correct. (that sounds funny)
find the line containing:
if (isset($err_msg) || isset($email_err) { echo
and look _very_ _very_ carefully at it. look again.
see it now?
I don't know if my mail client made a mess of your code layout
or if it was just a mess - if it was a mess to begin with then
I would recommend you try and be more consistent in the way you
present your code - it makes it easier to maintain and debug - granted
php doesn't care about the layout - you can write everything on a single line
if you really want. google on Coding Standards - pick a style your eyes like
and try to stick with it - you wont regret it.
>
>
> <snip>
>
>>if ($_POST['op']!='ds') {
>> // they need to see the form
>> echo "$form_block";
>> } else if ($_POST["op"] == "ds") {
>
>
> Where's the end to this elseif? You follow it immediately with the
> following lines, which simply won't work (can't define functions inside
> if() blocks).
Matthew but it's perfectly valid to define a function inside an if()
block... It generally gets doen in apps where they have to support older versions
of php and conditionally define functions if they don't exist e.g.
if (!defined("array_push")) {
function array_push($arr, $val) { /*stuff*/ }
}
>
>
>>//Function saves time and space by eliminating unneccesary code
>>function check($fieldname)
>> {
>
>
>
attached mail follows:
* Jochem Maas <jochem
iamjochem.com> :
> Matthew Weier O'Phinney wrote:
> > * Bruce Gilbert <webguync
gmail.com> :
> > >
> > > I am getting this on the following code, and I am not sure what is
> > > causing the error and need some pros to take a look at it for me.
> > >
> > > the error is:
> > >
> > > Parse error: parse error, unexpected '{' in
> > > /hsphere/local/home/bruceg/inspired-evolution.com/Contact_Form2.php on
> > > line 161
>
> the error is correct. (that sounds funny)
>
> find the line containing:
>
> if (isset($err_msg) || isset($email_err) { echo
>
> and look _very_ _very_ carefully at it. look again.
> see it now?
>
> I don't know if my mail client made a mess of your code layout
> or if it was just a mess - if it was a mess to begin with then
> I would recommend you try and be more consistent in the way you
> present your code - it makes it easier to maintain and debug - granted
> php doesn't care about the layout - you can write everything on a single line
> if you really want. google on Coding Standards - pick a style your eyes like
> and try to stick with it - you wont regret it.
+1
I personally use PEAR's CS, and made that decision a little over a year
ago. I've never looked back, and code I've had to maintain that predates
that decision gets updated -- simply because it makes maintenance and
debugging a thousandfold easier.
> > <snip>
> >
> > > if ($_POST['op']!='ds') {
> > > // they need to see the form
> > > echo "$form_block";
> > > } else if ($_POST["op"] == "ds") {
> >
> >
> > Where's the end to this elseif? You follow it immediately with the
> > following lines, which simply won't work (can't define functions inside
> > if() blocks).
>
> Matthew but it's perfectly valid to define a function inside an if()
> block... It generally gets doen in apps where they have to support older versions
> of php and conditionally define functions if they don't exist e.g.
>
> if (!defined("array_push")) {
> function array_push($arr, $val) { /*stuff*/ }
> }
D'oh! I was thinking this was an anonymous function (ala perl), and of
course it's not. Good catch, Jochem.
--
Matthew Weier O'Phinney
Zend Certified Engineer
http://weierophinney.net/matthew/
attached mail follows:
Lance Earl wrote:
> I recently upgraded my server. It is running Ubuntu Linux with PHP and
> MySQL. My site allows people to post content to their own web oages
> through a web interface. Many of my customers compose their content on a
> word processer and then cust and paste it to the web interface for
> insertion to the database and later retrevial and display on a web page.
>
> The problem I am having is that content which includes quotes is is not
> being seen correctly. Rather than inserting a slashed quote (/"), it
I don't think it's the root of your problem but I think you mean an espaced
quote - i.e. one that been 'backslashed' - \"
> inserts a bunch of strange formatted gunk. A sample of the problem anc be
> seen at www.dallypost.com/ranch/page5688.php
Marco seems to be right about the encoding - but I can;t admit to even knowing
half as much as him about that topic (make me dizzy everytime!) so I won't attempt
to thicken the plot sp to speak.
g'luck
>
> Thanks
>
>
attached mail follows:
Hi Marco,
Thanks for the help, you gave me a place to start. Before doing what would
amount to a lot of coding to correct this problem throughout my site I
wanted to see if it could be corrected on the server side.
I found the following section in the php.ini file:
; As of 4.0b4, PHP always outputs a character encoding by default in
; the Content-type: header. To disable sending of the charset, simply
; set it to be empty.
;
; PHP's built-in default is text/html
default_mimetype = "text/html"
default_charset = "utf-8"
;default_charset = "iso-8859-1"
In the default file the iso-8859-1 line was commented out so I uncommented
it to see it that would help. It changed the unreadable goop to another
type of unreadable goop but the problem remained.
I then recommented the iso-8859-1 line and added the utf-8 line. This
changed the output back to what I had before. My thinking is that since my
code worked under the older version of php, it should also work under the
newer version if I can configure it correctly.
Thanks,
Lance
> Hello Lance--
>
> On 8/5/05 2:18 PM, "Lance Earl" <lance
dallypost.com> wrote:
>
>> I recently upgraded my server. It is running Ubuntu Linux with PHP and
>> MySQL. My site allows people to post content to their own web oages
>> through a web interface. Many of my customers compose their content on a
>> word processer and then cust and paste it to the web interface for
>> insertion to the database and later retrevial and display on a web page.
>>
>> The problem I am having is that content which includes quotes is is not
>> being seen correctly. Rather than inserting a slashed quote (/"), it
>> inserts a bunch of strange formatted gunk. A sample of the problem anc
>> be
>> seen at www.dallypost.com/ranch/page5688.php
>>
>
> You have an encoding problem--the content is being uploaded to your site
> using a different encoding mechanism (most likely utf-8) than the one you
> use to display it.
>
> I'm not much of an expert in this area, but a couple of suggestions:
>
> 1. You're already outputting UTF-8 code from the looks of it, so a simple
>
> Header ("Content-type: text/html; charset=utf-8");
>
> Or even adding this to your HTML code in the <HEAD>:
>
> <META HTTP-EQUIV="content-type" CONTENT="text/html; charset=utf-8">
>
> Should do it. Remember to also use htmlentities ($data, null, "utf-8"); to
> properly encode the entities in your content.
>
> 2. Convert the text over from UTF-8 to ISO-8859-1. I think you can use
> utf8_decode, or you may have to go with the mbstring extension (not too
> sure
> here, I'd just go ahead and convert everything over to UTF-8).
>
> I'm sure some other people who have more experience with this stuff can
> give
> you even more pointers, but this should get you started.
>
> Cheers,
>
>
> Marco
>
> --
> BeebleX - The PHP Search Engine
> http://beeblex.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Lance Earl, President
DallyPost, Inc. - Equine Marketing/Training/Shows
Rockland, Idaho 208-548-2721 or 208-604-2721
lance
dallypost.com
http://www.dallypost.com http://www.dallypost.com/ranch
Horse Marketing - Clinics - Shows
attached mail follows:
Marco Tabini wrote:
> On 8/5/05 2:43 PM, "afan
afan.net" <afan
afan.net> wrote:
>
>
>>Thanks Marco!
>>:)
>>
>>I was looking for something like this on phpinfo() but didn't found?
>
>
> That's because it shows up only if you are under HTTPS! :-)
AFAICT tell you should check whether the value is actually set to 'on'
(IIRC a post by Rasmus):
e.g.
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on') {
echo 'you are secure(-ish?)';
}
SIDENOTE REGARDING BEEBLEX.COM:
I just added a bookmark in firefox to beeblex.com as follows
http://beeblex.com/search.php?d=ALLDB&s=%s
and I gave it a keyword of 'beeb'
now I can go to firefox and type 'beeb HTTPS' to get an direct hit -
so now there is no excuse not to be using Marco's cool new resource :-)
>
>
> Marco
>
>
>>
>>-afan
>>
>>Marco Tabini wrote:
>>
>>
>>>IIRC, if you're using Apache you can check
>>>
>>>If (isset ($_SERVER['HTTPS']))
>>>
>>>You can also check this thread:
>>>
>>>http://beeblex.com/lists/index.php/php.general/190410?h=%24_SERVER%5B%27HTTP
>>>S%27%5D
>>>
>>>--
>>>BeebleX - The PHP Search Engine
>>>http://beeblex.com
>>>
>>>On 8/5/05 2:05 PM, "afan
afan.net" <afan
afan.net> wrote:
>>>
>>>
>>>
>>>
>>>>Hi,
>>>>I need to check does URL use http or https?
>>>>
>>>>Right now I use this code:
>>>>
>>>>if(preg_match('/https:/', $_SERVER['SCRIPT_URI']) == false)
>>>>{
>>>> header('location: [URL]https://www.test.com/test.php[/URL]');
>>>> exit;
>>>>}
>>>>
>>>>but I am sure there is much better solution.
>>>>:)
>>>>
>>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>
>
attached mail follows:
On 8/5/05 3:24 PM, "Jochem Maas" <jochem
iamjochem.com> wrote:
> SIDENOTE REGARDING BEEBLEX.COM:
>
> I just added a bookmark in firefox to beeblex.com as follows
>
> http://beeblex.com/search.php?d=ALLDB&s=%s
> and I gave it a keyword of 'beeb'
>
> now I can go to firefox and type 'beeb HTTPS' to get an direct hit -
> so now there is no excuse not to be using Marco's cool new resource :-)
>
:-)
There's also a Firefox search toolbar with a Google passthru:
http://beeblex.com/faq/ <-- (see item #4)
Cheers,
Marco
attached mail follows:
Marco Tabini wrote:
> On 8/5/05 3:24 PM, "Jochem Maas" <jochem
iamjochem.com> wrote:
>
>>SIDENOTE REGARDING BEEBLEX.COM:
>>
>>I just added a bookmark in firefox to beeblex.com as follows
>>
>>http://beeblex.com/search.php?d=ALLDB&s=%s
>>and I gave it a keyword of 'beeb'
>>
>>now I can go to firefox and type 'beeb HTTPS' to get an direct hit -
>>so now there is no excuse not to be using Marco's cool new resource :-)
>>
>
>
> :-)
>
> There's also a Firefox search toolbar with a Google passthru:
>
> http://beeblex.com/faq/ <-- (see item #4)
<quake3arena-voice>impressive</quake3arena-voice>
really very nice indeed!
>
> Cheers,
>
>
> Marco
>
>
attached mail follows:
Right. Tested and found $_SERVER['HTTPS'] has to be 'on' :)
But, there is something in the code Jochem wrote that bothers me for a
while:
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on') {
echo 'you are secure(-ish?)';
}
Doesn't
$_SERVER['HTTPS']=='on'
automatically means
isset($_SERVER['HTTPS'])
?
I mean, if $_SERVER['HTTPS'] exists doesn't mean it's equal to 'on'
but if $_SERVER['HTTPS'] == 'on' IT MEANS $_SERVER['HTTPS'] exists
why then
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on')
-afan
Jochem Maas wrote:
> Marco Tabini wrote:
>
>> On 8/5/05 2:43 PM, "afan
afan.net" <afan
afan.net> wrote:
>>
>>
>>> Thanks Marco!
>>> :)
>>>
>>> I was looking for something like this on phpinfo() but didn't found?
>>
>>
>>
>> That's because it shows up only if you are under HTTPS! :-)
>
>
> AFAICT tell you should check whether the value is actually set to 'on'
> (IIRC a post by Rasmus):
>
> e.g.
>
> if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on') {
> echo 'you are secure(-ish?)';
> }
>
> SIDENOTE REGARDING BEEBLEX.COM:
>
> I just added a bookmark in firefox to beeblex.com as follows
>
> http://beeblex.com/search.php?d=ALLDB&s=%s
> and I gave it a keyword of 'beeb'
>
> now I can go to firefox and type 'beeb HTTPS' to get an direct hit -
> so now there is no excuse not to be using Marco's cool new resource :-)
>
>>
>>
>> Marco
>>
>>
>>>
>>> -afan
>>>
>>> Marco Tabini wrote:
>>>
>>>
>>>> IIRC, if you're using Apache you can check
>>>>
>>>> If (isset ($_SERVER['HTTPS']))
>>>>
>>>> You can also check this thread:
>>>>
>>>> http://beeblex.com/lists/index.php/php.general/190410?h=%24_SERVER%5B%27HTTP
>>>>
>>>> S%27%5D
>>>>
>>>> --
>>>> BeebleX - The PHP Search Engine
>>>> http://beeblex.com
>>>>
>>>> On 8/5/05 2:05 PM, "afan
afan.net" <afan
afan.net> wrote:
>>>>
>>>>
>>>>
>>>>
>>>>> Hi,
>>>>> I need to check does URL use http or https?
>>>>>
>>>>> Right now I use this code:
>>>>>
>>>>> if(preg_match('/https:/', $_SERVER['SCRIPT_URI']) == false)
>>>>> {
>>>>> header('location: [URL]https://www.test.com/test.php[/URL]');
>>>>> exit;
>>>>> }
>>>>>
>>>>> but I am sure there is much better solution.
>>>>> :)
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>
>>
>
>
>
>
attached mail follows:
True, but if you check that it's equal to 'on' and it doesn't exist,
you'll get a warning. If you want to avoid the warning, check that it
exists first.
Matt
> I mean, if $_SERVER['HTTPS'] exists doesn't mean it's equal to 'on'
> but if $_SERVER['HTTPS'] == 'on' IT MEANS $_SERVER['HTTPS'] exists
>
> why then
> if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on')
>
>
> -afan
>
>
> Jochem Maas wrote:
>
>> Marco Tabini wrote:
>>
>>> On 8/5/05 2:43 PM, "afan
afan.net" <afan
afan.net> wrote:
>>>
>>>
>>>> Thanks Marco!
>>>> :)
>>>>
>>>> I was looking for something like this on phpinfo() but didn't found?
>>>
>>>
>>>
>>>
>>> That's because it shows up only if you are under HTTPS! :-)
>>
>>
>>
>> AFAICT tell you should check whether the value is actually set to 'on'
>> (IIRC a post by Rasmus):
>>
>> e.g.
>>
>> if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on') {
>> echo 'you are secure(-ish?)'; }
>>
>> SIDENOTE REGARDING BEEBLEX.COM:
>>
>> I just added a bookmark in firefox to beeblex.com as follows
>>
>> http://beeblex.com/search.php?d=ALLDB&s=%s
>> and I gave it a keyword of 'beeb'
>>
>> now I can go to firefox and type 'beeb HTTPS' to get an direct hit -
>> so now there is no excuse not to be using Marco's cool new resource :-)
>>
>>>
>>>
>>> Marco
>>>
>>>
>>>>
>>>> -afan
>>>>
>>>> Marco Tabini wrote:
>>>>
>>>>
>>>>> IIRC, if you're using Apache you can check
>>>>>
>>>>> If (isset ($_SERVER['HTTPS']))
>>>>>
>>>>> You can also check this thread:
>>>>>
>>>>> http://beeblex.com/lists/index.php/php.general/190410?h=%24_SERVER%5B%27HTTP
>>>>>
>>>>> S%27%5D
>>>>>
>>>>> --
>>>>> BeebleX - The PHP Search Engine
>>>>> http://beeblex.com
>>>>>
>>>>> On 8/5/05 2:05 PM, "afan
afan.net" <afan
afan.net> wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> Hi,
>>>>>> I need to check does URL use http or https?
>>>>>>
>>>>>> Right now I use this code:
>>>>>>
>>>>>> if(preg_match('/https:/', $_SERVER['SCRIPT_URI']) == false)
>>>>>> {
>>>>>> header('location: [URL]https://www.test.com/test.php[/URL]');
>>>>>> exit;
>>>>>> }
>>>>>>
>>>>>> but I am sure there is much better solution.
>>>>>> :)
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>
>>>
>>
>>
>>
>>
>
--
Matt Blasinski (mbv)
Information Systems Technology Services Professional
Internet Infrastructure Applications Technology
Division of Information Technology
3228 Computer Science and Statistics
1210 West Dayton Street
Madison WI 53706
Work (608) 263-4865
Personal Cell (608) 347-6940
<?php
echo "You can have it fast, cheap, or working. Choose two.";
?>
attached mail follows:
kalinga wrote:
>On 8/4/05, Kristen G. Thorson <kthorson
allegroconsultants.com> wrote:
>
>
>>kalinga wrote:
>>
>>
>>
>>>if you are quering a external host, the bad network conditions may
>>>
>>>cause delay in results.
>>>
>>>if your server is connected to a heavily loaded hub/ cheap switch, or
>>>the target hosts DNS servers are poorly configured/ slow in responce
>>>it adds further delay to your result.
>>>
>>>try dig/ nslookup on your server for the target hostname/address, you
>>>may experience the same delay as with the php function.
>>>
>>>
>>>
>>>
>>>
>>Thanks for the reply. The problem I had - and that I was trying to
>>briefly describe - is not quite explained by slow DNS lookup, at least
>>not so far. I have one script, run on the same machine:
>>
>>takes less than 1 second on CLI:
>>
>># php gethostbyname.php
>>Content-type: text/html
>>X-Powered-By: PHP/4.3.2
>>
>>gethostbyname(www.imakenews.com) took 0.0010 s and resolved to
>>208.254.39.65<br>
>>gethostbyname(rssnewsapps.ziffdavis.com) took 0.0005 s and resolved to
>>63.87.252.162<br>
>>gethostbyname(itpapers.zdnet.com) took 0.1922 s and resolved to
>>216.239.113.159<br>
>>gethostbyname(rssnewsapps.ziffdavis.com) took 0.0005 s and resolved to
>>63.87.252.162<br>
>>
>>
>>Running CLI again, host names are apparently cached, because then they
>>all return in .0005 seconds.
>>
>>takes 20 seconds under Apache 2.0.46:
>>
>>gethostbyname(www.imakenews.com) took 5.0071 s and resolved to
>>208.254.39.65
>>gethostbyname(rssnewsapps.ziffdavis.com) took 5.0099 s and resolved to
>>63.87.252.162
>>gethostbyname(itpapers.zdnet.com) took 5.0097 s and resolved to
>>216.239.113.159
>>gethostbyname(rssnewsapps.ziffdavis.com) took 5.0099 s and resolved to
>>63.87.252.162
>>
>>
>>This will happen consistently, with less than 1/100 s variation in time
>>for each lookup.
>>
>>
>>Any DNS lookup tools are perfectly fast when run from the command line.
>>Also, other machines in the same subnet, using the same DNS servers,
>>using 99% same apache config files (I diff'ed 'em) run just as fast
>>under same apache/php version as they do command line. It's hard to
>>imagine what external DNS problem could exist that would affect only one
>>of our servers, and on that one, only apache/php and nothing command
>>line. Something else is going on, but my initial tries of
>>downgrading/upgrading both php and apache haven't made a different yet.
>>Perhaps you have another suggestion?
>>
>>
>
>could you please mention the environment, i mean, the os, and the
>versions of php? is it binary install or a compile?
>
>
>
All binaries - RH-packaged rpms.
Working version (takes < 1 second for each gethostbyname() call under
CLI and under apache):
# rpm -qa | grep php
php-odbc-4.3.2-23.ent
php-imap-4.3.2-23.ent
php-pgsql-4.3.2-23.ent
php-4.3.2-23.ent
php-ldap-4.3.2-23.ent
php-mysql-4.3.2-23.ent
# rpm -qa | grep httpd
httpd-2.0.46-46.ent
redhat-config-httpd-1.1.0-4.30.2
httpd-devel-2.0.46-46.ent
# uname -r -o -i -s
Linux 2.4.21-4.ELsmp i386 GNU/Linux
Not working (takes 5 seconds for each gethostbyname() call under apache,
but < 1 second under CLI):
# rpm -qa | grep php
php-imap-4.3.2-23.ent
php-4.3.2-23.ent
php-odbc-4.3.2-23.ent
php-mysql-4.3.2-23.ent
php-ldap-4.3.2-23.ent
php-pgsql-4.3.2-23.ent
# rpm -qa | grep httpd
httpd-2.0.46-46.ent
redhat-config-httpd-1.1.0-4.30.2
httpd-devel-2.0.46-46.ent
# uname -r -o -i -s
Linux 2.4.21-4.ELsmp i386 GNU/Linux
The function returns correctly, but it takes about 5 seconds every
time. After I run the script the first time on the "not working"
machine, it looks like the names are cached for the CLI, as they tend to
take only .0005 seconds to resolve.
Thanks for the help.
kgt
attached mail follows:
Hi All,
I'm trying to setup a PHP script that will send a POST data request to a
web form. The script needs to be automatic and not driven by a web form.
For example.
I have a cron script that runs every 15 minutes. The cron script calls
my php script on the server and sends the important data to a web based
form without human interaction. The data has to be passed with the
method="post". Sending the data via a URL request does not suffice.
So my question in general is: How can I send HTTP POST data to a remote
interface without using an HTML FORM?.
Any suggestions would be appreciated.
TIA!
--
Paul Nowosielski
Webmaster CelebrityAccess.com
303.440.0666 ext:219
attached mail follows:
[snip]
I'm trying to setup a PHP script that will send a POST data request to a
web form. The script needs to be automatic and not driven by a web form.
For example.
I have a cron script that runs every 15 minutes. The cron script calls
my php script on the server and sends the important data to a web based
form without human interaction. The data has to be passed with the
method="post". Sending the data via a URL request does not suffice.
So my question in general is: How can I send HTTP POST data to a remote
interface without using an HTML FORM?.
Any suggestions would be appreciated.
[/snip]
http://www.php.net/curl
attached mail follows:
Paul Nowosielski wrote:
> Hi All,
>
> I'm trying to setup a PHP script that will send a POST data request to a
> web form. The script needs to be automatic and not driven by a web form.
>
> For example.
>
> I have a cron script that runs every 15 minutes. The cron script calls
> my php script on the server and sends the important data to a web based
> form without human interaction. The data has to be passed with the
> method="post". Sending the data via a URL request does not suffice.
>
> So my question in general is: How can I send HTTP POST data to a remote
> interface without using an HTML FORM?.
>
> Any suggestions would be appreciated.
assuming the cron script in written in php ;-) ....
try the curl extension - should do nicely:
http://php.net/curl
>
>
> TIA!
>
attached mail follows:
Hello,
on 08/05/2005 04:33 PM Paul Nowosielski said the following:
> I'm trying to setup a PHP script that will send a POST data request to a
> web form. The script needs to be automatic and not driven by a web form.
>
> For example.
>
> I have a cron script that runs every 15 minutes. The cron script calls
> my php script on the server and sends the important data to a web based
> form without human interaction. The data has to be passed with the
> method="post". Sending the data via a URL request does not suffice.
>
> So my question in general is: How can I send HTTP POST data to a remote
> interface without using an HTML FORM?.
You may want to take a look at this HTTP client class. Besides
submitting POST form values, it also handles redirection and cookies if
necessary.
http://www.phpclasses.org/httpclient
--
Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
attached mail follows:
here is an example that posts data to the altavista babelfish form using curl:
http://www.phpclasses.org/browse/file/9812.html
thanks,
--
*~:~*~:~*~:~*~:~*~:~*~:~*~:~*~:~*~:~*~:~*
Vedanta Barooah
On 8/6/05, Manuel Lemos <mlemos
acm.org> wrote:
> Hello,
>
> on 08/05/2005 04:33 PM Paul Nowosielski said the following:
> > I'm trying to setup a PHP script that will send a POST data request to a
> > web form. The script needs to be automatic and not driven by a web form..
> >
> > For example.
> >
> > I have a cron script that runs every 15 minutes. The cron script calls
> > my php script on the server and sends the important data to a web based
> > form without human interaction. The data has to be passed with the
> > method="post". Sending the data via a URL request does not suffice.
> >
> > So my question in general is: How can I send HTTP POST data to a remote
> > interface without using an HTML FORM?.
>
> You may want to take a look at this HTTP client class. Besides
> submitting POST form values, it also handles redirection and cookies if
> necessary.
>
> http://www.phpclasses.org/httpclient
>
>
> --
>
> Regards,
> Manuel Lemos
>
> PHP Classes - Free ready to use OOP components written in PHP
> http://www.phpclasses.org/
>
> PHP Reviews - Reviews of PHP books and other products
> http://www.phpclasses.org/reviews/
>
> Metastorage - Data object relational mapping layer generator
> http://www.meta-language.net/metastorage.html
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
So, heres the deal, I'm running Fedora Core 3 on an dual proc AMD64 system.
I have compiled Apache 2.0.54, and PHP 5.0.4, when I try to start apache
I am given an error. The error is as follows...
[root
hal1 conf]# /etc/rc.d/init.d/httpd start
Starting httpd: Syntax error on line 24 of /opt/apache-2.0.54/conf/httpd.conf:
Cannot load /opt/apache-2.0.54/modules/libphp5.so into server:
/opt/apache-2.0.54/modules/libphp5.so: cannot restore segment prot after
reloc:
Permission denied
The only thing I'm finding on google is about /usr/lib64 well I don't have a
/usr/lib64, its just /usr/lib so that can't be the issue.
Any suggestion would be appreciated.
thanks
Joe
--
"Computers are like air conditioners - they stop working properly when you
open Windows"
attached mail follows:
Hi
Take a look here: http://forums.fedoraforum.org/showthread.php?t=59163
I had that problem too.
Regards
holografix
""Joseph Oaks"" <trell
trells.com> escreveu na mensagem
news:20050805.Td6.66325500
webmail.trells.com...
> So, heres the deal, I'm running Fedora Core 3 on an dual proc AMD64
> system.
>
> I have compiled Apache 2.0.54, and PHP 5.0.4, when I try to start apache
> I am given an error. The error is as follows...
>
> [root
hal1 conf]# /etc/rc.d/init.d/httpd start
> Starting httpd: Syntax error on line 24 of
> /opt/apache-2.0.54/conf/httpd.conf:
> Cannot load /opt/apache-2.0.54/modules/libphp5.so into server:
> /opt/apache-2.0.54/modules/libphp5.so: cannot restore segment prot after
> reloc:
> Permission denied
>
> The only thing I'm finding on google is about /usr/lib64 well I don't have
> a
> /usr/lib64, its just /usr/lib so that can't be the issue.
>
> Any suggestion would be appreciated.
> thanks
>
> Joe
>
> --
> "Computers are like air conditioners - they stop working properly when you
> open Windows"
attached mail follows:
Thanks, I will give that a try, and let you know.
Joe
Holografix (holografix
gmail.com) wrote:
>
> Hi
>
> Take a look here: http://forums.fedoraforum.org/showthread.php?t=59163
>
> I had that problem too.
>
> Regards
> holografix
>
>
> ""Joseph Oaks"" <trell
trells.com> escreveu na mensagem
> news:20050805.Td6.66325500
webmail.trells.com...
> > So, heres the deal, I'm running Fedora Core 3 on an dual proc AMD64
> > system.
> >
> > I have compiled Apache 2.0.54, and PHP 5.0.4, when I try to start apache
> > I am given an error. The error is as follows...
> >
> > [root
hal1 conf]# /etc/rc.d/init.d/httpd start
> > Starting httpd: Syntax error on line 24 of
> > /opt/apache-2.0.54/conf/httpd.conf:
> > Cannot load /opt/apache-2.0.54/modules/libphp5.so into server:
> > /opt/apache-2.0.54/modules/libphp5.so: cannot restore segment prot after
> > reloc:
> > Permission denied
> >
> > The only thing I'm finding on google is about /usr/lib64 well I don't have
> > a
> > /usr/lib64, its just /usr/lib so that can't be the issue.
> >
> > Any suggestion would be appreciated.
> > thanks
> >
> > Joe
> >
> > --
> > "Computers are like air conditioners - they stop working properly when you
> > open Windows"
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
"Computers are like air conditioners - they stop working properly when you
open Windows"
attached mail follows:
Hi,
I have a web page (say page1) which refers to a php within javascript tag as:
<script type="text/javascript"
src="http://mysite.com/javascript_dump.php"></script>
As you can see, this calls a php file which dumps javascript. The
problem here is, within this php I couldn't get which page it is
called from.
Basically, if it comes from affiliate site 1, I will show some
content, and if it comes from affiliate site 2, I will show some other
content.
And, the thing is, within this javascript_dump.php, HTTP_REFERER shows
nothing, because it gives you the referer of the html page (page1)
that contains this <script> tag (which might be something irrelevant,
i.e. google), and remote_addr gives you the IP address of the user.
I know that I can add a simple query parameter to specify the source
web page such as: javascript_dump.php?siteid=xyz, but this can be
faked very easily, and anyone can introduce themselves as any
affiliate.
Is there a way of getting (within the php) the site this php was
called from in a reasonably secure way? Any ideas/suggestions?
Thanks..
attached mail follows:
I haven't tested this and it's off the top of my head so don't shoot
me if I'm off track here ;-)
You could possibly use some embedded javascript to set a cookie with
the current URL stored in it. This would be easy to spoof as well,
but not quite as easy as appending ?site=xyz.
(shrug) just a thought
On Aug 5, 2005, at 6:58 PM, Cabbar Duzayak wrote:
> Hi,
>
> I have a web page (say page1) which refers to a php within
> javascript tag as:
>
> <script type="text/javascript"
> src="http://mysite.com/javascript_dump.php"></script>
>
> As you can see, this calls a php file which dumps javascript. The
> problem here is, within this php I couldn't get which page it is
> called from.
>
> Basically, if it comes from affiliate site 1, I will show some
> content, and if it comes from affiliate site 2, I will show some other
> content.
>
> And, the thing is, within this javascript_dump.php, HTTP_REFERER shows
> nothing, because it gives you the referer of the html page (page1)
> that contains this <script> tag (which might be something irrelevant,
> i.e. google), and remote_addr gives you the IP address of the user.
>
> I know that I can add a simple query parameter to specify the source
> web page such as: javascript_dump.php?siteid=xyz, but this can be
> faked very easily, and anyone can introduce themselves as any
> affiliate.
>
> Is there a way of getting (within the php) the site this php was
> called from in a reasonably secure way? Any ideas/suggestions?
>
> Thanks..
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
Quoting Jay Blanchard <jay.blanchard
niicommunications.com>:
> 6. PHP is a server side scripting language. Whatever processing PHP does
> takes place BEFORE the output reaches the client. Therefore, it is not
> possible to access users' computer related information (OS, screen size
> etc) using PHP. Nor can you modify any the user side settings. You need
> to go for JavaScript and ask the question in a JavaScript list.
Since you brought it up :-)
Can anybody recommend a good JavaScript mailing list?
Thanks,
Rick
--
Rick Emery
"When once you have tasted flight, you will forever walk the Earth
with your eyes turned skyward, for there you have been, and there
you will always long to return"
-- Leonardo Da Vinci
attached mail follows:
Rick Emery <mailto:rick
emery.homelinux.net>
on Friday, August 05, 2005 4:20 PM said:
> Can anybody recommend a good JavaScript mailing list?
If by anybody you mean Google, then yes anybody can recommend a good
JavaScript mailing list.
Hope this helps!
Chris.
attached mail follows:
Quoting "Chris W. Parker" <cparker
swatgear.com>:
> Rick Emery <mailto:rick
emery.homelinux.net>
> on Friday, August 05, 2005 4:20 PM said:
>
>> Can anybody recommend a good JavaScript mailing list?
>
> If by anybody you mean Google, then yes anybody can recommend a good
> JavaScript mailing list.
Well, as I found out when I Google'd before I posted, it *lists* plenty
of JavaScript mailing lists. But it can hardly "recommend a good" one,
which is what I asked for, can it? I was soliciting opinions.
Thanks for the reply anyway,
Rick
--
Rick Emery
"When once you have tasted flight, you will forever walk the Earth
with your eyes turned skyward, for there you have been, and there
you will always long to return"
-- Leonardo Da Vinci
attached mail follows:
Rick Emery <mailto:rick
emery.homelinux.net>
on Friday, August 05, 2005 4:54 PM said:
> Well, as I found out when I Google'd before I posted, it *lists*
> plenty of JavaScript mailing lists. But it can hardly "recommend a
> good" one, which is what I asked for, can it? I was soliciting
> opinions.
Yes I know, but I was hoping you wouldn't notice (because that's what
makes the joke so great)! :)
Chris.
attached mail follows:
Quoting "Chris W. Parker" <cparker
swatgear.com>:
> Rick Emery <mailto:rick
emery.homelinux.net>
> on Friday, August 05, 2005 4:54 PM said:
>
>> Well, as I found out when I Google'd before I posted, it *lists*
>> plenty of JavaScript mailing lists. But it can hardly "recommend a
>> good" one, which is what I asked for, can it? I was soliciting
>> opinions.
>
> Yes I know, but I was hoping you wouldn't notice (because that's what
> makes the joke so great)! :)
Oh, I get it now :-)
There has been a lot mentioned lately about checking Google before
posting, and I didn't want anyone to think that I hadn't Google'd
before I posted (I've actually joined a mailing list I found that way,
but was looking for good recommendations). I apologize if I came off a
little defensive.
Thanks,
Rick
--
Rick Emery
"When once you have tasted flight, you will forever walk the Earth
with your eyes turned skyward, for there you have been, and there
you will always long to return"
-- Leonardo Da Vinci
attached mail follows:
Hi ,
I wonder if it's possible to retrieve the value from a php session
variable from within a javascript function.
Does anyone have any ideas about this?
Thank you
Mauricio
attached mail follows:
I don't seem to be able to set the "return path" using the mail() function. I can't figure out why "from" will let me set it, but not the return path.
$headers = 'From: sender
pudlz.com' . "\r\n" .
'Return-path: sender
pudlz.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($email, $subject, $message, $headers);
Any thoughts?
Andrew Darrow
Kronos1 Productions
www.pudlz.com
attached mail follows:
> > How can we define and display the varibles by using for loop
> > function ?
>
> <?php
> for ($x=0;$x<10;$x++){
> $func[$x]=$x;
> }
> print_r($func);
> ?>
If I want to define a set of varibles ( two dimension array, eg : $func[0,0] )
and via the varibles of form tag ( format, eg : $_GET["varname"] or
$_POST["varname"] )...
How about the example ?
Edward.
attached mail follows:
Hi All,
I am trying to develop a script that would add/delete/modify the menus
in the Flash (http://www.netsoc.ucd.ie/flash/)
The file that is used to build the menu is "system.menu" located in the
/usr/slocal/lib/flash/ directory.
So far I have made few scripts that would take inputs from the user and
add them into a database. I am stuck on the output part. The idea is to
query database and sent the output of the query to the file system.menu
I have attached my scripts and db file to this email. Any help would be
highly appreciated.
Thanks,
Guru.
-- phpMyAdmin SQL Dump
-- version 2.6.3-pl1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Aug 06, 2005 at 01:09 PM
-- Server version: 4.1.10
-- PHP Version: 4.3.9
--
-- Database: `nterm`
--
-- --------------------------------------------------------
--
-- Table structure for table `customermenu`
--
CREATE TABLE `customermenu` (
`customermenu` varchar(15) NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `customermenu`
--
INSERT INTO `customermenu` VALUES ('cust1');
INSERT INTO `customermenu` VALUES ('cust2');
INSERT INTO `customermenu` VALUES ('cust3');
-- --------------------------------------------------------
--
-- Table structure for table `devicemenu`
--
CREATE TABLE `devicemenu` (
`ID` int(5) NOT NULL auto_increment,
`nhid` varchar(15) NOT NULL default '',
`mainmenu` varchar(15) NOT NULL default '',
`customermenu` varchar(15) NOT NULL default '',
`ipaddre` varchar(15) NOT NULL default '',
`epass` varchar(30) NOT NULL default '',
PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;
--
-- Dumping data for table `devicemenu`
--
INSERT INTO `devicemenu` VALUES (2, 'NMMUMGURU', 'Servers', 'company', '4.2.2.2', 'lol');
-- --------------------------------------------------------
--
-- Table structure for table `mainmenu`
--
CREATE TABLE `mainmenu` (
`mainmenu` varchar(15) NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `mainmenu`
--
INSERT INTO `mainmenu` VALUES ('Firewalls');
INSERT INTO `mainmenu` VALUES ('Core Devices');
INSERT INTO `mainmenu` VALUES ('Juni Devices');
INSERT INTO `mainmenu` VALUES ('Servers');
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]