OSEC

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 12 Sep 2003 18:33:04 -0000 Issue 2293

php-general-digest-helplists.php.net
Date: Fri Sep 12 2003 - 13:33:04 CDT


php-general Digest 12 Sep 2003 18:33:04 -0000 Issue 2293

Topics (messages 162382 through 162452):

Re: HTTP_REFERER
        162382 by: Catalin Trifu
        162384 by: Eugene Lee
        162389 by: Louie Miranda
        162391 by: Eugene Lee
        162392 by: Louie Miranda
        162394 by: Eugene Lee
        162417 by: Miroslaw Milewski

Re: AIX + PHP Extension Module Does Not Work (giving core dump at zend_parse_parameters)
        162383 by: Catalin Trifu

ereg
        162385 by: alexander sundli

Re: Refresh Error
        162386 by: Marek Kilimajer

Fatal error: Call to undefined function: mysql_connect()
        162387 by: Naintara Jain
        162416 by: Jason Sheets

Re: Searching with Date Ranges
        162388 by: Marek Kilimajer

Sending SMS messages ?
        162390 by: Dave Carrera
        162393 by: Louie Miranda
        162412 by: Raditha Dissanayake

input field masks
        162395 by: Bobpilly
        162396 by: Ryan A
        162415 by: Brent Baisley

Whois request record in database
        162397 by: IS
        162399 by: murugesan

Re: Dynamic Drill down menus
        162398 by: Kae Verens

caching program...
        162400 by: Andrea Tricco
        162401 by: Marek Kilimajer

caching program
        162402 by: Andrea Tricco
        162403 by: Ryan Gibson
        162405 by: Andrea Tricco
        162407 by: Andrea Tricco
        162413 by: Raditha Dissanayake
        162423 by: Ryan Gibson

Re: Problem with HTML Text box and PHP variable.
        162404 by: Ford, Mike [LSS]
        162406 by: Ford, Mike [LSS]
        162414 by: Jay Blanchard

Training Help
        162408 by: Ryan Stagg
        162409 by: Jon Haworth
        162410 by: Ryan Stagg
        162411 by: Jon Haworth

ESP survey builder
        162418 by: Yves Arsenault

Using PHP to do something with Acrobat PDF....
        162419 by: Scott Fletcher
        162452 by: Jason Wong

Header and dfile download bug???
        162420 by: Tristan.Pretty.risk.sungard.com

Re: Integrating an Applet with PHP
        162421 by: Todd Cary
        162429 by: Dan Anderson
        162435 by: Raditha Dissanayake
        162441 by: Vail, Warren
        162447 by: Todd Cary
        162449 by: Todd Cary
        162450 by: Dan Anderson
        162451 by: Dan Anderson

Re: URGENT BUSINESS RELATIONSHIP
        162422 by: Mark

Re: getting download resume to work
        162424 by: Scott Dotson
        162428 by: Scott Dotson
        162438 by: Scott Dotson

Simple (?) var_dump question
        162425 by: Thomas Panzarella
        162426 by: CPT John W. Holmes
        162430 by: Chris Boget
        162432 by: Wouter van Vliet
        162437 by: CPT John W. Holmes
        162440 by: CPT John W. Holmes

information
        162427 by: hatem gouda

help with message from tech support
        162431 by: Sam Folk-Williams
        162433 by: Raditha Dissanayake
        162436 by: R'twick Niceorgaw
        162445 by: Sam Folk-Williams

Cookie advice
        162434 by: James Johnson

Using PHP to generate Acrobat PDF...
        162439 by: Scott Fletcher
        162446 by: Simon Stiefel

Calling a function.
        162442 by: Vincent M.
        162444 by: CPT John W. Holmes

Re: Simple (?) var_dump question [summarization]
        162443 by: Wouter van Vliet

email attachment cannot be opened
        162448 by: Chris Hayes

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscribelists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscribelists.php.net

To post to the list, e-mail:
        php-generallists.php.net

----------------------------------------------------------------------

attached mail follows:


        Hi,

    It does support any HTTP information, and since
HTTP_REFERER is part of the HTTP spec. it is supported.
    You can find it in the $_SERVER variable.
    FYI: The referer is not a reliable information.

Cheers,
Catalin

"Louie Miranda" <louieaxishift.ath.cx> wrote in message
news:019901c378f6$6ef6c5a0$020119acadmwebdevws...
> Does php support this? HTTP_REFERER
> or simply cgi and ssi only?
>
> -
> Louie

attached mail follows:


On Fri, Sep 12, 2003 at 09:11:09AM +0200, Catalin Trifu wrote:
:
: "Louie Miranda" <louieaxishift.ath.cx> wrote:
: >
: > Does php support this? HTTP_REFERER
: > or simply cgi and ssi only?
:
: It does support any HTTP information, and since
: HTTP_REFERER is part of the HTTP spec. it is supported.
: You can find it in the $_SERVER variable.
: FYI: The referer is not a reliable information.

Several Windoze firewalls also filter out HTTP_REFERER.

--
Eugene Lee
http://www.coxar.pwp.blueyonder.co.uk/

attached mail follows:


what can you suggest, im trying to do a referer email program on a website
and i think HTTP_REFERER will be my first approach, but limited on some
browsers and firewall.

What can you suggest for a dynamic page?

----- Original Message -----
From: "Eugene Lee" <list-phpfsck.net>
To: <php-generallists.php.net>
Sent: Friday, September 12, 2003 3:30 PM
Subject: Re: [PHP] Re: HTTP_REFERER

> On Fri, Sep 12, 2003 at 09:11:09AM +0200, Catalin Trifu wrote:
> :
> : "Louie Miranda" <louieaxishift.ath.cx> wrote:
> : >
> : > Does php support this? HTTP_REFERER
> : > or simply cgi and ssi only?
> :
> : It does support any HTTP information, and since
> : HTTP_REFERER is part of the HTTP spec. it is supported.
> : You can find it in the $_SERVER variable.
> : FYI: The referer is not a reliable information.
>
> Several Windoze firewalls also filter out HTTP_REFERER.
>
>
> --
> Eugene Lee
> http://www.coxar.pwp.blueyonder.co.uk/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

attached mail follows:


On Fri, Sep 12, 2003 at 03:53:22PM +0800, Louie Miranda wrote:
: "Eugene Lee" mentioned:
: >
: > Several Windoze firewalls also filter out HTTP_REFERER.
:
: what can you suggest, im trying to do a referer email program on a website
: and i think HTTP_REFERER will be my first approach, but limited on some
: browsers and firewall.
:
: What can you suggest for a dynamic page?

It depends on what exactly you are trying to accomplish. Are you trying
to restrict access to your email program based on the HTTP_REFERER which
may be real or may be forged?

attached mail follows:


no, im making a "send this page to a friend program"
when the users click the button a small pop-up window will come out and the
http_referer will work and catch the previous page.

-
Louie

----- Original Message -----
From: "Eugene Lee" <list-phpfsck.net>
To: <php-generallists.php.net>
Sent: Friday, September 12, 2003 4:15 PM
Subject: Re: [PHP] Re: HTTP_REFERER

> On Fri, Sep 12, 2003 at 03:53:22PM +0800, Louie Miranda wrote:
> : "Eugene Lee" mentioned:
> : >
> : > Several Windoze firewalls also filter out HTTP_REFERER.
> :
> : what can you suggest, im trying to do a referer email program on a
website
> : and i think HTTP_REFERER will be my first approach, but limited on some
> : browsers and firewall.
> :
> : What can you suggest for a dynamic page?
>
> It depends on what exactly you are trying to accomplish. Are you trying
> to restrict access to your email program based on the HTTP_REFERER which
> may be real or may be forged?
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

attached mail follows:


On Fri, Sep 12, 2003 at 04:21:16PM +0800, Louie Miranda wrote:
: Eugene Lee mentioned:
: > On Fri, Sep 12, 2003 at 03:53:22PM +0800, Louie Miranda wrote:
: > : "Eugene Lee" mentioned:
: > : >
: > : > Several Windoze firewalls also filter out HTTP_REFERER.
: > :
: > : what can you suggest, im trying to do a referer email program on a
: > : website and i think HTTP_REFERER will be my first approach, but
: > : limited on some browsers and firewall.
: >
: > It depends on what exactly you are trying to accomplish.
:
: no, im making a "send this page to a friend program"
: when the users click the button a small pop-up window will come out
: and the http_referer will work and catch the previous page.

Since it's a button, you could always send the SCRIPT_FILENAME to the
pop-up window via a GET or POST method.

attached mail follows:


Louie Miranda wrote:

> no, im making a "send this page to a friend program"
> when the users click the button a small pop-up window
> will come out and the http_referer will work and catch
> the previous page.

  I suppose you can achieve this using javascript's
window.opener.location.href reference.

--
        miro.

attached mail follows:


        Hi,

    This should go to the php.devel list

Cheers,
Catalin

"Ashish Borkar" <ashish_java_borkaryahoo.com> wrote in message
news:20030912043354.68497.qmailweb41901.mail.yahoo.com...
> Hi ,
> I am writing a php extension module on AIX 4.3.3 RS6000 machine.I
> have compiled php as CGI.When I test my php extension module function
> from a test php script I get a CORE dump.The gdb php core is as below
> Core was generated by `php'.
> Program terminated with signal 11, Segmentation fault.
> #0 0xd0990180 in zend_parse_parameters ()
> (gdb) bt
> #0 0xd0990180 in zend_parse_parameters ()
> #1 0xd0990930 in zif_myfunction ()
> #2 0x1002c5a4 in execute (op_array=0x200e6c70, tsrm_ls=0x20027738)
> at /usr/local/php-4.3.2/Zend/zend_execute.c:1606
> #3 0x1000e0d4 in zend_execute_scripts (type=8, tsrm_ls=0x20027738,
> retval=0x0, file_count=3)
> at /usr/local/php-4.3.2/Zend/zend.c:869
> #4 0x10007410 in php_execute_script (primary_file=0x5,
> tsrm_ls=0x3027738)
> at /usr/local/php-4.3.2/main/main.c:1671
> #5 0x10001ec8 in main (argc=2, argv=0x2ff228c0) at
> /usr/local/php-4.3.2/sapi/cgi/cgi_main.c:1501
> #6 0x100001dc in __start ()
> I have tried all combinations of ZTS=0 ZEND_DEBUG =0
> ZTS=0 ZEND_DEBUG =1
> ZTS=1 ZEND_DEBUG =0
> ZTS=1 ZEND_DEBUG =1
> for compiling php as well as my extension module. All give the same
> result :-(
> Has anyone encountered this on a AIX machine.
> If not atleast has anyone successfully tested a PHP extension module on
> a AIX machine.I urgently need some Help.No matter what I tried till now
> All has failed.
> Thanks & Regards
> Ashish Borkar
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software

attached mail follows:


I use this expression to remove oneline comments:
iereg_replace("//([^\n]*)\n",'',$code);

I need to make a check if this expression is inside a string. If it is, its
not a comment.

I think it has something to do with context..

Anyone who could help me?

thanx

attached mail follows:


Does your explorer ask you if you want to resend the information? It
does. You post your form once again. If you don't want this to happen,
use header("Location: http://yourserver/your_form_page.php"); redirect.

Rex Brooks wrote:

> Okay, I'm displaying an entire table of numbers from my database. Using a
> form on the same page, you can enter an amount to add to the table and then
> click submit. I pass all of the information in $_POST back to the same
> page. Here is my code:
>
>
> if ($_POST["number"] != NULL) {
>
> if (is_numeric($_POST["number"]) || $_POST["number"] <= 0.0){
> ...
> display stuff telling them they need to try again
> ...
> }
> else {
> ...
> do stuff that adds the number to the table
> ...
>
> $_POST["number"] = NULL;
> }
> }
>
> ...body of HTML document...
>
> <form method="POST" action="table.php">
> <table border="0" cellpadding="5">
> <tr>
> <td align="right">Add Amount</td>
> <td><input type="text" name="number"></td>
> </tr>
> <tr>
> <td colspan=2><center><input type="submit" value="Click to
> Submit"></center></td>
> </tr>
> </table>
> </form>
>
> Everything seems to work fine, up until you click the refresh button, then
> it will add whatever you just added to the table again, even if you have
> nothing typed into the form and dont hit the submit button. So basically I
> can add 500 by typing it in and clicking the submit button, then continue to
> add an addition 500 every time I click the submit button. I want to be able
> to refresh the page, but I cant figure out what is going wrong. Any ideas?
>
> Rex
>

attached mail follows:


I get this error "Fatal error: Call to undefined function: mysql_connect() " in one script. whereas
phpMyAdmin is installed in another directory and it works fine.

Any ideas why?
-Naintara

attached mail follows:


Are you using the bundled MySQL libraries under Unix/Linux? What
version of PHP are you running with what operating system? If MySQL
compiled as a module that must be loaded?

Jason

Naintara Jain wrote:

>I get this error "Fatal error: Call to undefined function: mysql_connect() " in one script. whereas
>phpMyAdmin is installed in another directory and it works fine.
>
>Any ideas why?
>-Naintara
>
>
>

attached mail follows:


John W. Holmes wrote:

> Seth Willits wrote:
>
>> If I want to show events (records in a MySQL table) for the next 10
>> days (and I do), what would be the best approach to searching with
>> this range? (The dates in my table are stored as a string in the
>> format YYYY/MM/DD.)

And change the column type to DATE!!!

>
>
> SELECT * FROM Table WHERE event_date BETWEEN NOW() AND NOW() + INTERVAL
> 10 DAY;
>
>> "Read the book! Be patient! All success comes from acquiring
>> knowledge and experience."
>> -- Seth Willits
>
>
> You quote yourself in your own signature? Isn't that... illegal or
> something... ;)
>

attached mail follows:


Hi All

Is there a way to send sms messages via php.

I really don’t know anything about this so any info,pointers or resources
will be very much appreciated.

Thank you in advance for any help.

Dave C

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.516 / Virus Database: 313 - Release Date: 01/09/2003
 

attached mail follows:


Hi Dave,

Yes php can, but what application will you connect to?
On my old work we develop php and c programs to do it. Although the main
client that connects is on C/Unix but when the people wanted to send
messages we do it on php then web to c then c program to smsc server.

-
Louie

----- Original Message -----
From: "Dave Carrera" <daveephgroup.com>
To: <php-generallists.php.net>
Sent: Friday, September 12, 2003 4:06 PM
Subject: [PHP] Sending SMS messages ?

Hi All

Is there a way to send sms messages via php.

I really don’t know anything about this so any info,pointers or resources
will be very much appreciated.

Thank you in advance for any help.

Dave C

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.516 / Virus Database: 313 - Release Date: 01/09/2003

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

attached mail follows:


Hi,
Goto http://kannel.org and download their sources. They have some sample
PHP scripts to send sms. Obviously you will need a GSM modem or access
to an SMSC to make full use of it.

all the best.

Dave Carrera wrote:

>Hi All
>
>Is there a way to send sms messages via php.
>
>I really don’t know anything about this so any info,pointers or resources
>will be very much appreciated.
>
>Thank you in advance for any help.
>
>Dave C
>
>---
>Outgoing mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.516 / Virus Database: 313 - Release Date: 01/09/2003
>
>
>
>

--
http://www.radinks.com/upload
Drag and Drop File Uploader.

attached mail follows:


Hello all

I am trying to enforce input masks for dates that are viewable in a single
html text box. For example i would like a single tect box that the user will
see ##/##/#### in and when they click on the field they will only be able to
enter digits in the ## areas the / will remain. Is php cable of doing this?

Thanks for any help in advance!

Cheers

Bob

attached mail follows:


Javascript is your answer.
Cheers,
-Ryan

We will slaughter you all! - The Iraqi (Dis)information ministers site
http://MrSahaf.com

----- Original Message -----
From: "Bobpilly" <bobpillyyahoo.co.uk>
To: <php-generallists.php.net>
Sent: Friday, September 12, 2003 11:20 AM
Subject: [PHP] input field masks

> Hello all
>
> I am trying to enforce input masks for dates that are viewable in a single
> html text box. For example i would like a single tect box that the user
will
> see ##/##/#### in and when they click on the field they will only be able
to
> enter digits in the ## areas the / will remain. Is php cable of doing
this?
>
> Thanks for any help in advance!
>
> Cheers
>
> Bob
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>

attached mail follows:


PHP is server side, it has nothing to do with client side, aside from
server up some information. You can, and should, validate the input
using PHP after it is submitted.
For client side validation you would need to use javascript. You can do
what you are trying to do in javascript, but it will get very
complicated since you need to use the onkeypress to capture and process
each key stroke to make sure the / remain.
I think using PHP to validate after submission would be a lot easier
and much more flexible. If you do it right, the user could put in
something like +3 to enter a date three days from todays date.

On Friday, September 12, 2003, at 05:20 AM, Bobpilly wrote:

> Hello all
>
> I am trying to enforce input masks for dates that are viewable in a
> single
> html text box. For example i would like a single tect box that the
> user will
> see ##/##/#### in and when they click on the field they will only be
> able to
> enter digits in the ## areas the / will remain. Is php cable of doing
> this?
>
> Thanks for any help in advance!
>
> Cheers
>
> Bob
>
--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577

attached mail follows:


I want to record the whios requests people do, not the whois output, in
a MySQL database. Somebody helped me with the code here below, but I get
a parse error when I test it.

Parse error: parse error, unexpected $ in
/home/moo/public_html/whois/index.php on line 32

What can help me out?

<?php

if(!$name) {
print("
<form name=\"\" action=\"$PHP_SELF\" method=\"post\">
<input type=\"text\" name=\"name\">
</form>");

$db_name='databasename';
$db_user='user';
$db_password='password';
$table='whoistracker';

// Connect to the database
$db_conn = mysql_connect("localhost",$db_user,$db_password);
if (!$db_conn)
{
die ("ERROR: Cannot connect to the database.");
//exit();
}

$ip = $REMOTE_ADDR;
$insert="INSERT INTO $table (name,ipaddress) VALUES ('$name','$ip')";
$db_query=mysql_db_query($db_name,$insert);

if($name) {
if($dbquery) { print("Done."); } ELSE { print("Didn't work."); }
?>

--IS

attached mail follows:


You have missed the braces. Close it properly. The following code works
well

<?php
     if(!$name)
     {
      print("<form name=\"\" action=\"$PHP_SELF\" method=\"post\">
      <input type=\"text\" name=\"name\">
      <input type=\"submit\" name=\"name\">
      </form>");
      $db_name='dbname';
      $db_user='username';
      $db_password='password';
      $table='tablename';
      // Connect to the database
      $db_conn = mysql_connect("localhost",$db_user,$db_password);
      if (!$db_conn)
      {
           die ("ERROR: Cannot connect to the database.");
           //exit();
      }
      $ip = $REMOTE_ADDR;
      $insert="select * from $table";
      $db_query=mysql_db_query($db_name,$insert);
      if($name)
      {
           if($dbquery)
           { print("Done.");
           }
           else
           { print("Didn't work.");
           }
      }
 }
?>

-Murugesan

----- Original Message -----
From: "IS" <isthink.nl>
To: <php-generallists.php.net>
Sent: Friday, September 12, 2003 3:03 PM
Subject: [PHP] Whois request record in database

> I want to record the whios requests people do, not the whois output, in
> a MySQL database. Somebody helped me with the code here below, but I get
> a parse error when I test it.
>
> Parse error: parse error, unexpected $ in
> /home/moo/public_html/whois/index.php on line 32
>
> What can help me out?
>
> <?php
>
> if(!$name) {
> print("
> <form name=\"\" action=\"$PHP_SELF\" method=\"post\">
> <input type=\"text\" name=\"name\">
> </form>");
>
> $db_name='databasename';
> $db_user='user';
> $db_password='password';
> $table='whoistracker';
>
> // Connect to the database
> $db_conn = mysql_connect("localhost",$db_user,$db_password);
> if (!$db_conn)
> {
> die ("ERROR: Cannot connect to the database.");
> //exit();
> }
>
> $ip = $REMOTE_ADDR;
> $insert="INSERT INTO $table (name,ipaddress) VALUES ('$name','$ip')";
> $db_query=mysql_db_query($db_name,$insert);
>
> if($name) {
> if($dbquery) { print("Done."); } ELSE { print("Didn't work."); }
> ?>
>
> --IS
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

attached mail follows:


Dan J. Rychlik wrote:
> Hello,
>
> I have created a db that holds specific information ie a business name. I am running into a problem on a form when you choose the business name another list is suppossed to populate the address or addresses, if multiple occur, and you can select the address.
>
> I am not able to sucessfully pull off this dynamic drill down list in my form because I do not know how to check data from a form field that hasnt been posted through $POST VARS array.
>
> My question is, is their a way to do this in PHP? Do I have to learn javascript in order to accomplish this task or will I have to have a submit button for each form element?
>
> Thanks in advance,
> Daniel

I'm not sure if this will help, you, but I have a simple JavaScript
application which may help. You would simply put your options in nested
<ul>s, then put this in the <head> of your page:
<script type="text/javascript"
src="http://kverens.contactjuggling.org/j/cm.js"></script>

Kae

attached mail follows:


Hi,

I'm using the function "file_get_contents()" to replicate the content of a
remote html page on my server.

But, the function file_get_contents() works even when the name of the file
is not specified. For example:

"http://www.php.net" rather that "http://php.net/index.php"

Does a method exist to know the name of the file received form web server?

I would like to write a program that automatically downloads the images
inserted into a html page.

For this reason, I need to determine the paths of the images in order to get
them from the web server.

In other words, my program should work as the "Save as" function (File menu)
of any Web browser.

Can anybody help me?

Best regards.

Andrea

attached mail follows:


No way, it might be anything from apache's DirectoryIndex directive.
Browsers don't know that either.

Andrea Tricco wrote:

> Hi,
>
>
>
> I'm using the function "file_get_contents()" to replicate the content of a
> remote html page on my server.
>
> But, the function file_get_contents() works even when the name of the file
> is not specified. For example:
>
> "http://www.php.net" rather that "http://php.net/index.php"
>
>
>
> Does a method exist to know the name of the file received form web server?
>
>
>
> I would like to write a program that automatically downloads the images
> inserted into a html page.
>
> For this reason, I need to determine the paths of the images in order to get
> them from the web server.
>
>
>
> In other words, my program should work as the "Save as" function (File menu)
> of any Web browser.
>
>
>
> Can anybody help me?
>
>
>
> Best regards.
>
>
>
> Andrea
>

attached mail follows:


Hi,
I'm using the function "file_get_contents()" to replicate the content of a
remote html page on my server.
But, the function file_get_contents() works even when the name of the file
is not specified. For example:

"http://www.php.net" rather that "http://php.net/index.php"

Does a method exist to know the name of the file received form web server?

I would like to write a program that automatically downloads the images
inserted into a html page.
For this reason, I need to determine the paths of the images in order to get
them from the web server.
In other words, my program should work as the "Save as" function (File menu)
of any Web browser.

Can anybody help me?

Best regards.
Andrea

attached mail follows:


You could pull out all the img src attributes and if they don't contain
"http://" then prepeand the address of te page then download otherwise just
downlocad the url, but to get the page to work in the new location you may
have to replace the img src attributes

Ryan Gibson
-----------
ryan_gibsonjmp-partnerhip.co.uk

On 17/9/03 11:16 am, "Andrea Tricco" <atriccolibero.it> wrote:

> Hi,
> I'm using the function "file_get_contents()" to replicate the content of a
> remote html page on my server.
> But, the function file_get_contents() works even when the name of the file
> is not specified. For example:
>
> "http://www.php.net" rather that "http://php.net/index.php"
>
> Does a method exist to know the name of the file received form web server?
>
> I would like to write a program that automatically downloads the images
> inserted into a html page.
> For this reason, I need to determine the paths of the images in order to get
> them from the web server.
> In other words, my program should work as the "Save as" function (File menu)
> of any Web browser.
>
> Can anybody help me?
>
> Best regards.
> Andrea

attached mail follows:


For the images that don't contain "http://" my program is already able to
get them from the web server.
In other cases, I have to determine the name of the directory where the html
page is located.
Thus, the equivocal paths are the problem, for example:

www.php.net/manual/it/index.php

www.php.net/manual/it/

www.php.net/manual/it

The reply of the server web is the same in the three cases.
The input of the my program could be any paths between the mentioned ones. I
need to poll out the path www.php.net/manual/it/

Best regards.
Andrea

----- Original Message -----
From: "Ryan Gibson" <ryan_gibsonjmp-partnership.co.uk>
To: "Andrea Tricco" <atriccolibero.it>; "php-general"
<php-generallists.php.net>
Sent: Friday, September 12, 2003 12:26 PM
Subject: Re: [PHP] caching program

> You could pull out all the img src attributes and if they don't contain
> "http://" then prepeand the address of te page then download otherwise
just
> downlocad the url, but to get the page to work in the new location you may
> have to replace the img src attributes
>
> Ryan Gibson
> -----------
> ryan_gibsonjmp-partnerhip.co.uk
>
> On 17/9/03 11:16 am, "Andrea Tricco" <atriccolibero.it> wrote:
>
> > Hi,
> > I'm using the function "file_get_contents()" to replicate the content of
a
> > remote html page on my server.
> > But, the function file_get_contents() works even when the name of the
file
> > is not specified. For example:
> >
> > "http://www.php.net" rather that "http://php.net/index.php"
> >
> > Does a method exist to know the name of the file received form web
server?
> >
> > I would like to write a program that automatically downloads the images
> > inserted into a html page.
> > For this reason, I need to determine the paths of the images in order to
get
> > them from the web server.
> > In other words, my program should work as the "Save as" function (File
menu)
> > of any Web browser.
> >
> > Can anybody help me?
> >
> > Best regards.
> > Andrea
>
>
>
>

attached mail follows:


I'm sorry, but in the previuos email there has been an error.
I'm sending correct one.
-----
For the images that contain "http://" my program is already able to
get them from the web server.
In other cases, I have to determine the name of the directory where the html
page is located.
Thus, the equivocal paths are the problem, for example:

www.php.net/manual/it/index.php

www.php.net/manual/it/

www.php.net/manual/it

The reply of the server web is the same in the three cases.
The input of the my program could be any paths between the mentioned ones. I
need to poll out the path www.php.net/manual/it/

Best regards.
Andrea

----- Original Message -----
From: "Andrea Tricco" <atriccolibero.it>
To: "php-general" <php-generallists.php.net>
Sent: Wednesday, September 17, 2003 1:11 PM
Subject: Re: [PHP] caching program

> For the images that don't contain "http://" my program is already able to
> get them from the web server.
> In other cases, I have to determine the name of the directory where the
html
> page is located.
> Thus, the equivocal paths are the problem, for example:
>
> www.php.net/manual/it/index.php
>
> www.php.net/manual/it/
>
> www.php.net/manual/it
>
> The reply of the server web is the same in the three cases.
> The input of the my program could be any paths between the mentioned ones.
I
> need to poll out the path www.php.net/manual/it/
>
> Best regards.
> Andrea
>
>
> ----- Original Message -----
> From: "Ryan Gibson" <ryan_gibsonjmp-partnership.co.uk>
> To: "Andrea Tricco" <atriccolibero.it>; "php-general"
> <php-generallists.php.net>
> Sent: Friday, September 12, 2003 12:26 PM
> Subject: Re: [PHP] caching program
>
>
> > You could pull out all the img src attributes and if they don't contain
> > "http://" then prepeand the address of te page then download otherwise
> just
> > downlocad the url, but to get the page to work in the new location you
may
> > have to replace the img src attributes
> >
> > Ryan Gibson
> > -----------
> > ryan_gibsonjmp-partnerhip.co.uk
> >
> > On 17/9/03 11:16 am, "Andrea Tricco" <atriccolibero.it> wrote:
> >
> > > Hi,
> > > I'm using the function "file_get_contents()" to replicate the content
of
> a
> > > remote html page on my server.
> > > But, the function file_get_contents() works even when the name of the
> file
> > > is not specified. For example:
> > >
> > > "http://www.php.net" rather that "http://php.net/index.php"
> > >
> > > Does a method exist to know the name of the file received form web
> server?
> > >
> > > I would like to write a program that automatically downloads the
images
> > > inserted into a html page.
> > > For this reason, I need to determine the paths of the images in order
to
> get
> > > them from the web server.
> > > In other words, my program should work as the "Save as" function (File
> menu)
> > > of any Web browser.
> > >
> > > Can anybody help me?
> > >
> > > Best regards.
> > > Andrea
> >
> >
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

attached mail follows:


once upon a long ago someone (i belive his name is Hrvoje Niksic) wrote
a program called wget so that people do not have to do all this :-)

Andrea Tricco wrote:

>Hi,
>I'm using the function "file_get_contents()" to replicate the content of a
>remote html page on my server.
>But, the function file_get_contents() works even when the name of the file
>is not specified. For example:
>
>"http://www.php.net" rather that "http://php.net/index.php"
>
>Does a method exist to know the name of the file received form web server?
>
>I would like to write a program that automatically downloads the images
>inserted into a html page.
>For this reason, I need to determine the paths of the images in order to get
>them from the web server.
>In other words, my program should work as the "Save as" function (File menu)
>of any Web browser.
>
>Can anybody help me?
>
>Best regards.
>Andrea
>
>
>

--
http://www.radinks.com/upload
Drag and Drop File Uploader.

attached mail follows:


On 17/9/03 12:18 pm, "Andrea Tricco" <atriccolibero.it> wrote:

> Thus, the equivocal paths are the problem, for example:
>
> www.php.net/manual/it/index.php
>
> www.php.net/manual/it/
>

For the above examples the url is the string up to the last '/' char (as
long as the string after the '/' char has an extension ie a dot and three or
chars)

> www.php.net/manual/it
>

This is a bit more tricky, you could just grab the url with and without the
'/' char and compare the two strings (messy I know) and probably won't work
every time, but what does!

Ryan Gibson
-----------
ryan_gibsonjmp-partnerhip.co.uk

attached mail follows:


On 11 September 2003 19:56, CPT John W. Holmes wrote:

> From: "murugesan" <mukeshgcthotpop.com>
>
>
> > This will help you
> >
> > <?php
> > $dins="Dinesh";
> > echo "<input type=text name=dins class='textbox' value='$dins' >";
> > >
>
> Use double quotes for HTML attributes.

Why? Both the HTML 4.01 and XHTML 1.0 (via XML 1.0) specifications explicitly allow both single and double quotes for attribute values.

Cheers!

Mike

---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.fordlmu.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211

attached mail follows:


On 12 September 2003 11:50, Ford, Mike [LSS] wrote:

> On 11 September 2003 19:56, CPT John W. Holmes wrote:
>
> > From: "murugesan" <mukeshgcthotpop.com>
> >
> >
> > > This will help you
> > >
> > > <?php
> > > $dins="Dinesh";
> > > echo "<input type=text name=dins class='textbox' value='$dins'
> > > >";
> > > >
> >
> > Use double quotes for HTML attributes.
>
> Why? Both the HTML 4.01 and XHTML 1.0 (via XML 1.0)
> specifications explicitly allow both single and double quotes for
> attribute values.

OK, I've now seen the other followups requesting backup for this, so:

HTML 4.01: At http://www.w3.org/TR/html401/intro/sgmltut.html#h-3.2.2, the
spec says:

    "By default, SGML requires that all attribute values be
     delimited using either double quotation marks (ASCII
     decimal 34) or single quotation marks (ASCII decimal 39)."

XHTML 1.0 relies on the XML 1.0 spec for this, and the XML 1.0 spec, at
http://www.w3.org/TR/2000/REC-xml-20001006#NT-AttValue, defines an attribute
value thusly:

     AttValue ::= '"' ([^<&"] | Reference)* '"'
                     | "'" ([^<&'] | Reference)* "'"

Hope this helps!

Cheers!

Mike

---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.fordlmu.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211

attached mail follows:


[snip]
>>Use double quotes for HTML attributes.
>
> Why do you say that?

Yeah, I figured someone would ask that. :) I couldn't find anything
definitive on w3c.org; can someone back me up?

AFAIK, they are required in XML and XHTML. It's a good habit to get into

with regular HTML, also (although, yes, both will work in HTML).
[/snip]

The best form HTML attributes is within double quotes. This stems from
the parent language of all of the mark-up languages, SGML (standard
generalized mark-up language). XML and XHTML both more closely follow
the rules/recommendations of the parent language. HTML validation
engines genrally throw exceptions if attributes are not quoted. It has
always been considered good form.

attached mail follows:


I recently aquired a copy of the book PHP and Mysql web development by SAMS.

I have begun reading through it and it seems to be a very usefull book
however I started doing the first exersise which is a simple HTML Processor,
the HTML page is as follows:

<html>
<head>
<title>Bob's Auto Parts - Order Results</title>
</head>
<body>
<h1>Bob's Auto Parts</h1>
<form action=processorder.php method=post>
<table border=0>
<tr bgcolor=#cccccc>
<td width=150>Item</td>
<td width=15>Quantity</td>
</tr>
<tr>
<td>Tires</td>
<td align=center><input type="text" name="tireqty" size=3 maxlength=3></td>
</tr>
<tr>
<td>Oil</td>
<td align=center><input type="text" name="oilqty" size=3 maxlength=3></td>
</tr>
<tr>
<td>Spark Plugs</td>
<td align=center><input type="text" name="sparkqty" size=3 maxlength=3></td>
</tr>
<tr>
<td colspan=2 align=center><input type=submit value="Submit Order"></td>
</tr>
</table>
</form>
</body>
</html>

And the processor PHP page is:

<html>
<head>
<title>Bob's Auto Parts - Order Results</title>
</head>
<body>
<h1>Bob's Auto Parts</h1>
<h2>Order Results</h2>
<?
 echo "<p>Order Processed at ";
 echo date("H:i, ");
 echo "on ";
 echo date ("jS F");
 echo "<br>";
 echo "<p>Your order is as follows:";
 echo "<br>";
 echo $tireqty." tires<br>";
 echo $oilqty." bottles of oil<br>";
 echo $sparkqty." spark plugs<br>";
?>
</body>
</html>

I get an error???? this code is taken directly from the book.....

Bob's Auto Parts
Order Results
Order Processed at 21:08, on 12th September

Your order is as follows:

Notice: Undefined variable: tireqty in
c:\inetpub\wwwroot\php\processorder.php on line 16
tires

Notice: Undefined variable: oilqty in
c:\inetpub\wwwroot\php\processorder.php on line 17
bottles of oil

Notice: Undefined variable: sparkqty in
c:\inetpub\wwwroot\php\processorder.php on line 18
spark plugs

Help

Ryan

attached mail follows:


Hi Ryan,

Sounds like register_globals is turned off on your server (this is generally
a Good Thing). Rather than having all your form fields converted directly
into variables - which your book is assuming, as it's how PHP used to do
it - you'll need to access them via the $_POST array.

Try changing this line:

> echo $tireqty." tires<br>";

To this:

echo $_POST["tireqty"]. " tires<br>";

Search the manual or the list archives for "register_globals" and you'll get
loads of info about this.

Cheers
Jon

attached mail follows:


Thanks mate, problem kinda fixed, looks like this now...

<html>
<head>
<title>Bob's Auto Parts - Order Results</title>
</head>
<body>
<h1>Bob's Auto Parts</h1>
<h2>Order Results</h2>
<?
$tireqty = $_POST['tireqty'];
$oilqty = $_POST['oilqty'];
$sparkqty = $_POST['sparkqty'];
 echo "<p>Order Processed at ";
 echo date("H:i, ");
 echo "on ";
 echo date ("jS F");
 echo "<br>";
 echo "<p>Your order is as follows:";
 echo "<br>";
 echo $tireqty." tires<br>";
 echo $oilqty." bottles of oil<br>";
 echo $sparkqty." spark plugs<br>";
?>
</body>
</html>

Ryan

"Jon Haworth" <jonlaughing-buddha.net> wrote in message
news:008101c37920$944cee90$050a0a0aeris...
> Hi Ryan,
>
> Sounds like register_globals is turned off on your server (this is
generally
> a Good Thing). Rather than having all your form fields converted directly
> into variables - which your book is assuming, as it's how PHP used to do
> it - you'll need to access them via the $_POST array.
>
> Try changing this line:
>
> > echo $tireqty." tires<br>";
>
> To this:
>
> echo $_POST["tireqty"]. " tires<br>";
>
> Search the manual or the list archives for "register_globals" and you'll
get
> loads of info about this.
>
> Cheers
> Jon

attached mail follows:


Hi Ryan,

> $tireqty = $_POST['tireqty'];
> $oilqty = $_POST['oilqty'];
> $sparkqty = $_POST['sparkqty'];

That'll certainly fix the problem, but it kind of defeats the point of using
$_POST :-)

Ideally you'd clean the data at this point to make sure no-one's trying to
submit anything nasty (Google on "SQL injection" for an idea of what can be
done).

Seeing as these are quantities, checking them via PHP's is_numeric()
function would probably be a good idea, and making sure they're inside
sensible ranges (between 0 and 50, say) might be worthwhile as well.

Cheers
Jon

attached mail follows:


Hello,

Has anyone ever used ESP survey builder?

I've just installed it and am starting to play with it....

I'm wondering if there are any other survey building apps around...

TIA,

Yves Arsenault
Carrefour Infotech
5,promenade Acadian
Charlottetown, IPE
C1C 1M2
yvescarrefour.peicaps.org
(902)368-1895 ext.242
ICQ #117650823

attached mail follows:


Hi Fellas!!

    Know of any good websites that would provide tutorials, step-by-step,
and/or a PHP scripts of creating a PDF, putting datas into PDF, along with
Printing PDF, Saving PDF files, etc... I have no experience with using PHP
and PDF so I need both a tutorial and quick, plain to the point of PHP
script of PDF stuffs. From there I can start reviewing on how it work, what
function is being used, etc. Then look at all of the available PHP
functions for PDF, add what I need or take out what I don't need, etc.
(Customize), etc...

    Another question, does using PDF require the use of some configuration
in php.ini?? How does PHP do the PDF stuffs if there is no PDF on the
server? Etc...

Thanks!
  Scott F.

attached mail follows:


On Friday 12 September 2003 22:11, Scott Fletcher wrote:

> Know of any good websites that would provide tutorials, step-by-step,
> and/or a PHP scripts of creating a PDF, putting datas into PDF, along with
> Printing PDF, Saving PDF files, etc... I have no experience with using PHP
> and PDF so I need both a tutorial and quick, plain to the point of PHP
> script of PDF stuffs. From there I can start reviewing on how it work,
> what function is being used, etc. Then look at all of the available PHP
> functions for PDF, add what I need or take out what I don't need, etc.
> (Customize), etc...

  google > php pdf

for some classes which provide wrapper functions around the raw pdflib
functions -- they'll make your life much easier

> Another question, does using PDF require the use of some configuration
> in php.ini?? How does PHP do the PDF stuffs if there is no PDF on the
> server? Etc...

There are at least two projects which implements some pdf functions using only
PHP code (thus negating the need to install pdflib).

--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Minnie Mouse is a slow maze learner.
*/

attached mail follows:


Hi all,
I have a download for that collects data from a user (name, e-mail etc)
then I pass that info to a database and give them the file.
In the form, I pass two hidden variables, header and details_captured.
So when I post the form to $PHP_SELF, it detects this and then activates
the header code, and hopefully gives the file to the user.
The $bu variable and others are from the previous form too.

So, it works great on my desktop here at work, but I just got a few mails
from random users, who complained that they saw an error screen after
trying to download pdf's.
Dunno if this is a PDF problem, or if my script is bad?

So, here is my code... (that site at the very top of my page.)
The headers after the else statement are simply to avoid page caching, so
we can ignore them in this example.....
So, why does this work for me and many others, but not all?

============================

if (($header == 'collect') && ($details_captured == "yes")) {
        session_start();
        $path = "/home/site/download/$bu/$file";
    header("Content-Disposition: attachment; filename=$file");
    header("Content-Length: " . filesize($path));
    header("Content-Type: " . filetype($path));
    readfile("$path");
} else {
        session_start();
        Header("Cache-control: private, no-cache");
        Header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); # Past date
        Header("Pragma: no-cache");
}

=============================

*********************************************************************
The information contained in this e-mail message is intended only for
the personal and confidential use of the recipient(s) named above.
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is
strictly prohibited. If you have received this communication in error,
please notify us immediately by e-mail, and delete the original message.
***********************************************************************

attached mail follows:


Warren -

Well, your ideas are working like a champ *AND* I am getting a little
better idea of how Applets work - "little" mind you! However, another
challenge has emerged: why does it work in IE and not in Netscape 7.1?

The original test script contained this long assignment to the DATA
parameter in some sort of "crazy text". At that time, I did not
understand the meaning of "param" nor did I think about BASE64
encoding. And that is why in IE, the Editor had text in the initial
screen - it was assigned encoded text.

So, now the script works with IE but in the Netscape browser the encoded
text is not recognized. Do you have any ideas as to why that may be?
My need for a Java based HTML Editor is so folks at my client's business
who have Macs, PCs and Linux based computers can edit HTML based text in
a PHP app.

http://209.204.172.137/editor/ekit2.php

Todd

Vail, Warren wrote:

> Again, this is a guess, but it looks like two parameters to the applet
> are used;
>
> One called Document and another to indicate that BASE64 encoding was
> used to encode the html so that the browser doesn't try to render the
> html into a page.
>
> when you output your form (FROM PHP, of course), somehow include
> the following among the parameters for the applet;
>
> echo "<param NAME=\"DOCUMENT\" VALUE=\"".base64_encode($htmlsource)."\"\n"
> ."<param NAME=\"BASE64\" VALUE=\"true\">\n";
>
> odds are against this working(I'm a pessimist), but it is what I would
> try before moving on.
>
> Warren
>
> -----Original Message-----
> From: Todd Cary [mailto:toddaristesoftware.com]
> Sent: Thursday, September 11, 2003 4:39 PM
> To: Vail, Warren; php-generallists.php.net
> Subject: Re: [PHP] Integrating an Applet with PHP
>
> Warren -
>
> That works...
>
>http://209.204.172.137/editor/ekit.php
>
>Now the next challenge is to put the value in $text into the HTML editor with some JavaScript...any suggestions?
>
>Todd
>
>
>
>
> Vail, Warren wrote:
>
>>There may be other methods, but one that seems to be available from your form will require some JavaScript code. Clicking the button located below the applet (onclick event), performs an assignment to the textarea.value (located below the button) the result returned from the applet.gettext() method (actual statement below).
>>
>>document.EkitDemoForm.TextViewer.value = document.EkitDemoForm.Ekit.getDocumentText();
>>
>>I would suspect you could to this assignment to a hidden html field and then do a form submit to pass the "hidden" value to your php program on your server. Don't forget to have your form action field invoke your php program and with method=post you could retrieve the value as below;
>>
>>$htmltext = $_POST["hiddenfld"];
>>
>>hope this helps,
>>
>>Warren Vail
>>
>>
>>-----Original Message-----
>>From: Todd Cary [mailto:toddaristesoftware.com]
>>Sent: Thursday, September 11, 2003 3:36 PM
>>To: php-generallists.php.net
>>Subject: [PHP] Integrating an Applet with PHP
>>
>>
>>I have located an HTML editor written in Java that works with my clients
>>various computers (e.g. Linux, PC and Macs). What I need to do is learn
>>how to take the output from an Applet and put it into a PHP variable.
>>Since I have no experience with Java, I am at a disadvantage, so if
>>someone could point me toward some literature that explains this or if
>>someone already has the experience and can look at the source and tell
>>me how, it would be greatly appreciated.
>>
>>http://209.204.172.137/editor/ekit.php
>>
>>Todd
>>
>>
>
> --
>

--

attached mail follows:


> why does it work in IE and not in Netscape 7.1?

I'm pretty sure ActiveX controls don't run on anything besides MS
Windows Lockinware (TM). There are a number of other things that
netscape does not fully support (try loading a page with an iframe tag
in Netscape). You probably ran into another such problem.

-Dan

attached mail follows:


mozzilla 1.4. and netscape 7.1 support iframe. Hey the applet looks
pretty neat is it open source?

Dan Anderson wrote:

>>why does it work in IE and not in Netscape 7.1?
>>
>>
>
>I'm pretty sure ActiveX controls don't run on anything besides MS
>Windows Lockinware (TM). There are a number of other things that
>netscape does not fully support (try loading a page with an iframe tag
>in Netscape). You probably ran into another such problem.
>
>-Dan
>
>
>

--
Raditha Dissanayake

----------------------------------------------------------
http://www.radinks.com/sftp/?sg
Lean and mean secure FTP applet in pure java.
Complete with Graphical User Inteface Just 150 kb in size.

attached mail follows:


I'm not sure about the relationship between an applet and an ActiveX control, and most of my development is for IE browsers (they have 90% of the market I hear), so I'm not sure I can help much here. If you can break down what works and what doesn't, it might help.

If the applet doesn't run correctly, I'd look for some Java release compatibility (maybe where activex comes into play). I think you can update the java release for the NS browser, but you'll have to get each user to do that.

If, on the other hand, the problem is with the JavaScript, you should be able to conditionally generate working JavaScript for each browser (see PHP get_browser(). You might also enquire about the specs for the editing tool, to see if it supports other methods of encoding the document.

Wish I could be of more help here, but I've about reached the end of my chain (knowledge) on this one. I guess it would be too much to ask, but if you have the Java source, most people can sort of read Java, even though they are not proficient with it, and that could tell you a lot.

I am implementing a site with an Iframe, and having no problems with recent releases of Netscape, older releases are a problem, even with IE.

I have another site that does WYSIWYG editing in IE and provides a TEXTAREA for those NS users who insist on using stone axes, and it presents one or the other by detecting the browser in php.

good luck,

Warren Vail

-----Original Message-----
From: Dan Anderson [mailto:danmathjunkies.com]
Sent: Friday, September 12, 2003 9:10 AM
To: Todd Cary
Cc: Vail, Warren; PHP List
Subject: Re: [PHP] Integrating an Applet with PHP

> why does it work in IE and not in Netscape 7.1?

I'm pretty sure ActiveX controls don't run on anything besides MS
Windows Lockinware (TM). There are a number of other things that
netscape does not fully support (try loading a page with an iframe tag
in Netscape). You probably ran into another such problem.

-Dan

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

attached mail follows:


Dan -

I am surprised that an Open Source applet would rely on ActiveX. It
appears that there is something I am not doing correctly in setting the
DATA param for Netscape.

Please overlook my ignorance about browsers and applets as I try to get
a better understanding, but is BASE64 encoding/decoding a feature of IE
and not , possibly, of Netscape?

Todd

Dan Anderson wrote:

>>why does it work in IE and not in Netscape 7.1?
>>
>>
>
>I'm pretty sure ActiveX controls don't run on anything besides MS
>Windows Lockinware (TM). There are a number of other things that
>netscape does not fully support (try loading a page with an iframe tag
>in Netscape). You probably ran into another such problem.
>
>-Dan
>
>
>
>

--

attached mail follows:


Warren -

The Java code is available at http://www.hexidec.com/ekitdemo.php.

One of the reasons I need this applet working in non-IE browsers is that
my client has staff that use Macs and need to access the site from the
field...

Todd

Vail, Warren wrote:

>I'm not sure about the relationship between an applet and an ActiveX control, and most of my development is for IE browsers (they have 90% of the market I hear), so I'm not sure I can help much here. If you can break down what works and what doesn't, it might help.
>
>If the applet doesn't run correctly, I'd look for some Java release compatibility (maybe where activex comes into play). I think you can update the java release for the NS browser, but you'll have to get each user to do that.
>
>If, on the other hand, the problem is with the JavaScript, you should be able to conditionally generate working JavaScript for each browser (see PHP get_browser(). You might also enquire about the specs for the editing tool, to see if it supports other methods of encoding the document.
>
>Wish I could be of more help here, but I've about reached the end of my chain (knowledge) on this one. I guess it would be too much to ask, but if you have the Java source, most people can sort of read Java, even though they are not proficient with it, and that could tell you a lot.
>
>I am implementing a site with an Iframe, and having no problems with recent releases of Netscape, older releases are a problem, even with IE.
>
>I have another site that does WYSIWYG editing in IE and provides a TEXTAREA for those NS users who insist on using stone axes, and it presents one or the other by detecting the browser in php.
>
>good luck,
>
>Warren Vail
>
>-----Original Message-----
>From: Dan Anderson [mailto:danmathjunkies.com]
>Sent: Friday, September 12, 2003 9:10 AM
>To: Todd Cary
>Cc: Vail, Warren; PHP List
>Subject: Re: [PHP] Integrating an Applet with PHP
>
>
>
>
>>why does it work in IE and not in Netscape 7.1?
>>
>>
>
>I'm pretty sure ActiveX controls don't run on anything besides MS
>Windows Lockinware (TM). There are a number of other things that
>netscape does not fully support (try loading a page with an iframe tag
>in Netscape). You probably ran into another such problem.
>
>-Dan
>
>
>

--

attached mail follows:


> I am implementing a site with an Iframe, and having no problems with recent releases of Netscape, older releases are a problem, even with IE.

Try running Netscape 7.1 on Linux and the iframe may be broken under
certain conditions.

As always, your mileage may vary, and they may have patched Netscape by
now.

-Dan

attached mail follows:


Microsoft (being a monopoly) decided it did not want to follow Sun's
java standard and effectively froze their version of Java available in
IE Java 2 1.2 . (or something like that -- they're currently
finishing up Java 2 1.5). So if you wanted to use certain things with
microsoft you either needed to use ActiveX controls (Microsoft's answer
to Java) or Java 1.2 functionality (and there is some talk that
Microsoft will drop all support for Java in its next version of IE).

So, either (1 of the 3):

        a. You must install Sun's Java Plug In for all computers running your
program. (If it relies on java > 1.2).
        b. You must use ActiveX controls and forget about non MS Machines --
or code 2 versions for MS and non MS machines.
        c. The problem is that Base 64 refers to 64 bit machines and no 32 bit
architecture will support it. (Shouldn't be the case -- Java guarantees
that different types will be the same number of bytes).

-Dan

n Fri, 2003-09-12 at 14:02, Todd Cary wrote:
> Warren -
>
> The Java code is available at http://www.hexidec.com/ekitdemo.php.
>
> One of the reasons I need this applet working in non-IE browsers is
> that my client has staff that use Macs and need to access the site
> from the field...
>
> Todd
>
> Vail, Warren wrote:
> > I'm not sure about the relationship between an applet and an ActiveX control, and most of my development is for IE browsers (they have 90% of the market I hear), so I'm not sure I can help much here. If you can break down what works and what doesn't, it might help.
> >
> > If the applet doesn't run correctly, I'd look for some Java release compatibility (maybe where activex comes into play). I think you can update the java release for the NS browser, but you'll have to get each user to do that.
> >
> > If, on the other hand, the problem is with the JavaScript, you should be able to conditionally generate working JavaScript for each browser (see PHP get_browser(). You might also enquire about the specs for the editing tool, to see if it supports other methods of encoding the document.
> >
> > Wish I could be of more help here, but I've about reached the end of my chain (knowledge) on this one. I guess it would be too much to ask, but if you have the Java source, most people can sort of read Java, even though they are not proficient with it, and that could tell you a lot.
> >
> > I am implementing a site with an Iframe, and having no problems with recent releases of Netscape, older releases are a problem, even with IE.
> >
> > I have another site that does WYSIWYG editing in IE and provides a TEXTAREA for those NS users who insist on using stone axes, and it presents one or the other by detecting the browser in php.
> >
> > good luck,
> >
> > Warren Vail
> >
> > -----Original Message-----
> > From: Dan Anderson [mailto:danmathjunkies.com]
> > Sent: Friday, September 12, 2003 9:10 AM
> > To: Todd Cary
> > Cc: Vail, Warren; PHP List
> > Subject: Re: [PHP] Integrating an Applet with PHP
> >
> >
> >
> > > why does it work in IE and not in Netscape 7.1?
> > >
> > I'm pretty sure ActiveX controls don't run on anything besides MS
> > Windows Lockinware (TM). There are a number of other things that
> > netscape does not fully support (try loading a page with an iframe tag
> > in Netscape). You probably ran into another such problem.
> >
> > -Dan
> >
> >
>
> --
>

attached mail follows:


--- danielelectroteque.org wrote:
> lol The Lodge
>
> hey check this out
>
> http://www.potifos.com/fraud/
> and this
>
> http://www.nigerian419fraud.freeserve.co.uk/
>
> i did find a link from this list about a site where the guy
> actually sent
> false details and the guy believed him, i think he sent a passport
> of
> himself as captian kirk LOL

http://www.haxial.com/spls-soapbox/nigerian-fraud/
http://www.scamorama.com/threebucks.html

>
> > No! That $15 million is mine! I feel so honoured that you have
> picked
> > me!
> >
> > Send me the details! Address them to
> >
> > The Lodge
> > Canberra ACT
> > Australia
> >
> > Perhaps I can fly over to meet you and your money. I have no
> > suspicions that you will kill me or anything!
> >
> >
> > Regards,
> > Bob Irwin
> > Server Admin & Web Apps
> > ----- Original Message -----
> > From: "Cody Phanekham" <Cody.Phanekhamsalmat.com.au>
> > To: <php-generallists.php.net>
> > Sent: Friday, September 12, 2003 10:36 AM
> > Subject: RE: [PHP] Re: URGENT BUSINESS RELATIONSHIP
> >
> >
> > What are you talking about? This is a once in a life time
> opportunity!
> > who hasnt dreamt of receiving 15 million for doing absolutely
> nothing
> >
> > contact me benny boy !! my number is 0055 all night long O_o
> >
> >> -----Original Message-----
> >> From: Shadow [mailto:shadowshadowsnetwork.com]
> >> Sent: Friday, 12 September 2003 04:14
> >> To: php-generallists.php.net
> >> Subject: [PHP] Re: URGENT BUSINESS RELATIONSHIP
> >>
> >>
> >> God!!! This crap is even following me to the newsgroups!
> >> Shadow
> >>
> >> --
> >> PHP General Mailing List (http://www.php.net/)
> >> To unsubscribe, visit: http://www.php.net/unsub.php
> >>
> >>
> >
> >
> >
>
****************************************************************************
> > *********
> > This e-mail, including any attachments to it, may contain
> confidential
> > and/or personal information.
> > If you have received this e-mail in error, you must not copy,
> > distribute, or disclose it, use or take any action
> > based on the information contained within it.
> >
> > Please notify the sender immediately by return e-mail of the
> error and
> > then delete the original e-mail.
> >
> > The information contained within this e-mail may be solely the
> opinion
> > of the sender and may not necessarily
> > reflect the position, beliefs or opinions of Salmat on any issue.
> >
> > This email has been swept for the presence of computer viruses
> known to
> > Salmat's anti-virus systems.
> >
> > For more information, visit our website at www.salmat.com.au.
> >
>
****************************************************************************
> > *********
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> > Scanned by PeNiCillin http://safe-t-net.pnc.com.au/
> >
> > --
> > 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
>

=====
Mark Weinstock
mark_weinstockyahoo.com
***************************************
You can't demand something as a "right" unless you are willing to fight to death to defend everyone else's right to the same thing.
***************************************

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

attached mail follows:


All answers are below your questions...
Thank you for taking the time to parse through my code and try to understand
what I am doing, I really appreciate it, this is the first time I have tried
something like this and have been hung up on it for a couple days now...
Scott

-----Original Message-----
From: Chris Shiflett [mailto:shiflettphp.net]
Sent: Thursday, September 11, 2003 8:21 PM
To: Raditha Dissanayake; Scott Dotson; php-generallists.php.net
Subject: Re: [PHP] getting download resume to work

Can you help explain this code? It looks like you're on the right track but
have a few flaws (at first glance).

> <?php
> session_cache_limiter('public');
> session_start();

Is there a reason to be using sessions here?
>>>>>>>ANS: not really as of yet, but, there will be as I will be
restricting downloads to authenticated users...

> set_time_limit(0);
> $file=$_REQUEST['file'];
> $extstart=strpos($file, ".");

What does $extstart contain now?
>>>>>>>ANS: just the first part of the name, before the extension, (for no
reason)

> $ext=substr($file, $extstart+1);

So $ext is now a piece of the file. Why?
>>>>>>>ANS: this is done so that I can set the
        ==header("Content-Type: application/".$ext);==

> $dir="d:\\downloadable_courses";
> $size=filesize($dir."\\".$file);
> header("Accept-Ranges: bytes");

So $size is now the size of the entire file (not the piece).
>>>>>>>ANS: correct

> if(isset($_ENV['HTTP_RANGE'])) {
> list($a, $range)=explode("=",$_ENV['HTTP_RANGE']);

So $a is now bytes, and $range is something like 123-456
>>>>>>>ANS: partly correct, what I receive is
        =="Range: bytes=14232-"==
it has no last number.

> str_replace($range, "-", $range);

This makes no sense. The range requested is bytes 123 through 456, and
you're
converting this to 123456. Why?
>>>>>>>ANS: when I left it on what it would send to the browser would be
        =="header("Content-Range: 123--456/457");"==
(it would tack on an extra dash symbol (-) and the browser did not
understand it)

> $size2=$size-1;
> header("Content-Range: $range$size2/$size");
> $new_length=$size2-$range;

This will definitely not work, based on my comments above.
>>>>>>>ANS: it appears to work enough that FlashGet will try to
recover/resume and it completes, but, the byte count is always off by around
1 or so bytes and I cannot figure out why...

If someone sends this header:

Range: bytes=0-1023

and your resource is 2048 bytes in size, your response should include this
header:

Content-Range: bytes 0-1023/2048

Work on generating the correct string before you bother actually using them
as
headers and trying for the full solution.
>>>>>>>ANS: I have set it to log to a text file previously and it is always
1 byte different. I am at a total loss as to where it is happening, I will
attach the the log files that I have been pouring over as well the actual
script to you...

Hope that helps.

Chris

=====
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/

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

attached mail follows:


All answers are below your questions...
Thank you for taking the time to parse through my code and try to understand
what I am doing, I really appreciate it, this is the first time I have tried
something like this and have been hung up on it for a couple days now...
Scott

-----Original Message-----
From: Chris Shiflett [mailto:shiflettphp.net]
Sent: Thursday, September 11, 2003 8:21 PM
To: Raditha Dissanayake; Scott Dotson; php-generallists.php.net
Subject: Re: [PHP] getting download resume to work

Can you help explain this code? It looks like you're on the right track but
have a few flaws (at first glance).

> <?php
> session_cache_limiter('public');
> session_start();

Is there a reason to be using sessions here?
>>>>>>>ANS: not really as of yet, but, there will be as I will be
restricting downloads to authenticated users...

> set_time_limit(0);
> $file=$_REQUEST['file'];
> $extstart=strpos($file, ".");

What does $extstart contain now?
>>>>>>>ANS: just the first part of the name, before the extension, (for no
reason)

> $ext=substr($file, $extstart+1);

So $ext is now a piece of the file. Why?
>>>>>>>ANS: this is done so that I can set the
==header("Content-Type: application/".$ext);==

> $dir="d:\\downloadable_courses";
> $size=filesize($dir."\\".$file);
> header("Accept-Ranges: bytes");

So $size is now the size of the entire file (not the piece).
>>>>>>>ANS: correct

> if(isset($_ENV['HTTP_RANGE'])) {
> list($a, $range)=explode("=",$_ENV['HTTP_RANGE']);

So $a is now bytes, and $range is something like 123-456
>>>>>>>ANS: partly correct, what I receive is
=="Range: bytes=14232-"==
it has no last number.

> str_replace($range, "-", $range);

This makes no sense. The range requested is bytes 123 through 456, and
you're
converting this to 123456. Why?
>>>>>>>ANS: when I left it on what it would send to the browser would be
=="header("Content-Range: 123--456/457");"==
(it would tack on an extra dash symbol (-) and the browser did not
understand it)

> $size2=$size-1;
> header("Content-Range: $range$size2/$size");
> $new_length=$size2-$range;

This will definitely not work, based on my comments above.
>>>>>>>ANS: it appears to work enough that FlashGet will try to
recover/resume and it completes, but, the byte count is always off by around
1 or so bytes and I cannot figure out why...

If someone sends this header:

Range: bytes=0-1023

and your resource is 2048 bytes in size, your response should include this
header:

Content-Range: bytes 0-1023/2048

Work on generating the correct string before you bother actually using them
as
headers and trying for the full solution.
>>>>>>>ANS: I have set it to log to a text file previously and it is always
1 byte different. I am at a total loss as to where it is happening, I will
attach the the log files that I have been pouring over as well the actual
script to you...

Hope that helps.

Chris

=====
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/

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

begin 666 script.txt
M/#]P:' -"G-E<W-I;VY?8V%C:&5?;&EM:71E<BG<'5B;&EC)RD[#0IS97-S
M:6]N7W-T87)T*"D[#0IS971?=&EM95]L:6UI="P*3L-"FEN8VQU9&5?;VYC
M92B+B]I;F,O;7E687)S+G!H<"(I.PT*:6YC;'5D95]O;F-E*"(N+VEN8R]S
M8W)I<'1?8V]N9FEG+G!H<"(I.PT*:68H(6ES<V5T*"1?4D5154535%LG9FEL
M92==*2D>PT*"6AE861E<BB3&]C871I;VXZ("XO:6YD97N<&AP(BD[#0H)
M97AI=#L-"GT-"B1F:6QE/21?4D5154535%LG9FEL92==.PT*)&5X='-T87)T
M/7-T<G!O<RD9FEL92P(BXB*3L-"B1E>'0]<W5B<W1R*"1F:6QE+" D97AT
M<W1A<G0K,2D[#0HD9&ER/2)D.EQ<9&]W;FQO861A8FQE7V-O=7)S97,B.PT*
M)'-I>F4]9FEL97-I>F4H)&1I<BXB7%PB+B1F:6QE*3L-"B\O:&5A9&5R*")0
M<F%G;6$Z("(I.PT*+R]H96%D97(H(D-A8VAE+4-O;G1R;VPZ("(I.PT*:&5A
M9&5R*")!8V-E<'0M4F%N9V5S.B!B>71E<R(I.PT*)&9I;&5?=W(]9F]P96XH
M(G1E<W0N='AT(BP(F$K(BD[#0II9BAI<W-E="D7T5.5ELG2%144%]204Y'
M12==*2D>PT*"6QI<W0H)&$L("1R86YG92D]97AP;&]D92B/2(L)%]%3E9;
M)TA45%!?4D%.1T4G72D[#0H)<W1R7W)E<&QA8V4H)')A;F=E+" B+2(L("1R
M86YG92D[#0H))'-I>F4R/21S:7IE+3$[#0H):&5A9&5R*")#;VYT96YT+5)A
M;F=E.B D<F%N9V4D<VEZ93(O)'-I>F4B*3L-"DD;F5W7VQE;F=T:#TD<VEZ
M93(M)')A;F=E.PT*"6AE861E<BB0V]N=&5N="U,96YG=&Z("1N97=?;&5N
M9W1H(BD[#0H)9G!U=',H)&9I;&5?=W(L("(]/3T]/3T]/3T]/3T]/3T]1E)/
M32!215-5344]/3T]/3T]/3T]/3T]/3T]/5QR7&XB*3L-"EF<'5T<RD9FEL
M95]W<BP(DA45%!?4D%.1T4/2 D<F%N9V5<<EQN(BD[#0H)9G!U=',H)&9I
M;&5?=W(L(")#3TY414Y4+5)!3D=%(#T)')A;F=E)'-I>F4R+R1S:7IE7')<
M;B(I.PT*"69P=71S*"1F:6QE7W=R+" B0T].5$5.5"U,14Y'5$/2 D;F5W
M7VQE;F=T:%QR7&Y<<EQN(BD[#0I](&5L<V4>PT*"21S:7IE,CTD<VEZ92TQ
M.PT*"69P=71S*"1F:6QE7W=R+" B*BHJ*BHJ*BHJ*BHJ*BHJ*D923TT24Y)
M5$E!3"HJ*BHJ*BHJ*BHJ*BHJ*BI<<EQN(BD[#0H)9G!U=',H)&9I;&5?=W(L
M(")#3TY414Y4+5)!3D=%(#T,"TD<VEZ93(O)'-I>F5<<EQN(BD[#0H)9G!U
M=',H)&9I;&5?=W(L(")#3TY414Y4+4Q%3D=42" ]("1S:7IE7')<;EQR7&XB
M*3L-"EH96%D97(H(D-O;G1E;G0M4F%N9V4Z(&)Y=&5S(# M)'-I>F4R+R1S
M:7IE(BD["0T*"6AE861E<BB0V]N=&5N="U,96YG=&Z("(N)'-I>F4R*3L-
M"GT-"FAE861E<BB0V]N=&5N="U4>7!E.B!A<'!L:6-A=&EO;B\B+B1E>'0I
M.PT*:&5A9&5R*")#;VYT96YT+41I<W!O<VET:6]N.B!I;FQI;F4[(&9I;&5N
M86UE/21F:6QE(BD[#0IF8VQO<V4H)&9I;&5?=W(I.PT*)&9P/69O<&5N*"1D
M:7(N(EQ<(BXD9FEL92P(G)B(BD[#0IF<&%S<W1H<G4H)&9P*3L-"F5X:70[
M#0HO+VAE861E<BB0V]N=&5N="U4>7!E.B B("X9FEL971Y<&4H)'!A=&I
M*3L-"T*+RHJ(%-E;F0=&AE(&%P<')O<')I871E($A434P:&5A9&5R<R J
M*B\#0HO*BH1&\=&AI<R!I;G-T96%D(&]F('1H92!F<&%S<W1H<G4*BHO
M( T*+RHD9FEL97-I>F4/2!S:7IE*"1F:6QE;F%M92D[( T*)&9P(#T9F]P
M96XH)R1F:6QE;F%M92<L)W(G*3L#0IW:&EL92 H)&)Y=&5?8V]U;