Can anyone tell me if it's possible to enter a URL such as http://www.streetfish.co.uk/1234
and take the number and pass it to the index.php script (where the
number is the user's mySQL user id.
This is pretty much what happens with tinyurl.com (as far as I
understand) but the examples I have read regarding this are using
different technologies.
If anyone can help, or if you can let me know if you've seen a similar
example, I'd appreciate some help.
Thanks,
Dylan 7 1512
Following on from dylan's message. . . Can anyone tell me if it's possible to enter a URL such as
http://www.streetfish.co.uk/1234
and take the number and pass it to the index.php script (where the number is the user's mySQL user id.
The functionality you want is in the web server itself.
Look in the Apache docs for something like (never done it) URL
Rewriting.
--
PETER FOX Not the same since the submarine business went under pe******@eminen t.demon.co.uk.n ot.this.bit.no. html
2 Tees Close, Witham, Essex.
Gravity beer in Essex <http://www.eminent.dem on.co.uk>
Ok, I don't know exactly, but you would use an .htaccess script I
expect to get the address sent to a php script, then from that use the
substr command to take out the main url leaving you with 1234 which you
could put into a variable. You could just have something like this
though : streetfish.co.u k/link?id=1234 much easier.
@Peter: His server is ISS so he wont find anything helpful looking at
the apache docs, look at the errorpages.
<?
$url= $_SERVER['PHP_SELF']; //gives you url
$userid=strrchr ($url,"/"); // gives u /1234
$userid=substr( $file,1); // gives u 1234 by eliminating /
/* i think u got it */
?>
<?php
echo $_SERVER['HTTP_HOST']; //outputs sitename.com etc
echo $_SERVER['REQUEST_URI']; //outputs /index.php etc
?>
hi,
Thanks for your help on this, been really busy lately, and only now
getting a chance to look at this,
I'll let you know how I get on.
Dylan This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Lisa |
last post by:
I have a select statement that gives me the following results (for
example) "test documentation/software product version document.doc" I
need to parse the data to only grab everything between the "/" and
".". So, in other words, "software product version document" - I have
absolutley no idea how to do this - can anyone help????
Thanks in advance!
Lisa
|
by: Johnny Sandaire |
last post by:
Greetings,
I have a file that I have written some data into it in the following
manner:
Charlene1719056:2011392059"1.908.555.1212"07083
The data is arranged in this order:
name, size,Unique key,phone number, zip code
|
by: .:mmac:. |
last post by:
I have a bunch of files (Playlist files for media player) and I am trying to
create an automatically generated web page that includes the last 20 or 30
of these files. The files are created every week and are named XX-XX-XX.ASX
where the X's represent the date i.e. 05-22-05.asx
The files are a specific format and will always contain tags like the
following:
<TITLE>My media file title</TITLE>
<AUTHOR>Media file author</AUTHOR>
<Ref href =...
|
by: BerkshireGuy |
last post by:
Does anyone know of a good function that will parse out parts of an SQL
statement that is passed to it in seperate variables?
It should be able to parse statements that contain ORDERBY, WHERE,
GROUP, etc.
Thank you,
Brian
|
by: zoltan |
last post by:
Hi,
The scenario is like this :
struct ns_rr {
const u_char* rdata;
};
The rdata field contains some fields such as :
| |
by: giulianodammando |
last post by:
In the development of a simple numerical simulation software i need to
read
some initialization parameters from a file that looks like:
# Global Setup
species = 1;
\begin{specie}<1>
name = NITROGEN;
|
by: junky_fellow |
last post by:
Hi,
Sorry, for asking similar questions again and again.
1) I want to know how should we reslove the ambiguities in a c
expression ?
Should we use precedence table as mentioned in K&R book or should
we refer to the ANSI C grammar ?
2) As told by many people in this newsgroup that ANSI C grammar does
|
by: bmichel |
last post by:
Hey,
What I'm doing is the following:
- Load XML data a file
- Parsing the XML data
- Printing some parsed content
The problem is that the script execution is stopping before all the
content is parsed and printed.
Maybe the PHP is out of memory after a while. That would make sense
|
by: dave.degroot |
last post by:
What does this mean?
PHP Parse error: parse error, unexpected
T_CONSTANT_ENC\
APSED_STRING in /home/web/david/processedorder.php on line 23,
referer: http://\
degroot.xidus.net/
|
by: Chris Carlen |
last post by:
Hi:
Having completed enough serial driver code for a TMS320F2812
microcontroller to talk to a terminal, I am now trying different
approaches to command interpretation.
I have a very simple command set consisting of several single letter
commands which take no arguments. A few additional single letter
commands take arguments:
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |