Jump to content

[SOLVED] How to make a variable equal the address bar.


czukoman20

Recommended Posts

See. thats what i got confused about before..

here

the code comes out wierd. if you just go to the link at the bottom. Then you will see what is in the code box better

 Array ( [HTTP_HOST] => zukodesign.com [HTTP_USER_AGENT] => Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5 [HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 [HTTP_ACCEPT_LANGUAGE] => en-us,en;q=0.5 [HTTP_ACCEPT_ENCODING] => gzip,deflate [HTTP_ACCEPT_CHARSET] => ISO-8859-1,utf-8;q=0.7,*;q=0.7 [HTTP_KEEP_ALIVE] => 300 [HTTP_CONNECTION] => keep-alive [HTTP_REFERER] => http://zukodesign.com/fl-studio.php [HTTP_COOKIE] => PHPSESSID=133aec482283bdb54f482a6015b3e724; __utma=47647532.2123832240.1233461987.1233461987.1233461987.1; __utmz=47647532.1233461988.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); CP=null*; rsi_ct=2009_1_31:1; rsi_segs=; __utmc=47647532 [HTTP_CACHE_CONTROL] => max-age=0 [PATH] => /bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin [sERVER_SIGNATURE] =>
Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8b mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.6 Server at zukodesign.com Port 80
[sERVER_SOFTWARE] => Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8b mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.6 [sERVER_NAME] => zukodesign.com [sERVER_ADDR] => 97.65.128.24 [sERVER_PORT] => 80 [REMOTE_ADDR] => 63.250.232.43 [DOCUMENT_ROOT] => /home/zuko/public_html [sERVER_ADMIN] => [email protected] [sCRIPT_FILENAME] => /home/zuko/public_html/FL_vidtutplayer.php [REMOTE_PORT] => 51904 [GATEWAY_INTERFACE] => CGI/1.1 [sERVER_PROTOCOL] => HTTP/1.1 [REQUEST_METHOD] => GET [QUERY_STRING] => vid=BEk4MMS0ZBQ&wid=425&ht=344&desc=How+to+use+the+vocoder+in+FL-Studio&link=WarBeats.com [REQUEST_URI] => /FL_vidtutplayer.php?vid=BEk4MMS0ZBQ&wid=425&ht=344&desc=How+to+use+the+vocoder+in+FL-Studio&link=WarBeats.com [sCRIPT_NAME] => /FL_vidtutplayer.php [php_SELF] => /FL_vidtutplayer.php [REQUEST_TIME] => 1233541856 [argv] => Array ( [0] => vid=BEk4MMS0ZBQ&wid=425&ht=344&desc=How [1] => to [2] => use [3] => the [4] => vocoder [5] => in [6] => FL-Studio&link=WarBeats.com ) [argc] => 7 ) WarBeats.com How to use the vocoder in FL-Studio. 

 

Thats what i got.. when my url is.

http://zukodesign.com/FL_vidtutplayer.php?vid=BEk4MMS0ZBQ&wid=425&ht=344&desc=How+to+use+the+vocoder+in+FL-Studio&link=WarBeats.com

try this:

$path = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];

then use $path in your script

 

This will not work.. Because php_self stops after .php leaving the ? and rest out.

 

$path = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].$_SERVER['REQUEST_URI'];

This will not work.. Because php_self stops after .php leaving the ? and rest out.

 

$path = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].$_SERVER['REQUEST_URI'];

 

Yep, that is what i wanted, but i caught that and added the REQUEST_URL into it, and it worked fine.. all i needed to know is how to use those different areas and send it to a variable.. Thanks a ton guys

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.