How do I pass a link (webpage) through url?

Reply

Join Date: Apr 2008
Posts: 34
Reputation: didi00 is an unknown quantity at this point 
Solved Threads: 0
didi00 didi00 is offline Offline
Light Poster

How do I pass a link (webpage) through url?

 
0
  #1
Apr 30th, 2008
Hello,

I'm new in coding in php
I want to transfer a webpage (news5.html) to another webpage (in a table).
(Like it is done on the news websites "www.domain.com/index?ID=4343"
How can I do it?

I read about passing variables through url, but if it is how it should be done how do I include a link in the variable?

Please help me
Last edited by didi00; Apr 30th, 2008 at 6:12 pm.
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 15
Reputation: mom_of_3 is an unknown quantity at this point 
Solved Threads: 3
mom_of_3's Avatar
mom_of_3 mom_of_3 is offline Offline
Newbie Poster

Re: How do I pass a link (webpage) through url?

 
0
  #2
Apr 30th, 2008
I am not sure exactly what it is your trying to do.. If you are looking to get the info from the link you would use $_GET['ID'] to retrieve the 4343 from the url.. if you are looking to display the content of news5.html page within the table you have created on another page then you might use include('news5.html').
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 187
Reputation: phper is an unknown quantity at this point 
Solved Threads: 15
phper's Avatar
phper phper is offline Offline
Junior Poster

Re: How do I pass a link (webpage) through url?

 
0
  #3
Apr 30th, 2008
Do you mean like screenscraping?
If my post is useful please add to my reputation.
Thanks.

Ajtrichards Web Solutions | http://www.ajtrichards.co.uk
Retenovate | http://www.retenovate.com
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 34
Reputation: didi00 is an unknown quantity at this point 
Solved Threads: 0
didi00 didi00 is offline Offline
Light Poster

Re: How do I pass a link (webpage) through url?

 
0
  #4
Apr 30th, 2008
Yes I want to display the content of news5.html page within the table I have created on another page...

I tried this so far...but it doesnt work

  1. <?php
  2. echo "<a href='1.php?ID=2442'>";
  3. echo "click";
  4. ?>


and in the other file:

  1. <?php
  2. if $_GET['ID'] == 2442 echo file_get_contents("news5.html");
  3. ?>


any suggestion?
Last edited by peter_budo; May 1st, 2008 at 1:16 pm. Reason: Keep It Organized - please use [code] tags
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 569
Reputation: ryan_vietnow is an unknown quantity at this point 
Solved Threads: 71
ryan_vietnow's Avatar
ryan_vietnow ryan_vietnow is offline Offline
Posting Pro

Re: How do I pass a link (webpage) through url?

 
0
  #5
Apr 30th, 2008
Why not use frames?
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 34
Reputation: didi00 is an unknown quantity at this point 
Solved Threads: 0
didi00 didi00 is offline Offline
Light Poster

Re: How do I pass a link (webpage) through url?

 
0
  #6
Apr 30th, 2008
It's far from esthetic

isnt it possible with php ?
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 15
Reputation: mom_of_3 is an unknown quantity at this point 
Solved Threads: 3
mom_of_3's Avatar
mom_of_3 mom_of_3 is offline Offline
Newbie Poster

Re: How do I pass a link (webpage) through url?

 
0
  #7
May 1st, 2008
maybe..

<a href="mypage.php?id=2442" target="_self">Click</a>
on the page

  1. $page = $_GET['id'];
  2.  
  3. if($page = 2442) {
  4. include('news5.html');
  5. }
Last edited by peter_budo; May 1st, 2008 at 1:17 pm. Reason: Keep It Organized - please use [code] tags
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 5
Reputation: fanaticweb is an unknown quantity at this point 
Solved Threads: 1
fanaticweb fanaticweb is offline Offline
Newbie Poster

Re: How do I pass a link (webpage) through url?

 
0
  #8
May 1st, 2008
newbee approach:

<iframe src="http://www.domain.com" frameborder="0" scrolling="auto"></iframe>
Last edited by peter_budo; May 3rd, 2008 at 7:51 pm. Reason: Keep It Organized - please use [code] tags
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC