I want to check to see if people have voted yet for a poll.
How can I get the ip of a user from both behind a proxy and the proxies ip?
is this simple?
will i have trouble with firewalls etc?
--
JJ Harrison
[EMAIL PROTECTED]
www.tececo.com
--
PHP General Mailing List (http://www.php.net/)
There is no imagejpeg() call in the code snippet you provided. And you
don't say how it is failing. You haven't provided us with enough data to
answer this question.
-Rasmus
On Sat, 29 Jun 2002, andy wrote:
> Hi there,
>
> I would like to save a jpg into a blob field of mysql. The function
>
You can only get it if the proxy provides you with this data. Most don't,
so this is not a reliable approach.
-Rasmus
On Sat, 29 Jun 2002, JJ Harrison wrote:
> I want to check to see if people have voted yet for a poll.
>
> How can I get the ip of a user from both behind a proxy and the proxie
I've tried everything I can think of to change a dallar sign in a string to
something else or to split the string on the $ but I can't the the
information that comes after the $.
Typical string contains: 1.2$General/ms1.zip
when I try:
$new_string = preg_replace("/\$/", "%", $test_string
On Thu, Jun 27, 2002 at 11:09:23AM -0600, notoriousvic_ca wrote:
> I have an HTML form which allows users to query data in an Oracle 8
> Database. Usualy a search may return over 100 records so I diplay 10
> records per page. I would like to make the search more efficient by
> using the OCISetPre
-Original Message-
> From: Peter J. Schoenster [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, June 29, 2002 1:27 AM
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP] Keeping "Secrets" in PHP Files
> Yeah, you are assuming an environment that does
> not necessarily have to be. Why must one Apache
Hi,
Apologies if this question has already been asked in the past, but I have
only just registered for this list.
Does PHP in anyway support ASP style application-level variables in a
similair way to how standard sessions are used.
Though of implementing this as either files or database records
This seems to be the question of the question of the week. No, there are
no application level variables in PHP. You can set constants, either
through your web server, or maybe PHP.ini, but that's about it.
I think the easiest way to implement something like this would be to use
the auto_append_f
php-general Digest 29 Jun 2002 13:33:03 - Issue 1434
Topics (messages 104450 through 104483):
Re: Constants
104450 by: John Holmes
Re: Writing a GIF/JPG Image
104451 by: Anzak Wolf
104453 by: Brandon
104454 by: Rasmus Lerdorf
104455 by: Brandon
> Make that file load the application variables from the database, and
the
> prepend file saves any changes...
errr...prepend loads...append save. Damn English language...
---John Holmes...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
... sorry I thought it would be to much code.
Here is the complete code :
$inputImg = ImageCreateFromJPEG($picture_location);
# old size
$srcX = imagesx($inputImg);
$srcY = imagesy($inputImg);
# new size
$ratio = ($srcY / $dstY);
$dstX = ($srcX / $ratio);
$outputImg = Image
I have some popup menus and want the items in the menu to be populated from
a database. In this case I have a table that contains a listing of
departments. I have a page that I can go in and add/delete departments, and
want the changes to reflect in the menu the next time you go to the page.
I se
Thanks alot,
I changed the reporting level. I found it myself later on. Just was a bit to
quick when posting this question.
Sacha Telgenhof
"John Holmes" <[EMAIL PROTECTED]> wrote in message
news:000d01c21f0c$de789bf0$b402a8c0@mango...
> > Maybe it's already discussed here, but PHP is generatin
On Saturday 29 June 2002 23:41, Mike Tuller wrote:
> I have some popup menus and want the items in the menu to be populated from
> a database. In this case I have a table that contains a listing of
> departments. I have a page that I can go in and add/delete departments, and
> want the changes to
Hi Mike,
Check out ADODB. It's a database abstraction layer for PHP that has
functions to do this. (php.weblogs.com) Otherwise it's kinda easy to do
this, here's some psuedo-code that shoudl get you going.
fields['departmentID']; ?>">fields['departmentName']; ?>
?>
=C=
*
* Cal Evans
* Jo
use single quotes: double quotes would confuse php with variable names.
it thinks that $General is a variable and replace it by it's empty content.
single quotes prevent php from evaluating the string:
$test_string = '1.2$General/ms1.zip';
single quotes on regex too (same reason). the backslash
On Saturday 29 June 2002 22:58, Beverly Steiner wrote:
> I've tried everything I can think of to change a dallar sign in a string to
> something else or to split the string on the $ but I can't the the
> information that comes after the $.
>
> Typical string contains: 1.2$General/ms1.zip
>
> when
Thanks. I thought the example I found was a little to complicated for
something like this.
> From: "Cal Evans" <[EMAIL PROTECTED]>
> Date: Sat, 29 Jun 2002 11:03:16 -0500
> To: "Mike Tuller" <[EMAIL PROTECTED]>, "php mailing list"
> <[EMAIL PROTECTED]>
> Subject: RE: [PHP] Populate Popup Menu fr
I only ask questions if I have tried to do something myself already. I am
not looking for someone to do something for me. When I do ask a question
though, I feel I deserve at least a little respect. If you want to be an
ass, do it somewhere else.
> From: Jason Wong <[EMAIL PROTECTED]>
> Organizat
Lee,
Please check the archives before posting questions like this. As John
stated, this question has been asked and answered this week. (I think it was
a thread just yesterday.)
It would have been much quicker for you to get your answer by mining the
archives than by posting it again here.
Tha
On Sunday 30 June 2002 00:31, Mike Tuller wrote:
> I only ask questions if I have tried to do something myself already. I am
> not looking for someone to do something for me. When I do ask a question
> though, I feel I deserve at least a little respect. If you want to be an
> ass, do it somewhere
Jason,
Thanx for your suggestion but I tried it and it didn't work. I'm not sure
if it matters, but this running on NT.
Bev
-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]]
Sent: Saturday, June 29, 2002 12:05 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] need to change $ ch
On Sunday 30 June 2002 01:24, Beverly Steiner wrote:
> Thanx for your suggestion but I tried it and it didn't work. I'm not sure
> if it matters, but this running on NT.
Not sure whether NT has anything to do with it but it works for me :-)
If you can't get the following code to work then you
> On Saturday 29 June 2002 18:02, Dan Tappin wrote:
>> I am setting up a login section of my site using sessions. I have the
>> login working with and without cookies enabled. I do not want to restrict
>> my users be requiring cookies.
>>
>> The problem is that I can't seem to get PHP to auto a
Mike Tuller wrote:
>I only ask questions if I have tried to do something myself already. I am
>not looking for someone to do something for me. When I do ask a question
>though, I feel I deserve at least a little respect. If you want to be an
>ass, do it somewhere else.
>
It seems *you* are the on
This is a follow-up to another thread - [PHP] session.use_trans_sid
I am setting up a login section of my site using sessions. I have the login
working with and without cookies enabled. I do not want to restrict my
users be requiring cookies.
Here is my /login/login.php file which takes the re
To let everyone know, I did apologize to Mr. Wong. I misunderstood what he
was trying to ask me. I took it as he was saying "It's easy, what is "your"
problem" rather than "What "is" your problem" .
> From: Chris Shiflett <[EMAIL PROTECTED]>
> Date: Sat, 29 Jun 2002 13:50:14 -0500
> To: Mike Tull
How do I limit the number of decimal places returned in this query?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
I want to write function which change variable in ie. config.php file ...
Here is code:
and config.php:
and it's doesn't work :( ... when I run script, it clear config.php and
nothing else ... where is my fault?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit
round($order_total), floor("), ceil(") are some options.
> How do I limit the number of decimal places returned in this query?
>
>
> $result2 = mysql_query("SELECT sum(purchase_price) as total FROM assets
> where order_number='$order_number'");
>
> while(list($order_total) = mysql_fetch_row($resu
Hello, Folks,
My apologies if this has been asked a thousand times. I've just joined the
list.
I can't find any information on passing JavaScript variables to PHP on the
same page (i.e. not through the POST information of a submitted form). Is
this because it's not possible?
To take the load of
> How do I limit the number of decimal places returned in this query?
>
>
> $result2 = mysql_query("SELECT sum(purchase_price) as total FROM
assets
> where order_number='$order_number'");
>
> while(list($order_total) = mysql_fetch_row($result2))
>
> {
>
> print ("$order_total");
If you were
Not possible. You must refresh the page to send something back to PHP.
Only workaround is using a hidden frame or layer and refreshing that...
---John Holmes...
> -Original Message-
> From: Jed Verity [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, June 29, 2002 3:14 PM
> To: [EMAIL PROTECT
I've done this stuff recently. I need to pass whole arrays betn. php and
Javascript (2-way), here is some code:
// PHP var. to JS
function arrFromStr (str2convert) { // make an array from string
arr = new Array();
var posOfQt1 = str2convert.indexOf('\"');
var posOfQt2 = str2convert.
That's what I was afraid of. It makes sense, of course...I was just hoping
there was some kind of hack. Thanks for responding!
Jed
I liked it when John Holmes wrote this to me:
> Not possible. You must refresh the page to send something back to PHP.
> Only workaround is using a hidden frame or l
Hi,
I need to generate RTF files from within PHP scripts based on user
input. Do you know of any package to do the trick ?
Perhaps external one, for ex. generate a XML version and feed it into an
external converter.
The rtf would have header/footer, ocasional images and tables.
Thanks.
Jed Verity wrote:
>I can't find any information on passing JavaScript variables to PHP on the
>same page (i.e. not through the POST information of a submitted form). Is
>this because it's not possible?
>
Basically, this is not possible.
A common area of confusion to those new to Web programming
> My apologies if this has been asked a thousand times. I've
> just joined the list.
I has, but you get that...
> I can't find any information on passing JavaScript variables
> to PHP on the same page (i.e. not through the POST information of a
> submitted form). Is this because it's no
works for me on win2k
- Original Message -
From: "Jason Wong" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, June 29, 2002 6:43 PM
Subject: Re: [PHP] need to change $ char in string
On Sunday 30 June 2002 01:24, Beverly Steiner wrote:
> Thanx for your suggestion but I trie
Or setting a cookie in JavaScript. It will be transmitted on the next page
request.
-Original Message-
From: John Holmes [mailto:[EMAIL PROTECTED]]
Sent: Saturday, June 29, 2002 3:30 PM
To: 'Jed Verity'; [EMAIL PROTECTED]
Subject: RE: [PHP] Javascript to PHP?
Not possible. You must refr
Hello, Chris,
Many thanks for the thorough description. It does make sense, of course...I
was just hoping that there was some kind of funky loophole that small brains
like mine couldn't comprehend.
Thanks again!
Jed
I liked it when Chris Shiflett wrote this to me:
> Jed Verity wrote:
>
>> I c
check this out:
http://www.phpbuilder.com/columns/nair20020523.php3
Mirza
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Search before you post. I don't know the answer, but this turned up on
google when searching for "generate rtf with PHP"
http://paggard.dlight.ru/rtf_gen/
Yeah, it costs, but it looks good. Help a programmer out!
I'm sure there are others. Look on hotscripts.com and sourceforge.net
---John Hol
On Saturday 29 June 2002 09:37 pm, Mario Bittencourt wrote:
> I need to generate RTF files from within PHP scripts based on user
> input. Do you know of any package to do the trick ?
>
Besides the package already named, you can also just read an rtf template file
and use str_replace.. It's pl
Hello,
On 06/29/2002 04:37 PM, Mario Bittencourt wrote:
> Hi,
>
> I need to generate RTF files from within PHP scripts based on user
> input. Do you know of any package to do the trick ?
If you are running under Windows you may use COM objects to convert HTML
into RTF. You may want to try t
Hello Again, Folks,
I've been testing this for a while and keep coming up with mixed results. In
general, is it faster and more efficient to query a MySQL database once with
a large SQL select statement and then loop through the huge resulting table?
Or does it make better sense to perform a numb
I am *very* new to PHP, so this may seem like a stupid question... I am
trying to generate dynamic drop-down lists for use in an HTML form, but
I have done something wrong with my code. Instead of getting one list
box with three options, I am getting three list boxes with one option.
I have
On Saturday, June 29, 2002 at 10:03:16 PM, Chase wrote:
> I am *very* new to PHP, so this may seem like a stupid question... I am
> trying to generate dynamic drop-down lists for use in an HTML form, but
> I have done something wrong with my code. Instead of getting one list
> box with three o
Thank you Stuart!! I feel like an idiot... I had tried moving one or
the other outside the loop, but not both... Thank you again!!
Chase
Stuart Dallas wrote:
> On Saturday, June 29, 2002 at 10:03:16 PM, Chase wrote:
>
>>I am *very* new to PHP, so this may seem like a stupid question... I
Depends what you're after. Your query should always return exactly the
data you are after. Your tables should be arranged so that is possible.
---John Holmes...
> -Original Message-
> From: Jed Verity [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, June 29, 2002 5:10 PM
> To: [EMAIL PROTECT
try double \\ to escape the special characters used by php for variables and
what not. I think I read it here on a previous post.
Hope this helps
Hugh
- Original Message -
From: "Beverly Steiner" <[EMAIL PROTECTED]>
To: "PHP List" <[EMAIL PROTECTED]>
Sent: Saturday, June 29, 2002 7:58 AM
Jed Verity wrote:
>In general, is it faster and more efficient to query a MySQL database once with
>a large SQL select statement and then loop through the huge resulting table?
>Or does it make better sense to perform a number of smaller queries with
>smaller resulting tables?
>
This is a hard qu
Hi All,
I've stumped myself here. In a nutshell, I have a function that returns my
array based on a SQL query and here's the code:
-begin code---
function getCourses($UID)
{
global $link;
$result = mysql_query( "SELECT C.CourseName FROM tblcourses C, tblusers U,
tb
On Sat, 29 Jun 2002, Chris Shiflett wrote:
> 2) if not, try very specific queries that retrieve just the data you need,
> and carefully free all results as you finish - also try to use persistent
> connections if you forsee your site being under heavy load.
Something I haven't picked up in my re
You might be able to pass them as a cookie.
Bruce Karstedt
President
Technology Consulting Associates, Ltd.
Tel: 847-735-9488
Fax: 847-735-9474
-Original Message-
From: Jed Verity [mailto:[EMAIL PROTECTED]]
Sent: Saturday, June 29, 2002 2:59 PM
To: Chris Shiflett
Cc: [EMAIL PROTECTED]
S
At 3:27 PM -0700 6/29/02, Brad Melendy wrote:
>Hi All,
>I've stumped myself here. In a nutshell, I have a function that returns my
>array based on a SQL query and here's the code:
>
>-begin code---
>function getCourses($UID)
> {
> global $link;
> $result = mysql_que
Oops! It's hot, it's Saturday, brain not functioning at 100%, made
cut'n'paste error:
or (2) set a flag in getCourses() so that the query is only executed
once, otherwise returning a result line - something like:
function getCourses($UID)
global $link;
static $result = false;
Duncan Hill wrote:
>Is a free required for every query? Or can I go connect, query, query,
>query, free, close?
>
You never have to free your results if you don't want to. As I
understand it, doing so simply frees up the memory that is being taken
up by the result set ($result in most exampl
On Sat, 29 Jun 2002 16:58:50 -0300, Jed Verity wrote:
>Hello, Chris,
>
>Many thanks for the thorough description. It does make sense, of
>course...I
>was just hoping that there was some kind of funky loophole that
>small brains
>like mine couldn't comprehend.
well if it's one-way only communicati
On Sat, 29 Jun 2002, Chris Shiflett wrote:
> Duncan Hill wrote:
>
> >Is a free required for every query? Or can I go connect, query, query,
> >query, free, close?
> >
>
> You never have to free your results if you don't want to. As I
> understand it, doing so simply frees up the memory that
I want to check to see if people have voted yet for a poll.
How can I get the ip of a user from both behind a proxy and the proxies ip?
is this simple?
will i have trouble with firewalls etc?
"Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Y
php-general Digest 30 Jun 2002 01:34:00 - Issue 1435
Topics (messages 104484 through 104543):
Getting IP from behind proxies
104484 by: JJ Harrison
104486 by: Rasmus Lerdorf
104543 by: JJ Harrison
Re: saving temporary image to database
104485 by: Rasmus Lerd
Steve,
Thanks very much. This make total sense to me. Now, I was pretty sure that
I was getting an array back from mysql_fetch_array because when I do a
'print $myCourses' without specifying any value, I just get 'array' which I
believe I am supposed to, IF it is truly an array. Anyway, I'm goi
Has anyone got a working mcrypt.dll for php 4.2.1 and Windows 2000 Server?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
what esle could i use?
"Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> You can only get it if the proxy provides you with this data. Most don't,
> so this is not a reliable approach.
>
> -Rasmus
>
> On Sat, 29 Jun 2002, JJ Harrison wrote:
>
> >
You need to assign each person a unique identifier of some sort. ie.
assign them a login and password and verify that information by sending a
message to their email address. Then only people with multiple email
addresses can spam your system with votes.
Beyond that it comes down to verifying e
At 7:35 PM -0700 6/29/02, Brad Melendy wrote:
>Steve,
>Thanks very much.
You're welcome!
>This make total sense to me. Now, I was pretty sure that
>I was getting an array back from mysql_fetch_array because when I do a
>'print $myCourses' without specifying any value, I just get 'array' which
John,
Try using the number_format function.
Bev
-Original Message-
From: John Wulff [mailto:[EMAIL PROTECTED]]
Sent: Saturday, June 29, 2002 3:10 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Limiting number of decimal places reported
How do I limit the number of decimal places returned in
Steve,
Thanks a ton! I'm now running slick as a whistle using your option #1
(looping through the results in the function) and using the newer
mysql_fetch_assoc() function. I have a much better understanding of this
now and I really appreciate your help. Hopefully I'll get a chance to help
some
69 matches
Mail list logo