I have a need to do this:

Receive a URL that looks something like this:
http://www.somesite.com/[something]?title=ABCTitle&name=ABCName

Then the [something] takes the key/value pairs and redirects them to:
http://www.someOTHERsite.com/?title=ABCTitle&name=ABCName

Basically I want to take the data after the '?' and send it on to another site.

What would the code look like for [something]?

Thanks all!
-Kevin

How do you receive the url?

The first URL is generated by a program and included in an email/text message/calendar event in a hyperlink. So I control how the first URL is formated.

Then a user will use the first URL hyperlink to 'go' to it.

If I understand correctly the first hyper-link leads to a script of yours. If that is the case then you'd simply use

$url = 'http://www.someothersite.com/title=' . $_GET['title'] . '&name=' . $_GET['name'];
header('Location:' . $url);

Got it! This is the contents of my somefile.php

<?php
$url = 'www.someothersite.com?title=' . $_GET['title'] . '&name=' . $_GET['name'];
header('Location:' . $url);
?>
<head>
</head>

<body>
</body>
</html>

I call it by:

"www.firsturl.com/somefile.php?title=TITLE&name=NAME"
Thanks!

No problem. =]

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.