php-general Digest 27 May 2004 14:13:07 -0000 Issue 2787

Topics (messages 187026 through 187048):

Delete Multiple Records From Checkboxes
        187026 by: Albert Padley
        187027 by: Tom Rogers
        187028 by: John W. Holmes
        187030 by: Albert Padley
        187032 by: Albert Padley
        187034 by: Curt Zirzow
        187035 by: Albert Padley
        187037 by: Albert Padley
        187039 by: Tom Rogers

Putting an image or logo on another image.
        187029 by: Philip
        187033 by: Curt Zirzow

running php even without .php extenstion, how can i do this?
        187031 by: Louie Miranda
        187036 by: Curt Zirzow
        187038 by: Louie Miranda
        187040 by: Curt Zirzow

Re: How to check for a $_GET without throwing a Notice?
        187041 by: Burhan Khalid

Changing environment variables ? (stupid question)
        187042 by: Harry Sufehmi

Re: clearing new pages
        187043 by: Craig

Re: combining string values
        187044 by: Craig

Re: is_object($_SESSION['dagobertduck']);
        187045 by: Matthias H. Risse

Failover mechanism
        187046 by: Surojit MUNDLE

imagejpeg
        187047 by: Pat Hanna

Server Push
        187048 by: George Lantz

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 --- I've checked the archives and several other sources, but still can't seem to make this work.

I have a form with checkboxes to designate records to be deleted from the mysql database. The pertinent form code is:

<input type=\"checkbox\" name=\"del[]\" value=\"" . $row['id'] . "\">

The processing code is:

if (count($del) > 0){
        for ($i=0;$i<count($del);$i++){
        
                $query = "DELETE FROM ref_events_reg WHERE id = '$del[$i]'";
}
}

Echoing the query produces:

DELETE FROM ref_events_reg WHERE id = A

I've also tried the following:

$query = "DELETE FROM ref_events_reg WHERE id IN ('" . implode("','", addslashes($del)) . "')";

This one produces a warning:

Warning: implode(): Bad arguments.

and the following query:

DELETE FROM ref_events_reg WHERE id IN ('')

Both attempts fail to delete any records even though several records are checked.

Where have I gone wrong?

Thanks.

Albert Padley
--- End Message ---
--- Begin Message ---
Hi,

Thursday, May 27, 2004, 11:34:03 AM, you wrote:
AP> I've checked the archives and several other sources, but still can't
AP> seem to make this work.

AP> I have a form with checkboxes to designate records to be deleted from
AP> the mysql database. The pertinent form code is:

AP> <input type=\"checkbox\" name=\"del[]\" value=\"" . $row['id'] . "\">

AP> The processing code is:

if (count($del) >> 0){
AP>     for ($i=0;$i<count($del);$i++){
        
AP>             $query = "DELETE FROM ref_events_reg WHERE id = '$del[$i]'";
AP> }
AP> }

AP> Echoing the query produces:

AP> DELETE FROM ref_events_reg WHERE id = A

AP> I've also tried the following:

AP> $query = "DELETE FROM ref_events_reg WHERE id IN ('" . implode("','",
AP> addslashes($del)) . "')";

AP> This one produces a warning:

AP> Warning: implode(): Bad arguments.

AP> and the following query:

AP> DELETE FROM ref_events_reg WHERE id IN ('')

AP> Both attempts fail to delete any records even though several records
AP> are checked.

AP> Where have I gone wrong?

AP> Thanks.

AP> Albert Padley


change it to

   <input type=\"checkbox\" name=\"del[$row['id']]\" value=\"Y"\">

   Then you can do something like

   foreach($del as $id=>$val){
     $query = "DELETE FROM ref_events_reg WHERE id = '$id'";
     //do query
   }

-- 
regards,
Tom

--- End Message ---
--- Begin Message ---
Albert Padley wrote:

I've checked the archives and several other sources, but still can't seem to make this work.

I have a form with checkboxes to designate records to be deleted from the mysql database. The pertinent form code is:

<input type=\"checkbox\" name=\"del[]\" value=\"" . $row['id'] . "\">

The processing code is:

if (count($del) > 0){
for ($i=0;$i<count($del);$i++){
$query = "DELETE FROM ref_events_reg WHERE id = '$del[$i]'";
}
}


Echoing the query produces:

DELETE FROM ref_events_reg WHERE id = A

Should be:

$query = "DELETE FROM ref_events_reg WHERE id = '{$del[$i]}'";

or

$query = "DELETE FROM ref_events_reg WHERE id = '".$del[$i]."'";

--
---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com
--- End Message ---
--- Begin Message ---

On May 26, 2004, at 8:01 PM, John W. Holmes wrote:

Albert Padley wrote:

I've checked the archives and several other sources, but still can't seem to make this work.
I have a form with checkboxes to designate records to be deleted from the mysql database. The pertinent form code is:
<input type=\"checkbox\" name=\"del[]\" value=\"" . $row['id'] . "\">
The processing code is:
if (count($del) > 0){
for ($i=0;$i<count($del);$i++){
$query = "DELETE FROM ref_events_reg WHERE id = '$del[$i]'";
}
}
Echoing the query produces:
DELETE FROM ref_events_reg WHERE id = A

Should be:

$query = "DELETE FROM ref_events_reg WHERE id = '{$del[$i]}'";

or

$query = "DELETE FROM ref_events_reg WHERE id = '".$del[$i]."'";

--
---John Holmes...

John,

Sorry, same result. No records deleted. Echoing the query returns:

DELETE FROM ref_events_reg WHERE id = 'A'

However, the id should be an integer. A var_dump() returns:

array(2) { ["del"]=> array(2) { [0]=> string(2) "15" [1]=> string(2) "16" } ["submit"]=> string(6) "Delete" }

Further, when I echo $del[0], it returns -- 'A' while $del[1] returns 'r'. Just $del returns 'Array'.

Still working on it.

Albert Padley
--- End Message ---
--- Begin Message ---

On May 26, 2004, at 7:55 PM, Tom Rogers wrote:

Hi,

Thursday, May 27, 2004, 11:34:03 AM, you wrote:
AP> I've checked the archives and several other sources, but still can't
AP> seem to make this work.


AP> I have a form with checkboxes to designate records to be deleted from
AP> the mysql database. The pertinent form code is:


AP> <input type=\"checkbox\" name=\"del[]\" value=\"" . $row['id'] . "\">

AP> The processing code is:

if (count($del) >> 0){
AP>  for ($i=0;$i<count($del);$i++){
        
AP>          $query = "DELETE FROM ref_events_reg WHERE id = '$del[$i]'";
AP> }
AP> }

AP> Echoing the query produces:

AP> DELETE FROM ref_events_reg WHERE id = A

AP> I've also tried the following:

AP> $query = "DELETE FROM ref_events_reg WHERE id IN ('" . implode("','",
AP> addslashes($del)) . "')";


AP> This one produces a warning:

AP> Warning: implode(): Bad arguments.

AP> and the following query:

AP> DELETE FROM ref_events_reg WHERE id IN ('')

AP> Both attempts fail to delete any records even though several records
AP> are checked.


AP> Where have I gone wrong?

AP> Thanks.

AP> Albert Padley


change it to

   <input type=\"checkbox\" name=\"del[$row['id']]\" value=\"Y"\">

   Then you can do something like

   foreach($del as $id=>$val){
     $query = "DELETE FROM ref_events_reg WHERE id = '$id'";
     //do query
   }

--
regards,
Tom

Tom,

When I tried this I received a warning - Warning: Invalid argument supplied for foreach()
and, of course, no records were deleted.


Albert Padley
--- End Message ---
--- Begin Message ---
* Thus wrote Albert Padley ([EMAIL PROTECTED]):
> 
> <input type=\"checkbox\" name=\"del[]\" value=\"" . $row['id'] . "\">
> 
> The processing code is:
> 
> if (count($del) > 0){
>       for ($i=0;$i<count($del);$i++){
>       
>               $query = "DELETE FROM ref_events_reg WHERE id = '$del[$i]'";
> }
> }

I think you need to take a step back and figure out where the $del
variable is comming from.

Both solutions that have been provided should have worked if $del
was really an array.


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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

On May 26, 2004, at 11:16 PM, Curt Zirzow wrote:

* Thus wrote Albert Padley ([EMAIL PROTECTED]):

<input type=\"checkbox\" name=\"del[]\" value=\"" . $row['id'] . "\">

The processing code is:

if (count($del) > 0){
        for ($i=0;$i<count($del);$i++){
        
                $query = "DELETE FROM ref_events_reg WHERE id = '$del[$i]'";
}
}

I think you need to take a step back and figure out where the $del variable is comming from.

Both solutions that have been provided should have worked if $del
was really an array.


Curt -- "I used to think I was indecisive, but now I'm not so sure."

Curt,

I agree. I did a var_dump() with the following result:

array(2) { ["del"]=> array(2) { [0]=> string(2) "15" [1]=> string(2) "16" } ["submit"]=> string(6) "Delete" }

"15" and "16" are the correct id's for the records I'm trying to delete. However, when I echo $del[0] it returns "A" and when I echo $del[1] it returns "r" which happen to be the first 2 character in Array. So what gives?

Albert Padley
--- End Message ---
--- Begin Message ---

On May 26, 2004, at 11:17 PM, Albert Padley wrote:


On May 26, 2004, at 11:16 PM, Curt Zirzow wrote:

* Thus wrote Albert Padley ([EMAIL PROTECTED]):

<input type=\"checkbox\" name=\"del[]\" value=\"" . $row['id'] . "\">

The processing code is:

if (count($del) > 0){
        for ($i=0;$i<count($del);$i++){
        
                $query = "DELETE FROM ref_events_reg WHERE id = '$del[$i]'";
}
}

I think you need to take a step back and figure out where the $del variable is comming from.

Both solutions that have been provided should have worked if $del
was really an array.


Curt -- "I used to think I was indecisive, but now I'm not so sure."

Curt,

I agree. I did a var_dump() with the following result:

array(2) { ["del"]=> array(2) { [0]=> string(2) "15" [1]=> string(2) "16" } ["submit"]=> string(6) "Delete" }

"15" and "16" are the correct id's for the records I'm trying to delete. However, when I echo $del[0] it returns "A" and when I echo $del[1] it returns "r" which happen to be the first 2 character in Array. So what gives?

Albert Padley

John, Tom and Curt,

I found that I had an include of functions that was somehow mucking things up. When I removed the functions page, all 3 of your solutions worked.

Thank you all for taking the time to assist.

Albert Padley
--- End Message ---
--- Begin Message ---
Hi,

Thursday, May 27, 2004, 3:07:28 PM, you wrote:

AP> On May 26, 2004, at 7:55 PM, Tom Rogers wrote:

>> Hi,
>>
>> Thursday, May 27, 2004, 11:34:03 AM, you wrote:
>> AP> I've checked the archives and several other sources, but still 
>> can't
>> AP> seem to make this work.
>>
>> AP> I have a form with checkboxes to designate records to be deleted
>> from
>> AP> the mysql database. The pertinent form code is:
>>
>> AP> <input type=\"checkbox\" name=\"del[]\" value=\"" . $row['id'] .
>> "\">
>>
>> AP> The processing code is:
>>
>> if (count($del) >> 0){
>> AP>  for ($i=0;$i<count($del);$i++){
>>      
>> AP>          $query = "DELETE FROM ref_events_reg WHERE id = '$del[$i]'";
>> AP> }
>> AP> }
>>
>> AP> Echoing the query produces:
>>
>> AP> DELETE FROM ref_events_reg WHERE id = A
>>
>> AP> I've also tried the following:
>>
>> AP> $query = "DELETE FROM ref_events_reg WHERE id IN ('" . 
>> implode("','",
>> AP> addslashes($del)) . "')";
>>
>> AP> This one produces a warning:
>>
>> AP> Warning: implode(): Bad arguments.
>>
>> AP> and the following query:
>>
>> AP> DELETE FROM ref_events_reg WHERE id IN ('')
>>
>> AP> Both attempts fail to delete any records even though several 
>> records
>> AP> are checked.
>>
>> AP> Where have I gone wrong?
>>
>> AP> Thanks.
>>
>> AP> Albert Padley
>>
>>
>> change it to
>>
>>    <input type=\"checkbox\" name=\"del[$row['id']]\" value=\"Y"\">
>>
>>    Then you can do something like
>>
>>    foreach($del as $id=>$val){
>>      $query = "DELETE FROM ref_events_reg WHERE id = '$id'";
>>      //do query
>>    }
>>
>> -- 
>> regards,
>> Tom
>>
AP> Tom,

AP> When I tried this I received a warning - Warning: Invalid argument
AP> supplied for foreach()
AP> and, of course, no records were deleted.

AP> Albert Padley


you would need to add a bit of code, that was very rough, I assumed you
got $del from $_POST

if(isset($_POST) && is_array($_POST['del'])){
  foreach($_POST['del'] as $id=>$val){
    .
    .
    .
  }
}

-- 
regards,
Tom

--- End Message ---
--- Begin Message ---
<< THIS ASSUMES THAT THE IMAGE WAS UPLOADED OK >>



                // ADD A FILE NAME TO THE UPLOADED FILE.
        
$pageDestinationFile="$pageGalleryPath/image_".$pagePicNum."_temp.jpg";
                // LETS MOVE THE IMAGE OUT OF THE TEMP DIR.
                        move_uploaded_file ($uploadedfile,
$pageDestinationFile);
                // USER OUTPUT.
                        echo "<FONT SIZE=\"4\"><B>Image
#$i:</B></FONT><BR>";
                        echo "Temp File Uploaded:<B>
../image_".$pagePicNum."_temp.jpg</B><br>";
                        echo "Status: <B>$statusresult</B><br>";


// MAAKE THEM 800x600


                        $sourcepath="$pageDestinationFile"; // Source Image
Path -- Destination from FileUpload()
                        $srcimagehw = GetImageSize($sourcepath); //GetImage
Info -- Source Image
                        $src_width="$srcimagehw[0]"; // Source Image Width
                        $src_height="$srcimagehw[1]"; // Source Image Height
                //Set some Variabled about the Output Image
                        $samplepath1="$pageGalleryPath/image_".$i.".jpg";
//path of output sample image ;-)
                        $dest_width="800"; // Destination Width
                        $dest_height="600"; // Destination Height (Fixed
Aspect Ratio) 
                        $dest_height= ($src_height * $dest_width) /
$src_width; //Destination Height (Variable Aspect Ratio)
                        $quality="90"; // JPEG Image Quality
                        $src_img = imagecreatefromjpeg("$sourcepath");
                        $dst_img =
imagecreatetruecolor($dest_width,$dest_height);
                        imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0,
$dest_width, $dest_height, $src_width, $src_height);
                        imageinterlace($dst_img, 1);
                        imagejpeg($dst_img, "$samplepath1", $quality);
                        $white = ImageColorAllocate($dst_img, 255, 255,
255);



$photoImage = ImageCreateFromJPEG("$pageDestinationFile"); 
ImageAlphaBlending($photoImage, true); 

$logoImage = ImageCreateFromPNG("$sitePath/$siteUploads/image.png"); 
$logoW = ImageSX($logoImage); 
$logoH = ImageSY($logoImage); 

$dest_width="800"; // Destination Width
$dest_height="600"; // Destination Height (Fixed Aspect Ratio) 
$dest_height= ($src_height * $dest_width) / $src_width; //Destination Height
(Variable Aspect Ratio)

ImageCopy($photoImage, $logoImage, 0, 0, 0, 0, $logoW, $logoH); 

imagejpeg($dst_img, "$pageGalleryPath/image_".$i."final.jpg", $quality);

ImageDestroy($photoImage); 
ImageDestroy($logoImage);



Any Ideas?

--- End Message ---
--- Begin Message ---
* Thus wrote Philip ([EMAIL PROTECTED]):
> 
> 
> Any Ideas?

Well, I'd have to say that dogs make better pets than cats do,
mainly because they provide much more companionship than cats...


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

--- End Message ---
--- Begin Message ---
I have seen similar sites that runs php. but without the extension.

like: example.com/hello/great?ID=19

How can i do this? Run the php even without the .php extension

-- -
Louie Miranda
http://www.axishift.com

--- End Message ---
--- Begin Message ---
* Thus wrote Louie Miranda ([EMAIL PROTECTED]):
> I have seen similar sites that runs php. but without the extension.
> 
> like: example.com/hello/great?ID=19
> 
> How can i do this? Run the php even without the .php extension

if you add a .htaccess file in the /hello/ directory with something
like (assuming apache as webserver):

<Files great>
SetHandler   application/x-httpd-php
</Files>

A file called great will be parsed as php.

Or in /

<Files hello>
SetHandler   application/x-httpd-php
</Files>

then the file hello will be ran as php and $_SERVER['PATH_INFO']
will contain '/great'


Have fun :)

Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

--- End Message ---
--- Begin Message ---
I got what you mean, but can we do this on the whole directory instead by
files?
Like for example the whole / directory and /subdirectory/ so i wont be doing
that editing every files?

The example you gave is working, btw.


-- -
Louie Miranda
http://www.axishift.com


----- Original Message -----
From: "Curt Zirzow" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 27, 2004 1:27 PM
Subject: Re: [PHP] running php even without .php extenstion, how can i do
this?


> * Thus wrote Louie Miranda ([EMAIL PROTECTED]):
> > I have seen similar sites that runs php. but without the extension.
> >
> > like: example.com/hello/great?ID=19
> >
> > How can i do this? Run the php even without the .php extension
>
> if you add a .htaccess file in the /hello/ directory with something
> like (assuming apache as webserver):
>
> <Files great>
> SetHandler   application/x-httpd-php
> </Files>
>
> A file called great will be parsed as php.
>
> Or in /
>
> <Files hello>
> SetHandler   application/x-httpd-php
> </Files>
>
> then the file hello will be ran as php and $_SERVER['PATH_INFO']
> will contain '/great'
>
>
> Have fun :)
>
> Curt
> --
> "I used to think I was indecisive, but now I'm not so sure."
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
* Thus wrote Louie Miranda ([EMAIL PROTECTED]):
> I got what you mean, but can we do this on the whole directory instead by
> files?
> Like for example the whole / directory and /subdirectory/ so i wont be doing
> that editing every files?

If you want a specific directory to be executed you're looking more
towards some mod_rewrite stuff with apache. Something like:

# send all trafic to a php_file
RewriteRule ^/(.*)$ /path/to/php_file [L]

Or

# ditto but only under dirname/
RewriteRule ^/dirname/(.*)$ /path/to/php_file [L]


Of course this is getting a little offtopic and might be more
suitable to some apache list to figure out the best solution on how
to redirect a paticular request to a php file.


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

--- End Message ---
--- Begin Message --- Brian Dunning wrote:
How do I check for the presence of an optional $_GET param without throwing a "Notice: Undefined index" when the param is not present?

Tried all three of these, they all produce the Notice when the param is not passed:

if ($_GET['id'])
if ($_GET['id'] != "")
if (isset $_GET['id'])


if (@$_GET['id'])

http://www.php.net/manual/en/language.operators.errorcontrol.php
--- End Message ---
--- Begin Message ---
I'm having problems getting PHP to talk to Oracle, and I think it's caused by some 
environment variables.

Using phpinfo(), it's clear that I've managed to change (for example) the 
_SERVER["ORACLE_HOME"] (server variable?) by using SetEnv statement in httpd.conf.
But, _ENV["ORACLE_HOME"] (environment variable?) still shows the wrong value.

I tried entering the right value in apachectl, but it still doesn't change.

Does anyone knows how to accomplish this ? Please let me know.
btw - I'm using Apache 1.3.31 on Solaris 8, PHP 4.3.6


Many thanks,
Harry

--- End Message ---
--- Begin Message ---
<?php
    echo "Hello";
    echo "<meta http-equiv=\"Refresh\" content=\"2;url=b.php\">\n";
?>

Is another option

Craig

"Rick Fletcher" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> > > Hi,
> > >      a file called a.php prints "hello" to the browser then calls
> > > b.php which prints "goodbye" to the browser.
> > > the output looks like this:
> > >
> > > hello
> > > goodbye
> > >
> > > how do I clear the screen so the end results looks like this:
> >
> > a.php:
> >
> > echo 'hello';
> > header('location: b.php'); exit;
>
> That actually wouldn't work, because once there's output ("echo") you
can't
> send a header.
>
> --Rick

--- End Message ---
--- Begin Message ---
Concatenate using: .

<?php

         $stringA = "Hello from";
         $stringB = "over here!";

         $stringC = $stringA . " " . $stringB;
?>

HTH

Craig

"Tommy Atherton" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> hi
>
> I have a problem, I'm trying to combine the value of two strings
> together into a final string. For example
>
> $path = '/tmp/photos/';
> $filename = 'pic1.jpg';
>
> $finalvalue = $path + $filename; (I know that the + is not used its
> there for explanation only)
>
> The value for path will remain constant (for the time being at least
> although) but the value for filename will be read from a database so
> that will change.
>
> Anyone care to help???
>
> thanks in advance
>
> Tommy
>
>
>

--- End Message ---
--- Begin Message ---
thanks.

fixed that with simple un/serialize().

somehow i assumed php would be capable of
recognizing automatically that it makes sense with
object to do this automatically (who really needs
unexplicitly a string instead of o valid object
when puttin them into a session-var?)

thanks anyway
m

--- End Message ---
--- Begin Message ---
Hello Listers,
 
I am very new to PHP and have a query.
The problem I want to solve is that I have 4 servers for a similar application in 
different parts of the world.
Based on where the request comes from I redirect him to the closest server.
 
Now what I want to do is to have a Backup server which can be called in case the 
first/closest server is down or unreachable.
 
Any suggestions as to how I could go about this.
 
Any help would be highly appreciated.
 
Thanks and regds
Surojit

--- End Message ---
--- Begin Message ---
I'm trying to create thumbnails for my images and everything seems to
work correctly except for trying to save them. I've tried outputting
directly with imagejpeg($im) and that works, but when trying
imagejpeg($im, "new.jpeg") it does not create a new image in the current
directory. I even tried changing the ownership of the script to root to
see if my permissions were screwed up but that didn't work. Here's my
function:

$fileName is the full path name to the image
$newName is just the file name
$thumb_path is the full path to my thumbnail directory

function createThumb($fileName, $newName, $thumb_path, $MAX_H, $MAX_W){

        $new_h = 0;
        $new_w = 0;
        $divisor = 1;
        list($width, $height, $type, $attr) = getimagesize($fileName);
        if ($width > $MAX_W || $height > $MAX_H){
                if ($width > $height)
                        $divisor = $width/$MAX_W;
                else
                        $divisor = $height/$MAX_H;
        }

        switch($type){
                case 1: $src_img = imagecreatefromgif($fileName);
                                break;
                case 2: $src_img = imagecreatefromjpeg($fileName);
                                break;
                default: DisplayErrMsg("Unknown image format, please
alert webmaster!");
                                break;
        }

        if (isset($src_img)){
                $new_h = $height/$divisor;
                $new_w = $width/$divisor;
                $dest_img = imagecreatetruecolor($new_w,$new_h);
        
imagecopyresampled($dest_img,$src_img,0,0,0,0,$new_w,$new_h,$width,$heig
ht);
                switch($type){
                        case 1: imagegif($dest_img,
$thumb_path.$newName);
                                        break;
                        case 2: imagejpeg($dest_img,
$thumb_path.$newName);
                                        break;
                        default: DisplayErrMsg("Unknown image format,
please alert webmaster!");
                                        break;
                }
                imagedestroy($dest_img);
                imagedestroy($src_img);
        }
}

Thanks for any help!

--- End Message ---
--- Begin Message ---
I am just looking for some different techniques on how server push is
done on PHP:
 
I am fascinated by the PHP Live! Support Solution
(http://www.phplivesupport.com). I would like to try to replicate this
functionality just to see how it works and maybe use it on my own
website. Does anyone know how they accomplished server push and real
time chat? 
 
I am aware or some different techniques such as <meta> refreshing (which
is really more client pull). I highly doubt this is how they
accomplished this. There is also sockets, which opens a possible
security concern, so I doubt they use that either. 
 
I was thinking of using web service based on nuSOAP that simply checks
the database for new "messages". That closes the port because it is a
web service. But can this be done? Is there anyone that is familiar with
what method was used for real time chat/server Push? ESPECIALLY in PHP
Live!? I would really like to here some different thoughts and
techniques.
 
I have looked at some open source versions, but the ones I looked at all
used <meta> refresh. (They where also very slow).
 
Thanks everyone!
 
-George-

--- End Message ---

Reply via email to