Jump to content

$_GET?


Graxeon

Recommended Posts

I think has to do with http headers. How can I request http header information with PHP?

 

 

 

@coupe:

 

but that's only if the request was sent on the current page.

 

My page is "mysite.com/display.php". And what "display.php" is supposed to do is what I described in my first post. So that wouldn't necessarily work.

Link to comment
https://forums.phpfreaks.com/topic/215093-_get/#findComment-1118758
Share on other sites

where do you want to echo this at?

 

Do you want to just take the user to

 

site.com/123.php?hp=1

 

only and not the full URL (site.com/user.php?level=site.com/123.php?hp=1)?

 

header('Location: site.com/123.php?hp=1');

 

I guess I'm not sure what you are trying to do or where you want to send them.

Link to comment
https://forums.phpfreaks.com/topic/215093-_get/#findComment-1118759
Share on other sites

I have "mysite.com/display.php"

 

That file goes to this URL: site.com/user/redirect

Since that URL redirects to "site.com/user.php?level=site.com/123.php?hp=1"...I want "display.php" to only redirect to "site.com/123.php?=1"

 

**Note that display.php and the redirecting URL are on different hosts/servers (hence why $_GET doesn't seem the way to go for me)

 

 

edit:

 

if I'm not explaining it too well, can you at least tell me how I can request HTTP Header information from any website like this page does: http://www.softswot.com/http-header.php?#viewer

(type in any URL that redirects in the box first then click Send Request). I'd like the "Location" info echoed.

 

That, or how can I parse the URL so that it gives me the URL once it has redirected me?

Link to comment
https://forums.phpfreaks.com/topic/215093-_get/#findComment-1118761
Share on other sites

Ok, but would you know anything about this?:

 

Go to: http://www.softswot.com/http-header.php?#viewer

Type in this URL and click Send Request: http://tiny.cc/7n0i9lvimd (this redirects you to Google.com)

 

The "http-header.php" will display this info:

 

Received Response
HTTP/1.1 301 Moved Permanently
Server: nginx/0.7.65
Date: Mon, 04 Oct 2010 02:54:43 GMT
Content-Type: text/html
Connection: close
X-Powered-By: PHP/5.3.2
Set-Cookie: session= (alphanumerical data here); expires=Mon, 04-Oct-2010 05:54:43 GMT; path=/; domain=.tiny.cc
Set-Cookie: tycc7n0i9lvimd=1286160883; expires=Thu, 04-Oct-2012 02:54:43 GMT
Location: http://www.google.com

 

How can I do the same thing on my "display.php" file?

 

(or at least just show the "Location" information)

Link to comment
https://forums.phpfreaks.com/topic/215093-_get/#findComment-1118765
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.