![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Oct 2003
Location: Cyberspace
Posts: 2,662
|
PHP Gurus, fix this simple code
I'm doing a redirect in a php file, but having a problem with how to display the id at the end of the URL. Basically where it says "echo $id". What's the correct code for this?
<?php header("location:http://refer.ccbill.com/cgi-bin/clic...6-0000&PA=echo $id"); exit; ?> thanks in advance |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Dec 2004
Location: NL (Eindhoven), CZ(Prague), FR(Concarneau)
Posts: 3,958
|
<?php
header('http://refer.ccbill.com/cgi-bin/clicks.cgi?CA=929876-0000&PA='. $id); exit; ?>
__________________
[img]http://****************/sig/fhv3_j2_624x80_2.gif[/img] $35-40 Per Signup, 60-70% Rev Share, over 80 Sites, Exclusive Sites, tons of free content 14,000+ Free hosted Galleries, RSS feeds, Domain Hosting, Embedded Flash Movies Join Fetish Hits now! ICQ: 358652230 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Dec 2004
Location: NL (Eindhoven), CZ(Prague), FR(Concarneau)
Posts: 3,958
|
and maybe make exit to this:
exit();
__________________
[img]http://****************/sig/fhv3_j2_624x80_2.gif[/img] $35-40 Per Signup, 60-70% Rev Share, over 80 Sites, Exclusive Sites, tons of free content 14,000+ Free hosted Galleries, RSS feeds, Domain Hosting, Embedded Flash Movies Join Fetish Hits now! ICQ: 358652230 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Oct 2003
Location: Cyberspace
Posts: 2,662
|
cool it worked. what if I need to have a URL at the end of the redirect. code below, but i know it's wrong: <?php header('location:http://refer.ccbill.com/cgi-bin/clicks.cgi?CA=98956-0000&PA='. $id'&HTML=http://www.site.com); exit(); ?> |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Join Date: Sep 2003
Posts: 8,713
|
'.$id.'&html=http://www.site.com');
__________________
![]() TrafficCashGold Paying Webmasters Since 1996! Awesome Conversions! Fast Weekly Payments! Over 125 Tours! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Join Date: Sep 2003
Posts: 8,713
|
you can also make $id="yourid&html=http://www.site.com"
with this code: <?php header('http://refer.ccbill.com/cgi-bin/clicks.cgi?CA=929876-0000&PA='. $id); exit; ?>
__________________
![]() TrafficCashGold Paying Webmasters Since 1996! Awesome Conversions! Fast Weekly Payments! Over 125 Tours! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
Join Date: Oct 2003
Location: Cyberspace
Posts: 2,662
|
thank you very much! i suck at php
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Confirmed User
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,229
|
you all fail. That code would rely on register_globals being on, which is off by default under php5.
<?php $id = $_GET[id]; header('Location: http://refer.ccbill.com/cgi-bin/clicks.cgi?CA=98956-0000&PA='.$id.'&HTML=http://www.site.com'); exit(); ?>
__________________
Mechanical Bunny Media Mechbunny Tube Script | Mechbunny Webcam Aggregator Script | Custom Web Development |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 | |
Confirmed User
Join Date: Jul 2004
Location: The Beach
Posts: 4,626
|
Quote:
Shaze Here is a example where it's a bit more split up. You should really read http://w3schools.com/php/default.asp It takes 30 minutes and will save you many many hours in the future. <?php $id = $_REQUEST["id"]; $urlstring = "http://refer.ccbill.com/cgi-bin/clicks.cgi?CA=98956-0000&PA=".$id."&HTML=http://www.site.com"; header("Location: " . $urlstring); exit(); ?>
__________________
ICQ# 143561781 |
|
![]() |
![]() ![]() ![]() ![]() ![]() |