php-general Digest 3 Jan 2006 05:40:25 -0000 Issue 3884

Topics (messages 228088 through 228102):

A curl question
        228088 by: tedd
        228090 by: ray.hauge.americanstudentloan.com
        228092 by: Curt Zirzow
        228098 by: tedd
        228099 by: tedd

Re: XML to PDF
        228089 by: Björn Bartels

Re: AT / php / apache question
        228091 by: Curt Zirzow

Re: Solaris 10 libnetsnmp build failure
        228093 by: Curt Zirzow

watermark png on jpg
        228094 by: Libit

Re: Strange Right-Shift Problem
        228095 by: Curt Zirzow

fread problem
        228096 by: Mario de Frutos Dieguez

Upload with process meter
        228097 by: Martin Zvarík

PHP MySQL
        228100 by: Man-wai Chang
        228102 by: Jerry Kita

New PHP MVC Framework
        228101 by: Ryan Johnson

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:
        php-general@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
Hi:

I've asked this question on the [EMAIL PROTECTED] list, but replies were few and didn't address the problem. Whereas, I've seen considerable discussion of curl on this list, so here goes.

I am writing a client-side application that uses curl commands to communicate with a php application.

At present I can send the php application logon, password, and variables via:

curl -u userID:password --url http://mydomain.com/myApp.php?what=what

That works!

However, I would like to send the variables hidden instead of attached to the url. So, what would the curl command be?

Many thanks for any suggestions or solutions.

tedd

--
--------------------------------------------------------------------------------
http://sperling.com/

--- End Message ---
--- Begin Message ---
I would suggest using the -d (or --data) flag.  That allows you to send
POST data.

example:

exec(curl -d "name=Rafael%20Sagula&phone=3320780"
http://www.where.com/guest.php)

For more information, check the man page for cURL and search for POST
within that document.  Or check out the PHP Manual for the appropriate
CURL syntax with LibCURL

http://us3.php.net/manual/en/function.curl-init.php

I have a script that uses the exec statement (was inherited from the
last guy) and I'd be interested to know if libCURL makes the script
wait on that line until CURL returns the result.  Sometimes when
getting data from a really slow site, scripts will take a lot longer
than expected (10-15 minutes).  I would assume that both ways would
have the same effect, but efficiency is always king ;)

HTH

Ray

> -------- Original Message --------
> Subject: [PHP] A curl question
> From: tedd <[EMAIL PROTECTED]>
> Date: Mon, January 02, 2006 9:07 am
> To: php-general@lists.php.net
> 
> Hi:
> 
> I've asked this question on the [EMAIL PROTECTED] list, but 
> replies were few and didn't address the problem. Whereas, I've seen 
> considerable discussion of curl on this list, so here goes.
> 
> I am writing a client-side application that uses curl commands to 
> communicate with a php application.
> 
> At present I can send the php application logon, password, and variables via:
> 
> curl -u userID:password --url http://mydomain.com/myApp.php?what=what
> 
> That works!
> 
> However, I would like to send the variables hidden instead of 
> attached to the url. So, what would the curl command be?
> 
> Many thanks for any suggestions or solutions.
> 
> tedd
> 
> -- 
> --------------------------------------------------------------------------------
> http://sperling.com/
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
On Mon, Jan 02, 2006 at 11:07:33AM -0500, tedd wrote:
> Hi:
> 
> I've asked this question on the [EMAIL PROTECTED] list, but 
> replies were few and didn't address the problem. Whereas, I've seen 
> considerable discussion of curl on this list, so here goes.
> 
> I am writing a client-side application that uses curl commands to 
> communicate with a php application.
> 
> At present I can send the php application logon, password, and variables 
> via:
> 
> curl -u userID:password --url http://mydomain.com/myApp.php?what=what
> 
> That works!
> 
> However, I would like to send the variables hidden instead of 
> attached to the url. So, what would the curl command be?

How do you mean hidden? You have to send the userid and pass
somehow either with the -u option or specifying them in the url:

  http://userID:[EMAIL PROTECTED]/

If you are worried about people seing the network traffic of the
username or passowrd then use https.


Curt.
-- 
cat .signature: No such file or directory

--- End Message ---
--- Begin Message ---
On Mon, Jan 02, 2006 at 11:07:33AM -0500, tedd wrote:
 Hi:

 I've asked this question on the [EMAIL PROTECTED] list, but
 replies were few and didn't address the problem. Whereas, I've seen
 considerable discussion of curl on this list, so here goes.

 I am writing a client-side application that uses curl commands to
 communicate with a php application.

 At present I can send the php application logon, password, and variables
 via:

 > curl -u userID:password --url http://mydomain.com/myApp.php?what=what

 That works!

 However, I would like to send the variables hidden instead of
 attached to the url. So, what would the curl command be?

How do you mean hidden? You have to send the userid and pass
somehow either with the -u option or specifying them in the url:

  http://userID:[EMAIL PROTECTED]/

If you are worried about people seing the network traffic of the
username or passowrd then use https.

Curt.

Curt:

Thanks for your reply.

To answer you question, "hidden" means, as I said, data that is NOT attached to the url as found in the curl example I provided.

Please note that the userID and password are NOT the data that I speak of. Besides, I am not worried about the ID or password being shown, because it isn't. What I am concerned about -- however -- is sending data attached to the end of the url because I would like to hide that from the user. For example, typically input statements in forms provide hidden data -- but unfortunately, my client-side application cannot mimic a form.

So, let me state the problem again.

I have written a client-side application that communicates very well with a php application. The php application requires authorization and the curl command I use to provide this authorization with subsequent data is as follows:

curl -u userID:password --url http://mydomain.com/myApp.php?what=what

Now, what I am asking is -- is there a curl command that will send both id:password AND data without attaching data to the end of the url string? Is there such a critter?

Thanks,

tedd

PS: Please don't tell me to use a php-command or php-function because this is for a client side application that can only use curl commands to communicate with a php application.

--
--------------------------------------------------------------------------------
http://sperling.com/

--- End Message ---
--- Begin Message ---
Ray:

I would suggest using the -d (or --data) flag.  That allows you to send
POST data.

example:

exec(curl -d "name=Rafael%20Sagula&phone=3320780"
http://www.where.com/guest.php)

Yes, I understand -d -- is there a way to use that AND to provide userID and password?

Thanks.

tedd


For more information, check the man page for cURL and search for POST
within that document.  Or check out the PHP Manual for the appropriate
CURL syntax with LibCURL

http://us3.php.net/manual/en/function.curl-init.php

I have a script that uses the exec statement (was inherited from the
last guy) and I'd be interested to know if libCURL makes the script
wait on that line until CURL returns the result.  Sometimes when
getting data from a really slow site, scripts will take a lot longer
than expected (10-15 minutes).  I would assume that both ways would
have the same effect, but efficiency is always king ;)

HTH

Ray

 -------- Original Message --------
 Subject: [PHP] A curl question
 From: tedd <[EMAIL PROTECTED]>
 Date: Mon, January 02, 2006 9:07 am
 To: php-general@lists.php.net

 Hi:

 I've asked this question on the [EMAIL PROTECTED] list, but
 replies were few and didn't address the problem. Whereas, I've seen
 considerable discussion of curl on this list, so here goes.

 I am writing a client-side application that uses curl commands to
 communicate with a php application.

At present I can send the php application logon, password, and variables via:

 curl -u userID:password --url http://mydomain.com/myApp.php?what=what

 That works!

 However, I would like to send the variables hidden instead of
 attached to the url. So, what would the curl command be?

 Many thanks for any suggestions or solutions.

 tedd

 --

--------------------------------------------------------------------------------
 http://sperling.com/

 --
 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


--
--------------------------------------------------------------------------------
http://sperling.com/

--- End Message ---
--- Begin Message ---
Hello, Binay....

>[...]. But i have no idea as where to start from. Confused and need
>directions or references to tutorials / resources which can shade
>lights on the inputs required.
>[...]

Try out FPDF at www.fpdf.org . It's quite easy to use and it's highly
extendable !!!

HAPPY NEW YEAR !!!!!!


Björn Bartels
-Development/IT-Services-

----------------------------------------------
dbusiness.de gmbh
digital business & printing gmbh

Greifswalder Str. 152
D-10409 Berlin

Fon: [0.30] 4.21.19.95
Fax: [0.30] 4.21.19.74

www.dbusiness.de
[EMAIL PROTECTED]
ftp://dbusiness.dyndns.org

--- End Message ---
--- Begin Message ---
On Mon, Jan 02, 2006 at 11:19:45AM +0000, david blunkett wrote:
> 
> Dear PHP users,
> 
> I am trying to write a php script that allows me to schedule jobs using the 
> at deamon (unix) for execution
> in the arbitrary future. I have everything working except that the default 
> login shell for apache (nologin)
> means that the at deamon fails to execute the command.
> 
> If I run the at command as another (not apache) user or change the apache 
> login script to bash then
> everything works fine.

Just use cron.

Curt.
-- 
cat .signature: No such file or directory

--- End Message ---
--- Begin Message ---
On Fri, Dec 30, 2005 at 12:56:35AM -0800, Dean wrote:
> Posted this to php-install with no response.  See:
> http://marc.theaimsgroup.com/?l=php-install&m=113579793423896&w=2
> 
> Hi folks,
> 
> I am trying to install php-4.4.1 on sparc-solaris 10, but make fails with:
> 
> /bin/sh /root/tmp/php-4.4.1/libtool <90-line snip> -o sapi/cgi/php
> 
> gcc: /usr/sfw/lib/sparcv9/.libs/libnetsnmp.so: No such file or directory
> *** Error code 1
> make: Fatal error: Command failed for target `sapi/cgi/php'
> 
> My configure line is:
> 
> ./configure --with-mysql --with-snmp
> 
> This is almost the right place for libnetsnmp - /usr/sfw/lib, but there
> is no .libs directory.
What does this give you:

   net-snmp-config --libdir
   or
   net-snmp-config --netsnmp-libs 
 
It should give the path to the /usr/sfw/lib

If it does say that you could try a:

  ./configure --with-snmp=/usr/sfw/

Also, check the output of config.log for some errors related to
net-snmp that might help explain why php's configure choose .libs.

The .libs dir is something that is used in the compilation of the
net-snmp code, which is generaly put in $prefix/lib on a make
install, if you compiled netsnmp manually.

Curt.
-- 
cat .signature: No such file or directory

--- End Message ---
--- Begin Message ---
I have png image with transparent background, and 1 jpg file.
I use imageCopyMerge to paste the png image on the jpg image.

the result image contain no transparent background mean the png file have white background when its suppose to be transparent

what is the simple and best way to make this work.

tanks in advance. :)

--- End Message ---
--- Begin Message ---
On Fri, Dec 30, 2005 at 12:34:35PM -0600, Richard Lynch wrote:
> On Thu, December 29, 2005 5:37 pm, Michael Gross wrote:
> > Hello
> > I have to migrate a PHP-application to a new Linux-Box. Both the old
> > and
> > the new system are Linux and PHP 5.1.1. (the old one has a Pentium 4,
> > the new one two Xeon CPUs). I have a problem using the
> > Crypt_Xtea-Extension. I narrowed it down to the following right-shift
> > operation:
> >
> > (-3281063054 >> 11) produces different results:
> > Old System: 495070
> > New System: -1048576
> >
> > I understand that both results are "wrong", but everything worked with
> > the old behavior and I need that behavior back very urgent.
> >
> > Maybe someone can explain me in which way the bits are shifted so that
> > the result is 495070? If I understand it, I implement my "own" shift
> > function.
> 
> Assuming the previous hypothesis that it's 32-bit versus 64-bit
> machines at work...
> 
> If you can determine the number of bits on your system, you could use
> a different number from 11 on the two systems to get the answer you
> want.
> 
> if (is_32_bit_machine()){
>   $y = $x >> 11;
> }
> else{
>   $y = $x >> 43; //11 + 32 (guess)
> }
> 
> One hack for detecting 32-bit machine might be this:

Isn't php suppose to handle all this?  This seems odd to me.


Curt.
-- 
cat .signature: No such file or directory

--- End Message ---
--- Begin Message ---
Hi!

I have a problem using fread with a XML document. When i read some nodes
with a great amount of text it cuts in the same place of the text. There
are any limitation of text or something? I have in the php.ini the amount
of memory in 256M.

Thanks in advance

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

is it possible to upload a file and see the process of uploading (before the file is uploaded, there is something showing from 0% to 100%) using PHP and Javascript ? I saw some applications in Perl and mostly in JAVA, but I also found out something about some extension for PHP, but i think it wasn't complete at that time.

Thanks for sharing your knowledge about this... :)

Martin

--- End Message ---
--- Begin Message ---
A table with a column big5 char(2) not null primary key.

  $target->query("delete from canton");
  for ($ii=0; $ii<256; $ii++) {
    for ($jj=0; $jj<256; $jj++) {
      echo $ii .".". $jj . "\n";
      $query="insert into canton ( big5 ) values ( '"
      . mysql_real_escape_string(chr($ii).chr($jj))
      . "' )";
      $target->query($query);
    }
  }

The program died with this output:

0.92
0.93
0.94
0.95
0.96
0.97
Duplicate entry '' for key 1

The character strings shouldn't be repeated. Why did it stop at (0,97)?

-- 
  .~.    Might, Courage, Vision. SINCERITY. http://www.linux-sxs.org
 / v \
/( _ )\  (Ubuntu 5.10)  Linux 2.6.14.4
  ^ ^    22:15:01 up 8 days 11:12 load average: 0.02 0.06 0.10

--- End Message ---
--- Begin Message ---
Man-wai Chang wrote:
> A table with a column big5 char(2) not null primary key.
> 
>   $target->query("delete from canton");
>   for ($ii=0; $ii<256; $ii++) {
>     for ($jj=0; $jj<256; $jj++) {
>       echo $ii .".". $jj . "\n";
>       $query="insert into canton ( big5 ) values ( '"
>       . mysql_real_escape_string(chr($ii).chr($jj))
>       . "' )";
>       $target->query($query);
>     }
>   }
> 
> The program died with this output:
> 
> 0.92
> 0.93
> 0.94
> 0.95
> 0.96
> 0.97
> Duplicate entry '' for key 1
> 
> The character strings shouldn't be repeated. Why did it stop at (0,97)?
> 
Here's one thought ..... ascii (97) is the letter "a" .... is it
possible that the ascii (65) "A" was interpreted as lowercase thus
creating a duplicate primary key? Or your DBMS doesn't make a
distinction between upper or lower case.



-- 
Jerry Kita

http://www.salkehatchiehuntersville.com

email: [EMAIL PROTECTED]

--- End Message ---
--- Begin Message --- We're writing to you to invite you to take a look at our open source software project, Pipeline for PHP.

The project is in its very early stages, and so we ask you to know that there will be more to come, and that this is just the first developer preview. However, we can stand behind it in our belief that it's a highly evolved specimen, and will be of interest to anybody developing web applications, or just writing about them. In the future we will be releasing commercial products under the Livepipe brand, but for now all of the work we are announcing today, or in the near future, will be released under the MIT license for all to enjoy.

We'd love any feedback, so have a look and tell us what you think.

http://livepipe.net/

Happy New Year,

Ryan Johnson, Architect and Founder
Nicholas Zulauf, President

--- End Message ---

Reply via email to