php-general Digest 17 May 2002 12:02:32 -0000 Issue 1350

Topics (messages 97988 through 98049):

Re: Can anyone help me save img from URL?
        97988 by: Victor Polyushko

Re: Done w/ PHP - VB or C# ?
        97989 by: Miguel Cruz
        97990 by: Victor Polyushko
        97991 by: Peter

Re: Date and time functions
        97992 by: Miguel Cruz
        97993 by: David Freeman

Re: PHP and MySQL
        97994 by: Miguel Cruz

Re: Newline in fputs
        97995 by: Miguel Cruz

remote fetching??
        97996 by: Gerard Samuel
        98004 by: Miguel Cruz

PHP in HTML
        97997 by: Jeremy
        97998 by: Justin French
        97999 by: Peter
        98007 by: Jerome Houston
        98008 by: Peter
        98009 by: Jason Wong
        98010 by: Miguel Cruz
        98013 by: Peter
        98017 by: Miguel Cruz
        98019 by: Peter

Re: Generate every possible combination
        98000 by: Lance Lovette

Re: Passing to an Applet
        98001 by: Dennis Moore
        98002 by: Peter

can any one see a problem with this script?
        98003 by: Peter
        98005 by: Steve Buehler
        98006 by: Peter
        98011 by: Jason Wong

Sending data from java applet on client ?
        98012 by: Marco Laponder

Can anyone help me with fopen ?
        98014 by: Roman Duriancik
        98022 by: Jason Wong

Multiple Upload using list
        98015 by: Triax
        98021 by: Jason Wong

Problem with sending information with quotes
        98016 by: Rosen
        98018 by: Miguel Cruz

Re: [PHP-DEV] Console application with PHP
        98020 by: D Lau

DOMXML question
        98023 by: peter tatischev

Looking for web based email
        98024 by: Craig
        98025 by: Mark Harwood
        98026 by: Brian McGarvie

file error
        98027 by: Roman Duriancik

Using php as a scripting language within cron jobs?
        98028 by: Henry Grech-Cini
        98030 by: Jason Wong
        98031 by: Jon Haworth
        98034 by: David Robley
        98039 by: Brian McGarvie
        98046 by: Michael Virnstein
        98047 by: Brian McGarvie
        98049 by: Jon Haworth

Re: some Javascript functions with PHP
        98029 by: savaidis

Re: Gettext and PHP4.2.0?
        98032 by: Danny Shepherd

Query/Error
        98033 by: Anthony Rodriguez
        98040 by: Jason Wong

search engine indexing and redirects
        98035 by: Adrian Murphy
        98044 by: Michael Virnstein

Installing PHP with Apache and Sybase on Linux
        98036 by: Vivek Kumar Agrawal
        98038 by: Jason Wong
        98042 by: Vivek Kumar Agrawal

array question
        98037 by: Josh Edwards
        98041 by: Jason Wong

PHP,CyberCash,Verisign,PayFlow
        98043 by: r

problem with strtolower()
        98045 by: David Orn Johannsson

Executing PHP code throught a protected directory on IIS...
        98048 by: Brian McGarvie

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
BINGO!! thank you guys for your input
I used a very simple command to accomplish that and it works!!
<?
$command="wget http://domain.com/images/somepic.gif";;
system( $command, $result);
echo $result; ?>

Victor Polyushko

----- Original Message -----
From: "Robert Cummings" <[EMAIL PROTECTED]>
To: "Victor Polyushko" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, May 16, 2002 2:25 PM
Subject: Re: [PHP] Can anyone help me save img from URL?


> Victor Polyushko wrote:
> >
> > Hi Guys,
> >
> > Thank you fo your input. I am sorry I am new to the list so + English is
not
> > my first language :-( anyhow., I shoudl 've made my question more clear.
> >
> > I am trying to save the image from the given URL
> > (http://domain.com/image.gif) running a PHP script on the page. I have
tried
> > fread() and it does not allow me to accomplish that :-((
> >
> > Have you guys ever come across such a problem?
>
> $imageData = implode( '', file( 'http://domain.com/image.gif' ) );
> $length = strlen( $imageData );
>
> if( $length > 0 )
> {
>     if( (fh = fopen( 'destination', 'w' )) )
>     {
>         fwrite( fh, $imageData );
>     }
> }
>
>
> Cheers,
> Rob.
> --
> .-----------------.
> | Robert Cummings |
> :-----------------`----------------------------.
> | Webdeployer - Chief PHP and Java Programmer  |
> :----------------------------------------------:
> | Mail  : mailto:[EMAIL PROTECTED] |
> | Phone : (613) 731-4046 x.109                 |
> :----------------------------------------------:
> | Website : http://www.webmotion.com           |
> | Fax     : (613) 260-9545                     |
> `----------------------------------------------'
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
On Thu, 16 May 2002, Victor Polyushko wrote:
> Does anyone know if there is any global reliable and free :-) statistics on
> usage of PHP vs ASP. I am having the same dilemma.,  do I need to stick to
> going deeply into PHP (which in my opinion rulez!!) or start paying more
> attention to ASP...

I think it's pretty hard to measure usage... what would a meaningful 
metric be? Number of servers with ASP available? Number of virtual hosts? 
Number of page views served by ASP vs PHP? Number of active developers?

miguel

--- End Message ---
--- Begin Message ---
hmm.. good question,
I guess number of active job openings will be the best measure :-))
(or websites using PHP vs ASP)




----- Original Message -----
From: "Miguel Cruz" <[EMAIL PROTECTED]>
To: "Victor Polyushko" <[EMAIL PROTECTED]>
Cc: "Php" <[EMAIL PROTECTED]>
Sent: Thursday, May 16, 2002 5:11 PM
Subject: Re: [PHP] Done w/ PHP - VB or C# ?


> On Thu, 16 May 2002, Victor Polyushko wrote:
> > Does anyone know if there is any global reliable and free :-) statistics
on
> > usage of PHP vs ASP. I am having the same dilemma.,  do I need to stick
to
> > going deeply into PHP (which in my opinion rulez!!) or start paying more
> > attention to ASP...
>
> I think it's pretty hard to measure usage... what would a meaningful
> metric be? Number of servers with ASP available? Number of virtual hosts?
> Number of page views served by ASP vs PHP? Number of active developers?
>
> miguel
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
I think he was meaning in terms of PHP can do this ASP can't .. ASP can do
that this way and PHP does it that way.. etc..

-----Original Message-----
From: Miguel Cruz [mailto:[EMAIL PROTECTED]]
Sent: Friday, 17 May 2002 10:11 AM
To: Victor Polyushko
Cc: Php
Subject: Re: [PHP] Done w/ PHP - VB or C# ?


On Thu, 16 May 2002, Victor Polyushko wrote:
> Does anyone know if there is any global reliable and free :-) statistics
on
> usage of PHP vs ASP. I am having the same dilemma.,  do I need to stick to
> going deeply into PHP (which in my opinion rulez!!) or start paying more
> attention to ASP...

I think it's pretty hard to measure usage... what would a meaningful
metric be? Number of servers with ASP available? Number of virtual hosts?
Number of page views served by ASP vs PHP? Number of active developers?

miguel


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--- End Message ---
--- Begin Message ---
On Fri, 17 May 2002, DC wrote:
> I am on the East Coast of Australia.
> 
> Do you know if by default if the date/time display will display only
> East coast Australia time, or will display from the user's time zone? eg
> Will USA users see the Australian time or their own time? Would this
> cause a issue with timestamping an order when it comes to writing to a
> mySQL database?

It'll always use the server's time zone unless you explicitly tell it 
otherwise.

> Can someone suggest a script that may give me the option to offer both  time
> zones to the user?

Best is to store times in your server's native time zone, then ask users 
for their preferred time zone and recalculate times as you display them. 
That way all users can be accommodated with the same set of data.

miguel

--- End Message ---
--- Begin Message ---

 > I am on the East Coast of Australia.

I'm in central Queensland...

 > Do you know if by default if the date/time display will 
 > display only East coast Australia time, or will display  
 > from the user's time zone? eg Will USA users see the 
 > Australian time or their own time? Would this cause a issue 
 > with timestamping an order when it comes to writing to a 
 > mySQL database?

I presume we're talking about php date/time stuff here?  In that case,
php gets it's date/time from the server it is running on.  If your
server is on the east coast of Australia then you'll have local time for
east coast of Aust.

One way to deal with this would be to take everything back to GMT/UTC/Z
and use that instead.  Then all you need to do is add an appropriate
adjustment to get local time where ever the browser is - of course, you
may not easily be able to figure that out so it's not necessarily a
perfect solution.

In the end, the solution will depend on your requirements.  What are you
using a timestamp for?  If it's purely as a reference point in database
queries (i.e. all changes in the past two days, or 10 mins) then it
probably doesn't matter all that much.  Your database will be updated
from your server and your server has a consistent internal time.

If your application is date dependant in an absolute way then it becomes
a little harder I guess.  Although, you'd also ask yourself how relevant
it becomes to someone in a vastly different time zone - i.e. if you're
doing a local event calendar (which just happens to be one of the things
I'm doing right now) then the fact that an event might be happening
right now instead of this time tomorrow (from the perspective of someone
on the other side of the world and their time zone) is largely
immaterial - they aren't going to get there anyway.

Perhaps the simplest approach to that is to include a time/date
reference.  If you're going to include date information let the browser
know the context.  So, you advertise the next 'xxx' event will be at 3PM
17 May and tell them that it's 10:30AM on 17 May right now.  Leave any
relevant math up to them.

 > Can someone suggest a script that may give me the option to 
 > offer both  time zones to the user?

You could probably do something in javascript (being client-side it
knows the time in the browsers' location) to work out equivalencies and
conversions if you like.

CYA, Dave


--- End Message ---
--- Begin Message ---
On Thu, 16 May 2002, City Colleges of Chicago - Mannheim wrote:
> <SELECT name = "quantity" size="1">
> <OPTION value="1">1</OPTION>
> <OPTION value="2">2</OPTION>
> <OPTION value="3">3</OPTION>
> <OPTION value="4">4</OPTION>
> <OPTION value="5">5</OPTION>
> <OPTION value="6">6</OPTION>
> <OPTION value="7">7</OPTION>
> <OPTION value="8">8</OPTION>
> <OPTION value="9">9</OPTION>
> <OPTION value="10">10</OPTION>
> </SELECT>

This wasn't your question, but...

<select name='quantity' size='1'>
<? for ($i = 1; $i <=10; $i++) print "<option value='$i'>$i</option>"; ?>
</select>

miguel

--- End Message ---
--- Begin Message ---
On Thu, 16 May 2002, Henry Grech-Cini wrote:
> header("Content-type: Application/octet-stream");
> 
> The downloaded file does not contain Windows type carriage returns of
> newlines! However it does contains the data thank goodness.

If you want the newlines converted, then you need to use a text data type,
not application/octet-stream. Try text/plain, for instance.

miguel

--- End Message ---
--- Begin Message ---
I was about to modify a script that fetches files for xml content.  It 
currently does so using fsockopen.
I originally was going to use plain fopen, and I know that curl can also 
be used.
Im looking for preferences as to use one method over another.  Why one 
is better than the other etc.
Thanks for any input you may provide...

--- End Message ---
--- Begin Message ---
On Thu, 16 May 2002, Gerard Samuel wrote:
> I was about to modify a script that fetches files for xml content.  It 
> currently does so using fsockopen.
> I originally was going to use plain fopen, and I know that curl can also 
> be used.
> Im looking for preferences as to use one method over another.  Why one 
> is better than the other etc.
> Thanks for any input you may provide...

fopen() is less work and is more portable (doesn't require cURL to be 
built on the server) so if it works, excellent. Otherwise, cURL provides 
a huge amount of additional flexibility. But if you don't need it, it 
doesn't get you anything.

miguel

--- End Message ---
--- Begin Message ---
Hi Folks,

A simple question that has me puzzled, obviously I have a config file wrong
somewhere..

Why does a filename.php file run as php and a filename.html with php code
embedded not produce a php result?

cheers,

Jeremy Burton
Senior Consultant
PERTH TOURIST LOUNGE

Level 2 Carillon City
Murray Street, Perth
Ph: +618 9229 2238
Fax: +618 9229 2220
Email: [EMAIL PROTECTED]



--- End Message ---
--- Begin Message ---
Your Apache config file will be set to only parse PHP pages if they have the
.php extension.... this is a feature, not a big, because otherwise every
html page on your server will be parsed, rather than just the php ones...
you could modify your apache config iff you wished, but I wouldn't.  .html
for HTML, .php for PHP, all is well.

Justin French


on 17/05/02 12:14 PM, Jeremy ([EMAIL PROTECTED]) wrote:

> Hi Folks,
> 
> A simple question that has me puzzled, obviously I have a config file wrong
> somewhere..
> 
> Why does a filename.php file run as php and a filename.html with php code
> embedded not produce a php result?
> 
> cheers,
> 
> Jeremy Burton
> Senior Consultant
> PERTH TOURIST LOUNGE
> 
> Level 2 Carillon City
> Murray Street, Perth
> Ph: +618 9229 2238
> Fax: +618 9229 2220
> Email: [EMAIL PROTECTED]
> 
> 
> 

--- End Message ---
--- Begin Message ---
if your using apache for you web server .. in httpd.conf you can set it so
you have the following config..
(this is on windows but same basically applies to other OS's)

LoadModule php4_module c:/phpdev/php/sapi/php4apache.dll
AddType application/x-httpd-php .php .html

this will enable .html files to be run through php at the moment you'd have
like this

LoadModule php4_module c:/phpdev/php/sapi/php4apache.dll
AddType application/x-httpd-php .php

there for .html are not run through php and there for the php code in there
is not going to be of use..

hope that helped.



-----Original Message-----
From: Jeremy [mailto:[EMAIL PROTECTED]]
Sent: Friday, 17 May 2002 12:14 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP in HTML


Hi Folks,

A simple question that has me puzzled, obviously I have a config file wrong
somewhere..

Why does a filename.php file run as php and a filename.html with php code
embedded not produce a php result?

cheers,

Jeremy Burton
Senior Consultant
PERTH TOURIST LOUNGE

Level 2 Carillon City
Murray Street, Perth
Ph: +618 9229 2238
Fax: +618 9229 2220
Email: [EMAIL PROTECTED]




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--- End Message ---
--- Begin Message ---
yeah, just find in your web server where to tell it what kind of files to 
send through php.

there are also possible good reasons for sending .html files through php.  
like if you don't want users to know that your website is written in php.

-jerome


----Original Message Follows----
From: Justin French <[EMAIL PROTECTED]>
To: Jeremy <[EMAIL PROTECTED]>

Your Apache config file will be set to only parse PHP pages if they have the
.php extension.... this is a feature, not a big, because otherwise every
html page on your server will be parsed, rather than just the php ones...
you could modify your apache config iff you wished, but I wouldn't.  .html
for HTML, .php for PHP, all is well.

Justin French


on 17/05/02 12:14 PM, Jeremy ([EMAIL PROTECTED]) wrote:

 > Hi Folks,
 >
 > A simple question that has me puzzled, obviously I have a config file 
wrong
 > somewhere..
 >
 > Why does a filename.php file run as php and a filename.html with php code
 > embedded not produce a php result?
 >
 > cheers,
 >
 > Jeremy Burton
 > Senior Consultant
 > PERTH TOURIST LOUNGE
 >
 > Level 2 Carillon City
 > Murray Street, Perth
 > Ph: +618 9229 2238
 > Fax: +618 9229 2220
 > Email: [EMAIL PROTECTED]
 >
 >
 >


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.

--- End Message ---
--- Begin Message ---

<snip>

there are also possible good reasons for sending .html files through php.
like if you don't want users to know that your website is written in php.

-jerome
</snip>


a better way to do that would be to make up your own extension so instead of
having your server use .php for php files make it use .web or what ever you
like ...

--- End Message ---
--- Begin Message ---
On Friday 17 May 2002 13:33, Jerome Houston wrote:
> yeah, just find in your web server where to tell it what kind of files to
> send through php.
>
> there are also possible good reasons for sending .html files through php.
> like if you don't want users to know that your website is written in php.

Unless it has been configured otherwise, they can tell from the HTTP headers 
that you're using php.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
A student who changes the course of history is probably taking an exam.
*/

--- End Message ---
--- Begin Message ---
On Fri, 17 May 2002, Peter wrote:
>> there are also possible good reasons for sending .html files through
>> php. like if you don't want users to know that your website is written
>> in php.
> 
> a better way to do that would be to make up your own extension so
> instead of having your server use .php for php files make it use .web or
> what ever you like ...

Why is that better? 

There are certain little weirdnesses that crop up when HTML pages have 
file names that fool lesser platforms into thinking they're not HTML, 
especially when they try to save them locally.

miguel

--- End Message ---
--- Begin Message ---
I find it better than having every page go thru php not to mention quicker.



-----Original Message-----
From: Miguel Cruz [mailto:[EMAIL PROTECTED]]
Sent: Friday, 17 May 2002 3:52 PM
To: Peter
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] PHP in HTML


On Fri, 17 May 2002, Peter wrote:
>> there are also possible good reasons for sending .html files through
>> php. like if you don't want users to know that your website is written
>> in php.
> 
> a better way to do that would be to make up your own extension so
> instead of having your server use .php for php files make it use .web or
> what ever you like ...

Why is that better? 

There are certain little weirdnesses that crop up when HTML pages have 
file names that fool lesser platforms into thinking they're not HTML, 
especially when they try to save them locally.

miguel


--- End Message ---
--- Begin Message ---
Do you really find it noticeable quicker? Benchmarks I've seen (none of
them that current) don't seem to support that. Depending on the software
versions involved, it seems to be anywhere from much faster through PHP to
a few % slower. Certainly no major penalty in any case.

If there's interest I'd be willing to do some benchmarks on a few 
different setups to see where things stand with current software.

miguel

On Fri, 17 May 2002, Peter wrote:
> I find it better than having every page go thru php not to mention quicker.
> 
> 
> 
> -----Original Message-----
> From: Miguel Cruz [mailto:[EMAIL PROTECTED]]
> Sent: Friday, 17 May 2002 3:52 PM
> To: Peter
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PHP] PHP in HTML
> 
> 
> On Fri, 17 May 2002, Peter wrote:
> >> there are also possible good reasons for sending .html files through
> >> php. like if you don't want users to know that your website is written
> >> in php.
> > 
> > a better way to do that would be to make up your own extension so
> > instead of having your server use .php for php files make it use .web or
> > what ever you like ...
> 
> Why is that better? 
> 
> There are certain little weirdnesses that crop up when HTML pages have 
> file names that fool lesser platforms into thinking they're not HTML, 
> especially when they try to save them locally.
> 
> miguel
> 
> 
> 
> 

--- End Message ---
--- Begin Message ---
true there's not that much difference .. though it would depend on the
server's connection speed as well as the machines "grunt" as to how much of
a difference there is.

-----Original Message-----
From: Miguel Cruz [mailto:[EMAIL PROTECTED]]
Sent: Friday, 17 May 2002 4:40 PM
To: Peter
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] PHP in HTML


Do you really find it noticeable quicker? Benchmarks I've seen (none of
them that current) don't seem to support that. Depending on the software
versions involved, it seems to be anywhere from much faster through PHP to
a few % slower. Certainly no major penalty in any case.

If there's interest I'd be willing to do some benchmarks on a few
different setups to see where things stand with current software.

miguel

On Fri, 17 May 2002, Peter wrote:
> I find it better than having every page go thru php not to mention
quicker.
>
>
>
> -----Original Message-----
> From: Miguel Cruz [mailto:[EMAIL PROTECTED]]
> Sent: Friday, 17 May 2002 3:52 PM
> To: Peter
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PHP] PHP in HTML
>
>
> On Fri, 17 May 2002, Peter wrote:
> >> there are also possible good reasons for sending .html files through
> >> php. like if you don't want users to know that your website is written
> >> in php.
> >
> > a better way to do that would be to make up your own extension so
> > instead of having your server use .php for php files make it use .web or
> > what ever you like ...
>
> Why is that better?
>
> There are certain little weirdnesses that crop up when HTML pages have
> file names that fool lesser platforms into thinking they're not HTML,
> especially when they try to save them locally.
>
> miguel
>
>
>
>


--- End Message ---
--- Begin Message ---
Here's the function I use:

// array array_permute(array [, string])
//
// Returns an array containing the permutations of the values in an array.
//
// Example:
// $a = array(1, 2, 3);
// $p = array_permute($a)
//
// Result:
// p[0] = '1,2,3'
// p[1] = '1,3,2'
// p[2] = '2,1,3'
// p[3] = '2,3,1'
// p[4] = '3,2,1'
// p[5] = '3,1,2'
//
function array_permute(&$a, $glue = ',')
{
        $retval = array();
        array_permute_internal($a, $glue, $retval, 0, count($a));
        return $retval;
}

// Private function used by array_permute.
function array_permute_internal(&$a, $glue, &$retval, $depth, $ubound)
{
        if ($ubound > 0)
        {
                for ($i=0; $i < $ubound; $i++)
                {
                        $c = $a[$depth+$i];
                        $a[$depth+$i] = $a[$depth];
                        $a[$depth] = $c;
                        array_permute_internal($a, $glue, $retval, $depth+1, 
$ubound-1);
                        $c = $a[$depth+$i];
                        $a[$depth+$i] = $a[$depth];
                        $a[$depth] = $c;
                }
        }
        else
        {
                $retval[] = implode($glue, $a);
        }
}

-----Original Message-----
From: Evan Nemerson [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 16, 2002 12:17 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Generate every possible combination


I need to generate every possible combination of the the values in an array.
For example, if...

$array = Array("A", "B", "C");

I want to be able to do something like

print_r(magic_function($array));

which would output

Array
(
        [0] => "ABC"
        [1] => "ACB"
        [2] => "BAC"
        [3] => "BCA"
        [4] => "CAB"
        [5] => "CBA"
)

I really have no idea where to begin. The best lead I can think of is that
there are going to be n! elements in the output array, where n is the size
of
the input array.

Any help would be greatly appreciated.


Evan



--
Think not those faithful who praise all thy words and actions, but those who
kindly reprove thy faults.

Socrates


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--- End Message ---
--- Begin Message ---
Am I missing something?  This is too easy... But here goes...

<applet code="replayer.class" height="323" width="352">
    <param  name="FILEPREFIX" VALUE="<?php echo $FILEPREFIX; ?>">
    <param  name="FILETYPE" VALUE=".jpg">
    <param  name="BARON" value="bar_on.gif">
    <param  name="BAROFF" value="bar_off.gif">
    <param  name="BARHEIGHT" value="35">
    <param  name="DELAY" value="1000">
    <param  name="MININDEX" value="0">
    <param  name="MAXINDEX" value="<?php echo $MAXINDEX?>">
    </applet>




----- Original Message -----
From: "Joshua Baker" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 16, 2002 5:18 PM
Subject: [PHP] Passing to an Applet


All right I've seen in done in jsp and asp, but I'd like to know if I can do
it in PHP as well.

I've got an applet, which is in the page replay.php, with these parameters
that I need to fill from a URL.
<applet code="replayer.class" height="323" width="352">
    <param  name="FILEPREFIX" VALUE="">
    <param  name="FILETYPE" VALUE=".jpg">
    <param  name="BARON" value="bar_on.gif">
    <param  name="BAROFF" value="bar_off.gif">
    <param  name="BARHEIGHT" value="35">
    <param  name="DELAY" value="1000">
    <param  name="MININDEX" value="0">
    <param  name="MAXINDEX" value="">
    </applet>

I need to pass 2 parameter in the URL from another page to this one, those
parameters are
FILEPREFIX and MAXINDEX.

I've set my link to read as <a
href="replay.php?FILEPREFIX=archive_042102/ruby_&MAXINDEX=1415">

The question is how to I, if I can, use PHP to take those variables from the
URL string and use them for the values on that page.

I know most people want to just say RTFM or look it up, but at this point if
anyone could just tell me what this would be under or where exactly this
info is, if it's possible in php.  Thanks

Anti-Blank
Site Designer/Unix Admin



--- End Message ---
--- Begin Message ---
Should be

<applet code="replayer.class" height="323" width="352">
    <param  name="FILEPREFIX" VALUE="<?php echo $FILEPREFIX; ?>">
    <param  name="FILETYPE" VALUE=".jpg">
    <param  name="BARON" value="bar_on.gif">
    <param  name="BAROFF" value="bar_off.gif">
    <param  name="BARHEIGHT" value="35">
    <param  name="DELAY" value="1000">
    <param  name="MININDEX" value="0">
    <param  name="MAXINDEX" value="<?php echo $MAXINDEX; ?>">
    </applet>

;)


-----Original Message-----
From: Dennis Moore [mailto:[EMAIL PROTECTED]]
Sent: Friday, 17 May 2002 1:10 PM
To: Joshua Baker; [EMAIL PROTECTED]
Subject: Re: [PHP] Passing to an Applet


Am I missing something?  This is too easy... But here goes...

<applet code="replayer.class" height="323" width="352">
    <param  name="FILEPREFIX" VALUE="<?php echo $FILEPREFIX; ?>">
    <param  name="FILETYPE" VALUE=".jpg">
    <param  name="BARON" value="bar_on.gif">
    <param  name="BAROFF" value="bar_off.gif">
    <param  name="BARHEIGHT" value="35">
    <param  name="DELAY" value="1000">
    <param  name="MININDEX" value="0">
    <param  name="MAXINDEX" value="<?php echo $MAXINDEX?>">
    </applet>




----- Original Message -----
From: "Joshua Baker" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 16, 2002 5:18 PM
Subject: [PHP] Passing to an Applet


All right I've seen in done in jsp and asp, but I'd like to know if I can do
it in PHP as well.

I've got an applet, which is in the page replay.php, with these parameters
that I need to fill from a URL.
<applet code="replayer.class" height="323" width="352">
    <param  name="FILEPREFIX" VALUE="">
    <param  name="FILETYPE" VALUE=".jpg">
    <param  name="BARON" value="bar_on.gif">
    <param  name="BAROFF" value="bar_off.gif">
    <param  name="BARHEIGHT" value="35">
    <param  name="DELAY" value="1000">
    <param  name="MININDEX" value="0">
    <param  name="MAXINDEX" value="">
    </applet>

I need to pass 2 parameter in the URL from another page to this one, those
parameters are
FILEPREFIX and MAXINDEX.

I've set my link to read as <a
href="replay.php?FILEPREFIX=archive_042102/ruby_&MAXINDEX=1415">

The question is how to I, if I can, use PHP to take those variables from the
URL string and use them for the values on that page.

I know most people want to just say RTFM or look it up, but at this point if
anyone could just tell me what this would be under or where exactly this
info is, if it's possible in php.  Thanks

Anti-Blank
Site Designer/Unix Admin




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--- End Message ---
--- Begin Message ---
hi can any one see a problem with this script .. I am trying to use
phpbuilder's rss link for a site but am having errors

<?php

$content .= "<TABLE BORDER=0 WIDTH=0%>\n<TR>\n";
$content .= "<TD><B>test</B></TD>\n";
$content .= "</TR>\n";
$content .= "<tr><td>\n";
//line 8 starts {
$fp = fopen("http://www.phpbuilder.com/rss_feed.php?type=general&limit=10 ",
"r") or die("Error reading RSS data.");
// } line 8 finishes

fclose($fp);

$content .= "</td></tr>\n";
$content .= "</TABLE>\n";

echo $content;
?>

The error is as follows

Warning: php_hostconnect: connect failed in c:\phpdev\www\test.php on line 8

Warning: fopen("http://www.phpbuilder.com/rss_feed.php?type=general&limit=10
","r") - Bad file descriptor in c:\phpdev\www\test.php on line 8
Error reading RSS data.

Cheers

Peter
"the only dumb question is the one that wasn't asked"


--- End Message ---
--- Begin Message ---
Not sure, but it might be the space that you have after the limit=10

Steve

At 11:39 PM 5/16/2002, Peter wrote:
>hi can any one see a problem with this script .. I am trying to use
>phpbuilder's rss link for a site but am having errors
>
><?php
>
>$content .= "<TABLE BORDER=0 WIDTH=0%>\n<TR>\n";
>$content .= "<TD><B>test</B></TD>\n";
>$content .= "</TR>\n";
>$content .= "<tr><td>\n";
>//line 8 starts {
>$fp = fopen("http://www.phpbuilder.com/rss_feed.php?type=general&limit=10 ",
>"r") or die("Error reading RSS data.");
>// } line 8 finishes
>
>fclose($fp);
>
>$content .= "</td></tr>\n";
>$content .= "</TABLE>\n";
>
>echo $content;
>?>
>
>The error is as follows
>
>Warning: php_hostconnect: connect failed in c:\phpdev\www\test.php on line 8
>
>Warning: 
>fopen("http://www.phpbuilder.com/rss_feed.php?type=general&limit=10","r";) 
>- Bad file descriptor in c:\phpdev\www\test.php on line 8
>Error reading RSS data.
>
>Cheers
>
>Peter
>"the only dumb question is the one that wasn't asked"
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
I have also tried

adding the r option as I only want to read the file as follows

$fp = fopen("http://www.phpbuilder.com/rss_feed.php?type=general&limit=10";,
"r") or die("Error reading RSS data.");

but I still get the same error message..


-----Original Message-----
From: Steve Buehler [mailto:[EMAIL PROTECTED]]
Sent: Friday, 17 May 2002 2:55 PM
To: Peter; Php
Subject: Re: [PHP] can any one see a problem with this script?


Not sure, but it might be the space that you have after the limit=10

Steve

At 11:39 PM 5/16/2002, Peter wrote:
>hi can any one see a problem with this script .. I am trying to use
>phpbuilder's rss link for a site but am having errors
>
><?php
>
>$content .= "<TABLE BORDER=0 WIDTH=0%>\n<TR>\n";
>$content .= "<TD><B>test</B></TD>\n";
>$content .= "</TR>\n";
>$content .= "<tr><td>\n";
>//line 8 starts {
>$fp = fopen("http://www.phpbuilder.com/rss_feed.php?type=general&limit=10
",
>"r") or die("Error reading RSS data.");
>// } line 8 finishes
>
>fclose($fp);
>
>$content .= "</td></tr>\n";
>$content .= "</TABLE>\n";
>
>echo $content;
>?>
>
>The error is as follows
>
>Warning: php_hostconnect: connect failed in c:\phpdev\www\test.php on line
8
>
>Warning:
>fopen("http://www.phpbuilder.com/rss_feed.php?type=general&limit=10","r";)
>- Bad file descriptor in c:\phpdev\www\test.php on line 8
>Error reading RSS data.
>
>Cheers
>
>Peter
>"the only dumb question is the one that wasn't asked"
>
>
>
>--
>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


--- End Message ---
--- Begin Message ---
On Friday 17 May 2002 13:26, Peter wrote:
> I have also tried
>
> adding the r option as I only want to read the file as follows
>
> $fp = fopen("http://www.phpbuilder.com/rss_feed.php?type=general&limit=10";,
> "r") or die("Error reading RSS data.");
>
> but I still get the same error message..

This works fine for me:

<?php
$fp = 
fopen("http://www.phpbuilder.com/rss_feed.php?type=general&limit=10","r";);
fpassthru($fp);
?>

Check the archives & bugs.php.net to see whether there are any issues with 
fopen() & URLs with Windows.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
The young lady had an unusual list,
Linked in part to a structural weakness.
She set no preconditions.
*/

--- End Message ---
--- Begin Message ---
Hi All,
 
Does anybody know how to send binary data from an applet to a php page and
save this into a blob ? Or is using  afile upload my only option ( would
like that because then it would have to be a signed applet :-( )
 
Any suggestions welcome !

Marco Laponder
( [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> )
 
 
--- End Message ---
--- Begin Message ---
I have some text file, in this text file i write some information.
But my problem is : How write/append new information on beginning of
document but
old information will be there too. When I used fopen with option "a" or "r+"
and
with command rewind new information rewrited old information.
Thanks for yours help.

roman

--- End Message ---
--- Begin Message ---
On Friday 17 May 2002 14:30, Roman Duriancik wrote:
> I have some text file, in this text file i write some information.
> But my problem is : How write/append new information on beginning of
> document but
> old information will be there too. When I used fopen with option "a" or
> "r+" and
> with command rewind new information rewrited old information.

Read the old file into an array, prepend the new stuff to the array, write out 
the whole array overwriting the old file. Shouldn't be much of a problem if 
your files are not too large (say less than 10MB).

Maybe you should look at restructuring your file so that new stuff are added 
to the /end/ of the file.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Dear Lord: Please make my words sweet and tender, for tomorrow I may
have to eat them.
*/

--- End Message ---
--- Begin Message ---
Hello,
    currently I want to implement a multiple upload using a listbox.
    I have 2 link which will dynamically add or remove a file to/from the
list box,
    I'm writing it as a java script as below.
---------------------------------------------------------
function addFile(){
 var temp, ext;
 document.mform.filUpload.click();
 if(document.mform.filUpload.value != ""){
  ext = document.mform.filUpload.value;
  ext = ext.substring(ext.length-3,ext.length);
  ext = ext.toLowerCase();
  if ((ext == 'jpg') || (ext == 'gif')) {
   temp = new Option();
   temp.text = document.mform.filUpload.value;
   temp.value = document.mform.filUpload.value;
   document.mform.elements['lstUpload[]'].add(temp, 1);
  }
  else
   alert("Invalid file type selected");
 }
---------------------------------------------------------
    Upon sbumitting, my php script can only read the local drive directory
instead of the
    temporary directory on the server.
    When I did a copy function, it tell me that it cant copy as the source
file does not exist.
    Below is part of my php script.
---------------------------------------------------------
  if(!isset($WINDIR)) $filename = str_replace("\\\\", "\\", $lstUpload[$i]);
    .....
   if(!copy($filename,
"/home/fotohub/public_html/memPhotos/$usrID/$img_name") ){
    echo "Failed to copy"; exit();
   }
----------------------------------------------------------
    Below is my html
----------------------------------------------------------
    <form name="mform" method="post" action="<? echo $PHP_SELF ?>"
enctype="multipart/form-data" onSubmit="return check();">
    ....
    <select name="lstUpload[]" size="8" multiple> </select>
    ....
    <--!  This will create a link Add Foto... which will open up the file
browser window. -->
    <a href='javascript:addFile()'>
    <input id='filUpload' type='file' style='position:absolute;top:-200'
name="file"> Add Foto ... </a>
----------------------------------------------------------
    Can anyone help me out in how to get the temporary file name?

Thanks
     from Triax


--- End Message ---
--- Begin Message ---
On Friday 17 May 2002 14:30, Triax wrote:
> Hello,
>     currently I want to implement a multiple upload using a listbox.
>     I have 2 link which will dynamically add or remove a file to/from the
> list box,

> ---------------------------------------------------------
>     Upon sbumitting, my php script can only read the local drive directory
> instead of the
>     temporary directory on the server.
>     When I did a copy function, it tell me that it cant copy as the source
> file does not exist.
>     Below is part of my php script.
> ---------------------------------------------------------
>   if(!isset($WINDIR)) $filename = str_replace("\\\\", "\\",
> $lstUpload[$i]); .....
>    if(!copy($filename,
> "/home/fotohub/public_html/memPhotos/$usrID/$img_name") ){
>     echo "Failed to copy"; exit();
>    }

How are you getting the filename(s) (both temp and actual) of the uploaded 
file(s)? Did you not read/follow the example in the manual?

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Immanuel Kant but Kubla Khan.
*/

--- End Message ---
--- Begin Message ---
Hi,
I have follow PHP file test.php:


if ($action=="")
{
echo "<FORM name=\"pp\" action=\"test.php\" method=\"post\" >";
echo "<TEXTAREA name=\"text\"  rows=\"5\" cols=\"50\"  maxlength=\"250\"
style=\"width:350px\"></TEXTAREA>";
echo "<INPUT name=\"send\" type=\"submit\" style=\"width:80px\" ></INPUT>";
echo "<INPUT name=\"action\" type=\"hidden\" value=\"send\"></INPUT>";
echo "</form>";
}

if ($action=="send")
{

echo "$text";

// if in the input form I enter something with quotes, i.e.  "TEST"
//    here the value of $text  is   \"TEST\"         . The PHP send value to
me with backslah.
//
//    How can I get the real entered, i.e. "TEST" ? Where is the problem ?

}


Thanks,
Rosen Marinov


--- End Message ---
--- Begin Message ---
On Fri, 17 May 2002, Rosen wrote:
> // if in the input form I enter something with quotes, i.e.  "TEST"
> //    here the value of $text  is   \"TEST\"         . The PHP send value to
> me with backslah.
> //
> //    How can I get the real entered, i.e. "TEST" ? Where is the problem ?

http://php.net/stripslashes

miguel

--- End Message ---
--- Begin Message ---
Sorry, I forgot to say my requirement is to make this a browser only
application.
Would all these still works?

Thanks
Dominic

----- Original Message -----
From: "Vail, Warren" <[EMAIL PROTECTED]>
To: "'Markus Fischer'" <[EMAIL PROTECTED]>; "DoL"
<[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, May 17, 2002 5:31 AM
Subject: RE: [PHP] Re: [PHP-DEV] Console application with PHP


> Does this work on Windows, or is it restricted to Linux/unix?
>
>
> Warren Vail
> Tools, Metrics & Quality Processes
> (415) 667-7814
> Pager (877) 774-9891
> 215 Fremont 02-658
>
>
> -----Original Message-----
> From: Markus Fischer [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 16, 2002 11:58 AM
> To: DoL
> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: [PHP] Re: [PHP-DEV] Console application with PHP
>
>
>     Hi,
>
>     all is possible. I suggest taking a look at
>     http://gtk.php.net/ and
>     http://www.php.net/manual/en/features.commandline.php for a
>     start.
>
>     - Markus
>
> On Fri, May 17, 2002 at 12:12:20AM +0800, DoL wrote :
> > Hi All
> >
> > I am trying to write something similar to a server console display, is
it
> a
> > good idea to use PHP?
> >
> > Wondering how things like
> > 1. server clock (similar to a clock applet)
> > 2. server status
> > can be displayed with PHP code?
> >
> > Note: I need to display the above two in a continuous fashion on the
> status
> > bar!!
> >
> > Many Thanks
> > Dominic
> >
> >
> >
> >
> > --
> > PHP Development Mailing List <http://www.php.net/>
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> Please always Cc to me when replying to me on the lists.
> GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
> ---------------------------------------------------------
> "I mean "When in doubt, blame mcrypt" is more often right than wrong :)"
> "Always right, never wrong :)"
> - Two PHP developers who want to remain unnamed
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
What is the type of array returned by child_nodes()?
I have an XML doc parsed into a DOM structure by
$docnode = domxml_open_file("blah")

then I get root by
$root = $docnode->document_element();
then I get the first node 
$f_child = $root->first_child();
and then I want to get an array of all the children of f_child,
like this
$children = $f_child->child_nodes();
presumably it should give me an array of dom_nodes, and I should
be able to perform actions with those, e.g.
$children[0]->node_type();
or something similar, however, I get 
<b>Fatal error</b>:  Call to a member function on a non-object in 

Am I missing something here?

--- End Message ---
--- Begin Message ---
I am in the process of developing a website with a webmail system similar in
functions to hotmail
Does anyone have any suggestions for where to start?

thanks

craig


--- End Message ---
--- Begin Message ---
Take a look at some others...

http://www.hotscripts.com/PHP/Scripts_and_Programs/Email_Systems/Web-based_E
mail/


"Craig" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I am in the process of developing a website with a webmail system similar
in
> functions to hotmail
> Does anyone have any suggestions for where to start?
>
> thanks
>
> craig
>
>


--- End Message ---
--- Begin Message ---
www.horde.org/imp/

> -----Original Message-----
> From: Craig [mailto:[EMAIL PROTECTED]]
> Sent: 17 May 2002 9:46 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Looking for web based email
> 
> 
> I am in the process of developing a website with a webmail 
> system similar in
> functions to hotmail
> Does anyone have any suggestions for where to start?
> 
> thanks
> 
> craig
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
--- End Message ---
--- Begin Message ---
I have this code :
 $text = file("http://www.hokej.sk/spravy/?id=16159";);
  echo count($text);
  for ($i=0;$i<count($text);$i++):
       echo $text[$i];
  endfor;

when in file commnad i insert page from local net or our web server this
script run correctly but if i insert page from internet i have this error
event

Warning: php_hostconnect: connect failed in
d:\programovanie\php\ftp\skuska.php on line 2

Warning: file("http://www.hokej.sk/spravy/?id=16159";) - Bad file descriptor
in d:\skuska.php on line 2


--- End Message ---
--- Begin Message ---
Hi All,

Is this possible?

I really don't want to go back to perl5 to setup an autoresponder system!

Henry


--- End Message ---
--- Begin Message ---
On Friday 17 May 2002 18:11, Henry Grech-Cini wrote:
> Hi All,
>
> Is this possible?

Yes, compile php as a stand-alone binary, see manual for details.

> I really don't want to go back to perl5 to setup an autoresponder system!

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Friends may come and go, but enemies accumulate.
                -- Thomas Jones
*/

--- End Message ---
--- Begin Message ---
Hi Henry,

> Is this possible?

yup.

Set your cron job up as "lynx -dump http://www.myserver.com/myscript.php >
/dev/null" (or pipe it to a logfile if you fancy) - obviously, you'll need
lynx installed for this to work :-)

Cheers
Jon
--- End Message ---
--- Begin Message ---
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] 
says...
> Hi All,
> 
> Is this possible?
> 
> I really don't want to go back to perl5 to setup an autoresponder system!
> 
> Henry

Just compile php as an executable (without --with-apache or --with-apxs 
options) and use the #! syntax in the first line of your script.

Cheers
-- 
David Robley
Temporary Kiwi!

Quod subigo farinam
--- End Message ---
--- Begin Message ---
yip it's possible in exactly the same way as you would Perl,

use:

#/path/to/php

/*
  php code
*/

<eof>

and add it to cron as you would a perl script

> -----Original Message-----
> From: Henry Grech-Cini [mailto:[EMAIL PROTECTED]]
> Sent: 17 May 2002 11:12 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Using php as a scripting language within cron jobs?
> 
> 
> Hi All,
> 
> Is this possible?
> 
> I really don't want to go back to perl5 to setup an 
> autoresponder system!
> 
> Henry
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
--- End Message ---
--- Begin Message ---
> Set your cron job up as "lynx -dump http://www.myserver.com/myscript.php >
> /dev/null" (or pipe it to a logfile if you fancy) - obviously, you'll need
> lynx installed for this to work :-)

but this is only needed only if you compile php into apache or am i wrong?
if i have the cgi version installed, i can call the php script
directly from the shell. The only thing for me to do then, is to set
 #!/path.to/php in the first line of the script, right?

Regards Michael

"Jon Haworth" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
67DF9B67CEFAD4119E4200D0B720FA3F010C40D4@BOOTROS">news:67DF9B67CEFAD4119E4200D0B720FA3F010C40D4@BOOTROS...
> Hi Henry,
>
> > Is this possible?
>
> yup.
>
> Set your cron job up as "lynx -dump http://www.myserver.com/myscript.php >
> /dev/null" (or pipe it to a logfile if you fancy) - obviously, you'll need
> lynx installed for this to work :-)
>
> Cheers
> Jon


--- End Message ---
--- Begin Message ---
correct...

> -----Original Message-----
> From: Michael Virnstein [mailto:[EMAIL PROTECTED]]
> Sent: 17 May 2002 12:57 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Using php as a scripting language within cron jobs?
> 
> 
> > Set your cron job up as "lynx -dump 
> http://www.myserver.com/myscript.php >
> > /dev/null" (or pipe it to a logfile if you fancy) - 
> obviously, you'll need
> > lynx installed for this to work :-)
> 
> but this is only needed only if you compile php into apache 
> or am i wrong?
> if i have the cgi version installed, i can call the php script
> directly from the shell. The only thing for me to do then, is to set
>  #!/path.to/php in the first line of the script, right?
> 
> Regards Michael
> 
> "Jon Haworth" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> 67DF9B67CEFAD4119E4200D0B720FA3F010C40D4@BOOTROS">news:67DF9B67CEFAD4119E4200D0B720FA3F010C40D4@BOOTROS...
> > Hi Henry,
> >
> > > Is this possible?
> >
> > yup.
> >
> > Set your cron job up as "lynx -dump 
> http://www.myserver.com/myscript.php >
> > /dev/null" (or pipe it to a logfile if you fancy) - 
> obviously, you'll need
> > lynx installed for this to work :-)
> >
> > Cheers
> > Jon
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
--- End Message ---
--- Begin Message ---
Hi Michael,

> > Set your cron job up as "lynx -dump http://www.myserver.com/myscript.php
>
> > /dev/null" (or pipe it to a logfile if you fancy) - obviously, you'll
need
> > lynx installed for this to work :-)
> 
> but this is only needed only if you compile php into apache or am i wrong?
> if i have the cgi version installed, i can call the php script
> directly from the shell. The only thing for me to do then, is to set
>  #!/path.to/php in the first line of the script, right?

Spot on. As a couple of others have pointed out, you can compile PHP to be a
standalone interpreter and then write scripts for it - personally I always
use it as a module, and I find using lynx works perfectly... if it ain't
broken, don't fix it...


Cheers
Jon
--- End Message ---
--- Begin Message ---
And what about resolution of the screen?
How is possible to keep it in record too or to tailor the page?

(get_browser() is not supported from my server, I'm waiting my sypport team
answer about "browscap.ini")

Thanks


Makis


> -----Original Message-----
> From: Kevin Stone [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 16, 2002 8:16 PM
> To: savaidis; [EMAIL PROTECTED]
> Subject: Re: [PHP] some Javascript functions with PHP
>
>
> The user's IP address is stored in the PHP global, $REMOTE_ADDR.  Browser
> information can be extracted from the get_browser()
>  function.  http://www.php.net/manual/en/function.get-browser.php
> -Kevin
>
> ----- Original Message -----
> From: "savaidis" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, May 16, 2002 7:44 AM
> Subject: [PHP] some Javascript functions with PHP
>
>
> >
> > I use:
> > print('<SCRIPT LANGUAGE="JavaScript">');
> > print('document.write("Code Name: "+navigator.appCodeName+"<BR>");');
> > print('</SCRIPT>');
> >
> > How is possible to keep this info to a MySQL database with PHP?
> > I think is not possible becouse PHP runs first.
> > Also how is possible to get with PHP info like this (browser type ecc)
> > and user's IP address  without Javascript?
> > Or use Javascript and then run a php script to write it to the MySQL
> > database?
> >
> >
> > Thanks
> >
> > Prodromos Savaidis
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>

--- End Message ---
--- Begin Message ---
My guess is that it's something to do with the =shared. In your phpinfo()
output, there should be a table about half way down which says

 GetText Support enabled

When I compiled (bsd so it may be different for you) I
used --with-gettext=/usr/local/ the gettext binary is in /usr/local/bin and
the lib is in /usr/local/lib - find out where gettext is on your setup and
adjust the config option accordingly.

HTH

Danny.

----- Original Message -----
From: "Bram van Leur" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 16, 2002 6:38 PM
Subject: [PHP] Gettext and PHP4.2.0?


> Hi everyone,
>
> I've recently (for once in my life!) succesfully compiled PHP4.2.0 using
> the following configure command-line:
> './configure' '--prefix=/usr' '--with-config-file-path=/etc'
> '--disable-debug' '--enable-pic' '--enable-inline-optimization'
> '--with-apxs=/usr/sbin/apxs' '--with-exec-dir=/usr/bin'
> '--with-regex=system' '--with-gettext=shared' '--with-zlib'
> '--with-gdbm' '--with-layout=GNU' '--enable-debugger'
> '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem=shared'
> '--enable-sysvshm=shared' '--enable-track-vars' '--enable-yp'
> '--enable-ftp' '--enable-wddx' '--without-unixODBC' '--without-oracle'
> '--without-oci8' '--with-mysql=/usr' '--with-gd-dir=/usr' '--with-flex'
> '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-ttf'
>
> As you can see it contains "--with-gettext" so I'd expect a function
> like bindtextdomain() is availible. However, Horde (chora, actually)
> reports:
> Fatal error: Call to undefined function: bindtextdomain() in
> /home/virtual/site4/fst/var/www/html/horde/lib/Lang.php on line 91
>
> What could have gone wrong and how can I fix it?
>
> Thanks in advance
>
> --
> Bram v. Leur
> The Netherlands
>
> Proud to PHP!
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message ---
I've a php script that creates (inserts) a new record in a MySQL table. It 
executes, goes to the next page, but it doesn update the db>

The db name and table name are OK.  I've printed the values passed to the 
script and it's OK too.

What code can I add to the script to find out the error of the query?

Here's the script:

<?php

$connection=@mysql_connect("localhost","wagner","xyz") or die ("No 
connection!");

$db=@mysql_select_db("sbwresearch_com",$connection) or die ("No database!");

$qry_1="insert into scr_149
(
username,
e_mail,
q01a,
...
q07a,
date_done
)
values
(
'$username',
'$e_mail',
'$q01a',
...
'$q07a',
'$date_done'
)"
or die ("No query #1!");

$result_1=@mysql_query($qry_1,$connection);

@mysql_close($connection);
header ("location:scr_6.htm");
flush();
exit;
?>


--- End Message ---
--- Begin Message ---
On Friday 17 May 2002 17:35, Anthony Rodriguez wrote:
> I've a php script that creates (inserts) a new record in a MySQL table. It
> executes, goes to the next page, but it doesn update the db>
>
> The db name and table name are OK.  I've printed the values passed to the
> script and it's OK too.
>
> What code can I add to the script to find out the error of the query?
>
> Here's the script:
>
> <?php
>
> $connection=@mysql_connect("localhost","wagner","xyz") or die ("No
> connection!");
>
> $db=@mysql_select_db("sbwresearch_com",$connection) or die ("No
> database!");

Having a '@' in front of a function call suppresses any error messages that 
may occur. 

Reading the manual would tell you that mysql_error() returns the error from 
the last mysql operation.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
belief, n:
        Something you do not believe.
*/

--- End Message ---
--- Begin Message ---
Hi all,
firstly: i know nowt about search engines/crawlers spiders really.
i'm giving users fake sub-domains i.e
www.username.mysite.com gets redirected to www.mysite.com/users/sites/username via 
mod_rewrite/wildcard dns
so i'm wondering if search engines will have any trouble indexing those sites.
i was talking to an 'internet consultant' who
has a flash red sports car and earns about 5 times more than me and he said i should 
look into this.
i would have thought that server-side redirects are no problem for crawlers.
i set up a google adwords thingy for one of the sites and it
worked for a while but now they've come back to me saying the url 
doesn't work when it clearly does.i've asked the google folks about this and am 
waiting for them to get back.
was just wondering if anyone had experience of this sort of thing.
thanks
adrian
--- End Message ---
--- Begin Message ---
> i would have thought that server-side redirects are no problem for
crawlers.

That's what i would have thought too. mod_rewrite is an alternativ for
virtual domains. if you request www.mydomain.com it doesn't matter
to the server if you have virtual domains or mod_rewrite. both got
redirected to the local directory. If you're using virtal domains,
you say www.mydomain.com's document_root is /wwwroot/mydomain_com/.
If you're using mod_rewrite you say the same, but you have a rule which
translates
the url to it's document_root path, so you don't have to set virtual domains
for every domain on the server. imo there's no other difference, so it also
shouldn't make any difference to any user, no matter if it's a crawler or
regular user.

Regards Michael

"Adrian Murphy" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
001301c1fd8e$9f14ac00$02646464@ade">news:001301c1fd8e$9f14ac00$02646464@ade...
Hi all,
firstly: i know nowt about search engines/crawlers spiders really.
i'm giving users fake sub-domains i.e
www.username.mysite.com gets redirected to
www.mysite.com/users/sites/username via mod_rewrite/wildcard dns
so i'm wondering if search engines will have any trouble indexing those
sites.
i was talking to an 'internet consultant' who
has a flash red sports car and earns about 5 times more than me and he said
i should look into this.
i would have thought that server-side redirects are no problem for crawlers.
i set up a google adwords thingy for one of the sites and it
worked for a while but now they've come back to me saying the url
doesn't work when it clearly does.i've asked the google folks about this and
am waiting for them to get back.
was just wondering if anyone had experience of this sort of thing.
thanks
adrian



--- End Message ---
--- Begin Message ---
Hi All,

Can somebody tell me how to install
PHP with Apache and Sybase on Suse linux.

It would be great help for me.

Regards,
Vivek
--- End Message ---
--- Begin Message ---
On Friday 17 May 2002 18:44, Vivek Kumar Agrawal wrote:
> Hi All,
>
> Can somebody tell me how to install
> PHP with Apache and Sybase on Suse linux.
>
> It would be great help for me.

There is a list specifically for php installation issues.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
I'd like to meet the guy who invented beer and see what he's working on now.
*/

--- End Message ---
--- Begin Message ---
Hi Jason,

Thanx for your prompt response.

Can you guide me how to install PHP with Apache and Sybase on Linux.

Regards,
Vivek

----- Original Message -----
From: "Jason Wong" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, May 17, 2002 4:27 PM
Subject: Re: [PHP] Installing PHP with Apache and Sybase on Linux


> On Friday 17 May 2002 18:44, Vivek Kumar Agrawal wrote:
> > Hi All,
> >
> > Can somebody tell me how to install
> > PHP with Apache and Sybase on Suse linux.
> >
> > It would be great help for me.
>
> There is a list specifically for php installation issues.
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
>
> /*
> I'd like to meet the guy who invented beer and see what he's working on
now.
> */
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message ---
I have an array which I use a loop to add numbers to different elements in
the array. I can extract the highest no
which in this case is 48. ie ([22 ] => 48 [23 ] => 2 [12 ] => 22 [14 ] =>
5 )

Using this highest no (48 in this instance), how do I get the position or
[element No] that matches the highest no.




--- End Message ---
--- Begin Message ---
On Friday 17 May 2002 18:42, Josh Edwards wrote:
> I have an array which I use a loop to add numbers to different elements in
> the array. I can extract the highest no
> which in this case is 48. ie ([22 ] => 48 [23 ] => 2 [12 ] => 22 [14 ] =>
> 5 )
>
> Using this highest no (48 in this instance), how do I get the position or
> [element No] that matches the highest no.

RTFM -> array_search()

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
interrupt configuration error
*/

--- End Message ---
--- Begin Message ---
Hi Guys,
Special greetings to all of you who have helped me in the past.

As some of you know i just bought a PHP book called "Php Blackbook" which i
heard is really good.
Anyway, In chapter 4 it talks about credit cards....and then CyberCash which
is owned by verisign and payflow which too is owned by verisign. The book
also gave me some url and RFCs to look up.
I dont know if its coz i'm a newbie to PHP or just dumb but I just cant
understand this...its too damn high funda for me,
I know google is my pal so I went there, read up on differient RFCs and got
even more confused!

I just want to know have any of you worked on these systems? eg CyberCash
and PayFlow?
Does this mean that if i want to start accepting credit cards on my site i
wont have to pay for a credit card merchant account?

PLEASE HELP if you know the answer or can offer any suggestions,comments
ANYTHING.

Have a great day,
-Ryan.
/*If you see me getting beated up by the cops, put down the camera and come
and help me! */

--- End Message ---
--- Begin Message ---
I’m having a problem with StrToLower function in php
 
I’m trying to convert characters like &THORN;  and acute letters from
uppercase to lowercase, but it dosen’t work.
 
this is what the manual says: “Note that 'alphabetic' is determined by
the current locale. This means that in i.e. the default "C" locale,
characters such as umlaut-A (Ä) will not be converted.”
dose this mean that it dosen’t  return acute and other letters like that
or is it a matter of configuration on the server?
 
Thanks, David
 
 <http://www.atom.is/> ------------------------
Davíđ Örn Jóhannssson
Vefforritari
------------------------
Atómstöđin hf.
Austurstrćti 12
101 Reykjavík
------------------------
sími: 520-8105 
 <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]
 <http://www.atom.is/> http://www.atom.is
------------------------
 
--- End Message ---
--- Begin Message ---
I have restricted the IP Address etc through the directory security, if
i goto: www.domain.com/thedir/ it does indeed give me the ip denied,
howver if i goto a file within it if it's a basic html page it displayes
it, similarly if it's a PHP script it also gets executed...

(I know if I was using Apache it'd be a simple .htaccess file, but the
client requires it on IIS.)

I obviously want to dissallow this, so that any of the modules cannot be
executed if somone happens to take an informed guess as to the location
of things...

Any help would be much appreciated...
--- End Message ---

Reply via email to