473,406 Members | 2,843 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Parameters to image.php

Hi,

I generate images on the fly. I need to pass parameters to the image-script
(image.php). The parameters are larger than 255 characters.

What's the best way to pass large parameters from the calling page (<img
src="image.php">) to the image.php script? Cookies? Filesystem?

Thanks in advance for the suggestions.

M.
Nov 29 '05 #1
7 1605
>What's the best way to pass large parameters from the calling page (<img
src="image.php">) to the image.php script? Cookies? Filesystem?


POST

Nov 29 '05 #2
Mathijs wrote:
Hi,

I generate images on the fly. I need to pass parameters to the
image-script (image.php). The parameters are larger than 255 characters.

What's the best way to pass large parameters from the calling page (<img
src="image.php">) to the image.php script? Cookies? Filesystem?

Thanks in advance for the suggestions.

M.


Hi,

Depends on the situation.

If you have a few simple things to send by the client, just use POST.

If you have a huge page where you also display results that have some
correlation to the image, you might consider using a SESSION to store the
data in you use for imagegeneration.
In that way you avoid double calculations and database-queries.

Regards,
Erwin Moller
Nov 29 '05 #3
29 nov 2005 ta (Erwin Moller) shuo le:
If you have a few simple things to send by the client, just use POST.
If you have a huge page where you also display results that have some
correlation to the image, you might consider using a SESSION to store
the data in you use for imagegeneration.
In that way you avoid double calculations and database-queries.


It's just a simple thing: a want to send a gamerecord to the image.php
script and with that data, I want to draw a board.

Currently, the image-script gets triggered by the <img src="image.php">
construction? Don't I need an action (form) to 'post' variables?

TIA,
Mathijs.

Nov 29 '05 #4
Mathijs wrote:
29 nov 2005 ta (Erwin Moller) shuo le:
If you have a few simple things to send by the client, just use POST.
If you have a huge page where you also display results that have some
correlation to the image, you might consider using a SESSION to store
the data in you use for imagegeneration.
In that way you avoid double calculations and database-queries.


It's just a simple thing: a want to send a gamerecord to the image.php
script and with that data, I want to draw a board.

Currently, the image-script gets triggered by the <img src="image.php">
construction?


In that case, store the game record data in $_SESSION.

--
Oli

Nov 29 '05 #5
Mathijs wrote:
29 nov 2005 ta (Erwin Moller) shuo le:
If you have a few simple things to send by the client, just use POST.
If you have a huge page where you also display results that have some
correlation to the image, you might consider using a SESSION to store
the data in you use for imagegeneration.
In that way you avoid double calculations and database-queries.
It's just a simple thing: a want to send a gamerecord to the image.php
script and with that data, I want to draw a board.

Currently, the image-script gets triggered by the <img src="image.php">
construction? Don't I need an action (form) to 'post' variables?


Yes, you do, you are right.
You should use GET for simple stuff.

I don't think you should care too much about the 255 characters.
It is depends on the server if it can handle a big url, and any modern
webserver can do so these days.

I would advise you to just put the whole bunch of data after the url.

Regards,
Erwin Moller


TIA,
Mathijs.


Nov 29 '05 #6
29 nov 2005 ta (Oli Filth) shuo le:
In that case, store the game record data in $_SESSION.


Aye, sir!

Thanks all.

Cheers,
M.
Nov 29 '05 #7
29 nov 2005 ta (Erwin Moller) shuo le:
I would advise you to just put the whole bunch of data after the url.


It can really get long (it's a long game:). Is there a theoretical limit to
the length of get-vars on modern servers? I think I'de rather take your
first advice: sessions.

Thanks.
Nov 29 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Al Franz | last post by:
Anyone understand how to pass parameters to a JavaScript. If anyone finds this easy to do maybe they could take a look at my short script on this page and show me how it needs to be changed. ...
6
by: Eric Johnston | last post by:
I want the visitor to enter three numbers on the page and then click a button "generate image" which will I hope cause a generated gif image to be displayed alongside on the page. This involved...
8
by: cody | last post by:
Why doesn't C# allow default parameters for methods? An argument against I hear often is that the default parameters would have to be hardbaken into the assembly, but why? The Jit can take care of...
14
by: cody | last post by:
I got a similar idea a couple of months ago, but now this one will require no change to the clr, is relatively easy to implement and would be a great addition to C# 3.0 :) so here we go.. To...
0
by: guddi1 | last post by:
Hi, I am looking to figure out how to display parameters of a post request. I am working in visual C++ environment. I have a program that tracks and outputs URL activity. For instance, when I log...
3
by: computer_guy | last post by:
Hi Everyone, I run into a problem. I am trying to write an aspx that can dynamically generate an image based on some input parameters. Things are very simple if the size of the parameters is...
9
by: [Mr.] Lynn Kurtz | last post by:
I'm new to javascript and I have run into a problem I bet someone here can help me with. I have a little web page that includes this call to another html file with two parameters: <a...
1
by: bharathv6 | last post by:
i need to do is modify the image in memory like resizing the image in memory etc ... with out saving it disk as i have to return back the image with out saving it disk PIL supports the use of...
2
by: hgarg | last post by:
The onpaint() is getting called before calculating the required parameters by listBox1_SelectedIndexChanged function. I tried calling it at the end of this function. But of no use. Due to this issue...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.