By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,743 Members | 1,850 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,743 IT Pros & Developers. It's quick & easy.

How do I get rid of long URLs?

P: n/a
In many cases I use URLs like foo.php?a=4b&c=d&e=f&g=h etc.
to send variables from one script to another
Is there a way to not have the long URL and just call foo.php and send the
variables in a more "invisible" way?

--
I didn't know sci.bio.paleontology was that low traffic until I tried read
the thread "Where is everyone?" and found it to be expired.
Feb 3 '07 #1
Share this Question
Share on Google+
7 Replies


P: n/a
In many cases I use URLs like foo.php?a=4b&c=d&e=f&g=h etc.
to send variables from one script to another
Is there a way to not have the long URL and just call foo.php and send the
variables in a more "invisible" way?
I forgot to tell, there is no user input required on the webpages

--
I didn't know sci.bio.paleontology was that low traffic until I tried read
the thread "Where is everyone?" and found it to be expired.
Feb 3 '07 #2

P: n/a
On Feb 3, 9:33 am, Gunnar G <deb...@comhem.sewrote:
In many cases I use URLs like foo.php?a=4b&c=d&e=f&g=h etc.
to send variables from one script to another
Is there a way to not have the long URL and just call foo.php and send the
variables in a more "invisible" way?

I forgot to tell, there is no user input required on the webpages

--
I didn't know sci.bio.paleontology was that low traffic until I tried read
the thread "Where is everyone?" and found it to be expired.
Dear Gunnar,

you could try to serialize your data and then compress it ...
Or, if you are looking for a method to send data from one server to
another, have a look at the curl functions - this way you could use
POST variables instead of GET and your data would disappear completely
from your URL ...

Good luck
Martin

Feb 3 '07 #3

P: n/a
Maybe you are looking for the HTTP POST method?

Feb 3 '07 #4

P: n/a
Gunnar G wrote:
>In many cases I use URLs like foo.php?a=4b&c=d&e=f&g=h etc.
to send variables from one script to another
Is there a way to not have the long URL and just call foo.php and send
the variables in a more "invisible" way?

I forgot to tell, there is no user input required on the webpages
Then whoever has designed the site designed it to work that way - moving to
statically addressed URLs is not going to be trivial.

If the structure is consistent then you might be able to get some mileage
out of using mod_rewrite. And / Or you could look at condensing and
multiplexing your variables.

Or just shove a big frame in front of the page.

C.
Feb 3 '07 #5

P: n/a
Gunnar G wrote:
In many cases I use URLs like foo.php?a=4b&c=d&e=f&g=h etc.
to send variables from one script to another
Is there a way to not have the long URL and just call foo.php and send the
variables in a more "invisible" way?
Gunnar,

If you're just passing data from one page to another, you could use the
$_SESSION variable. Easier than using CURL, but one difference with
what you have now. $_GET values are transient - they only appear when
they are passed as parameters. Once a $_SESSION value is set, it
remains until you clear it or the session ends. This may or may not
cause problems for you.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Feb 3 '07 #6

P: n/a
"Gunnar G" <de****@comhem.sekirjoitti
viestissä:xH*******************@newsb.telia.net...
In many cases I use URLs like foo.php?a=4b&c=d&e=f&g=h etc.
to send variables from one script to another
Is there a way to not have the long URL and just call foo.php and send the
variables in a more "invisible" way?
Are you really sure you want to use your time to this? Because if point is
to move information to ANY other page in ANY other domain without ANY
problems, that's the normal way to do it. Too much efforts just on "beauty"
of url are waste of time.

Of course sessions and cookies are there. But before using them, there
should IMHO be a REASON to do it.

Feb 3 '07 #7

P: n/a
<comp.lang.php>
<Gunnar G>
<Sat, 03 Feb 2007 08:27:09 GMT>
<xH*******************@newsb.telia.net>
In many cases I use URLs like foo.php?a=4b&c=d&e=f&g=h etc.
to send variables from one script to another
Is there a way to not have the long URL and just call foo.php and send the
variables in a more "invisible" way?
You could use a form button instead of a hyperlink .

<input type="hidden" name="user" value="<?php print $uzi; ?>">

The above variable wont show up on the next page .
--
www.phptakeaway.co.uk
(work in progress)
Feb 5 '07 #8

This discussion thread is closed

Replies have been disabled for this discussion.