Jump to content


Photo

php redirect.php


  • Please log in to reply
7 replies to this topic

#1 nhansam

nhansam

    Young Padawan

  • Members
  • Pip
  • 4 posts

Posted 04 November 2007 - 12:27 PM

Liking an advertise banner at the top and the bottom is linking to the "?URL=..."

another example: http://forum.43phut....//www.yahoo.com <<< the top is banner, and bottom is yahoo website.

how to write PHP code redirect.php page like this

http://forum.43phut....pb14371ftn5.jpg

thank you a lot

Edited by nhansam, 04 November 2007 - 01:45 PM.


#2 CoryMathews

CoryMathews

    P2L Jedi

  • Members
  • PipPipPip
  • 554 posts
  • Gender:Male
  • Location:Texas

Posted 04 November 2007 - 01:32 PM

eh?

#3 RaelRode

RaelRode

    Young Padawan

  • Members
  • Pip
  • 10 posts

Posted 04 November 2007 - 04:31 PM

Do you want to know how to make this kind of system??

#4 nhansam

nhansam

    Young Padawan

  • Members
  • Pip
  • 4 posts

Posted 04 November 2007 - 06:27 PM

Do you want to know how to make this kind of system??



yes, I want to know how the php code will be written

#5 Chaos King

Chaos King

    Senior Programmer

  • P2L Staff
  • PipPipPip
  • 676 posts
  • Gender:Male
  • Location:Florida

Posted 05 November 2007 - 05:22 AM

Second link is dead. Its pretty much an iframe at the bottom and what ever is in the request gets processed into the frame.

#6 nhansam

nhansam

    Young Padawan

  • Members
  • Pip
  • 4 posts

Posted 05 November 2007 - 11:04 PM

here another example, I found
http://im1-music.110.../www.google.com

I see they using iframe, but I still not able to find the PHP code for this iframe.

#7 rc69

rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 06 November 2007 - 12:27 AM

That's because there is no php code for it. Well, at least nothing unusual... Nor do they use an iframe.

They use a <frameset>. Very simple/common. Replaces the <body> tag... you can google that. The part that might elude you (as you don't sound like you know php), is what to do with the query string...

Once you figure out how to use framesets, here's the missing piece of the puzzle:
<frame src="<?php echo $_GET['url']; ?>">


#8 nhansam

nhansam

    Young Padawan

  • Members
  • Pip
  • 4 posts

Posted 08 November 2007 - 12:44 AM

thanks, it works now :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users