4WebHelp
 FAQ  •  Search  •  User Groups  •  Forum Admins  •  Smilies List  •  Statistics  •  Rules   •  Login   •  Register
Toggle Navigation Menu

 PHP: Out of Site Script
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic
Author Message
Justin
4WebHelp Addict
4WebHelp Addict


Joined: 07 Jan 2002
Posts: 1060

PostPosted: Mon Dec 30, 2002 11:06 pm (21 years, 3 months ago) Reply with QuoteBack to Top

Hiya,

Was wondering if anyone knew something that is the PHP Equivlent of something like this :

http://www.partget.co.uk/out/link.asp?url=http://www.bluesweb.co.uk

Cheers!
OfflineView User's ProfileFind all posts by JustinSend Personal MessageSend email
adam
Forum Moderator & Developer



Joined: 26 Jul 2002
Posts: 704
Location: UK

PostPosted: Tue Dec 31, 2002 2:58 pm (21 years, 3 months ago) Reply with QuoteBack to Top

just assuming you want a script that opens a frame with that URL in it, you could simply write:
Code:

<html>
...
<frame src="<?php print $url; ?>" ..>
...
</html>

and visit page.php?url=http://somesite.com/

You may want to add some error checking measures, but that would work.

________________________________
It's turtles all the way down...
OfflineView User's ProfileFind all posts by adamSend Personal MessageVisit Poster's Website
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Fri Jan 03, 2003 9:46 am (21 years, 3 months ago) Reply with QuoteBack to Top

Hi,

You might want to be careful about the legal implications of such a script, if you're linking to big sites. If a lot of people click on your links, these sites may get very annoyed at you having an advertising frame above their site.

Also, you should replace $url with $_GET['url'] Wink

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
adam
Forum Moderator & Developer



Joined: 26 Jul 2002
Posts: 704
Location: UK

PostPosted: Fri Jan 03, 2003 7:20 pm (21 years, 3 months ago) Reply with QuoteBack to Top

Daniel wrote:
Also, you should replace $url with $_GET['url'] Wink

why?

________________________________
It's turtles all the way down...
OfflineView User's ProfileFind all posts by adamSend Personal MessageVisit Poster's Website
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Fri Jan 03, 2003 8:33 pm (21 years, 3 months ago) Reply with QuoteBack to Top

In the latest versions of PHP, importing of variables from the query string isn't done by default, so $url wouldn't exist. Only $_GET['url'] would. It's just a good habit to get into (just like coding properly - indentation, spacing, etc...).

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
adam
Forum Moderator & Developer



Joined: 26 Jul 2002
Posts: 704
Location: UK

PostPosted: Fri Jan 03, 2003 8:40 pm (21 years, 3 months ago) Reply with QuoteBack to Top

oh, I didn't know that...hmm, that explains a problem I ran into a little while ago...

________________________________
It's turtles all the way down...
OfflineView User's ProfileFind all posts by adamSend Personal MessageVisit Poster's Website
Display posts from previous:      
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic


 Jump to:   




You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot edit your posts in this forum.
You cannot delete your posts in this forum.
You cannot vote in polls in this forum.


Page generation time: 0.117339 seconds :: 18 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme