Digital Point Forums
Send Money Online

Go Back   Digital Point Forums > Design & Development > Programming > PHP
Google Analytics
Log In to view
your analytics

Reply
 
Thread Tools
  #1  
Old Feb 29th 2008, 4:03 pm
fotrino's Avatar
fotrino fotrino is offline
Hand of A'dal
 
Join Date: Sep 2007
Location: Argentina
Posts: 284
fotrino is on a distinguished road
Question Get previous page URL!

I've a problem and maybe you can help me.
Lets say im on Page1 (its any random page. not mine so i cant modify it) and I've in the bookmarks Page2 (which is actually the page i created) .... There is anyway that when I click on the bookmarks I can display in a submit Form the Page1 URL ?

Thank you.
Facuz
Reply With Quote
  #2  
Old Feb 29th 2008, 6:19 pm
RoscoeT's Avatar
RoscoeT RoscoeT is offline
Grunt
 
Join Date: Jan 2008
Posts: 64
RoscoeT is on a distinguished road
I don't think so. If I understand what you are asking that would be a security problem in the browser side.

I might not understand your question though, can you explain it a bit better?
Reply With Quote
  #3  
Old Feb 29th 2008, 6:30 pm
fotrino's Avatar
fotrino fotrino is offline
Hand of A'dal
 
Join Date: Sep 2007
Location: Argentina
Posts: 284
fotrino is on a distinguished road
Lets say Im on PAGE1 (which is any page, like google, ebay, etc .. in my case for myspace bulletins) ...
And you have bookmarked PAGE2 which is actually the page im creating and i want to display in a submit form the page where i used to be which was PAGE1.
Whats the point of this ... that this submit form then will shorten the url till the point i need it for myspace bulletins.

I could copy and paste the url in the submit form but i want that it autotake it from the last url i was to make the process faster.

Thanks.
Facuz
Reply With Quote
  #4  
Old Feb 29th 2008, 7:48 pm
azizny's Avatar
azizny azizny is offline
Starcaller
 
Join Date: Jul 2006
Location: USA
Posts: 2,607
azizny is a jewel in the roughazizny is a jewel in the roughazizny is a jewel in the roughazizny is a jewel in the rough
Use referral server variable:

$_SERVER['referral']

Peace,
__________________
Testing 1.. Testing 1..2.. Testing 1..2..3..
Reply With Quote
  #5  
Old Feb 29th 2008, 8:02 pm
Wuiqed's Avatar
Wuiqed Wuiqed is offline
Champion of the Naaru
 
Join Date: Feb 2008
Location: Sweden
Posts: 110
Wuiqed is on a distinguished road
Quote:
Originally Posted by azizny View Post
Use referral server variable:

$_SERVER['referral']

Peace,
It's $_SERVER['HTTP_REFERER'].

But it won't work, seeing as a bookmark isn't a referer. Sorry fotrino, as far as I know what you want isn't possible.
Reply With Quote
  #6  
Old Feb 29th 2008, 8:25 pm
jnestor jnestor is offline
Champion of the Naaru
 
Join Date: Jun 2006
Posts: 133
jnestor is on a distinguished road
Do you control the bookmark? In other words are you giving out the bookmark or using it for your own personal use? If so you can create a bookmarklet written in javascript that will get the current url and pass it to your page.

In general though you can get the referrer (sometimes) if the user clicks through on a link to your page but if the user follows a bookmark or types in the url of your page you won't get any information about their previous page.
__________________
MySpace Scripts - M2Scripts - for your MySpace support site
RCMS-Pro - php arcade script
Reply With Quote
  #7  
Old Feb 29th 2008, 8:35 pm
fotrino's Avatar
fotrino fotrino is offline
Hand of A'dal
 
Join Date: Sep 2007
Location: Argentina
Posts: 284
fotrino is on a distinguished road
Quote:
Originally Posted by jnestor View Post
Do you control the bookmark? In other words are you giving out the bookmark or using it for your own personal use? If so you can create a bookmarklet written in javascript that will get the current url and pass it to your page.

In general though you can get the referrer (sometimes) if the user clicks through on a link to your page but if the user follows a bookmark or types in the url of your page you won't get any information about their previous page.
Yes its for personal use.
and basically for saving me the trouble of copy and paste everytime i want to put the url i was in the new one.
So can u help me out with that java script please?
I'd like to get the url from page one and put it in a form on page 2 or just to make it more easy to include that gotten url into the php i already have.
Reply With Quote
  #8  
Old Feb 29th 2008, 9:21 pm
jnestor jnestor is offline
Champion of the Naaru
 
Join Date: Jun 2006
Posts: 133
jnestor is on a distinguished road
This should do it though I haven't tested it.

javascript:location.href='http://example.com/whatever.php?url='+escape(location.href)
__________________
MySpace Scripts - M2Scripts - for your MySpace support site
RCMS-Pro - php arcade script
Reply With Quote
  #9  
Old Mar 1st 2008, 6:01 am
fotrino's Avatar
fotrino fotrino is offline
Hand of A'dal
 
Join Date: Sep 2007
Location: Argentina
Posts: 284
fotrino is on a distinguished road
Quote:
Originally Posted by jnestor View Post
This should do it though I haven't tested it.

javascript:location.href='http://example.com/whatever.php?url='+escape(location.href)
Thanks for your help.
But this redirects me to certain webpage.
What i'd like is that in a INPUT Form the URL where i was (page1) would be displayed ...
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
previous page rank everythingisplanned All Other Tools 3 Jan 16th 2008 8:13 am
Previous URL Rewrites (with mod_rewrite) have failed, Please Help LittlBUGer Apache 10 Jun 28th 2007 9:02 pm
Back to previous page Iain PHP 2 Oct 6th 2006 5:25 am
How to reload the previous page? khwab JavaScript 1 Aug 22nd 2006 6:25 am
How do I find the URL of the previous page? Weirfire PHP 23 Jun 22nd 2005 1:44 pm


All times are GMT -8. The time now is 8:00 am.