Current location: Hot Scripts Forums » Programming Languages » PHP » $_SERVER['HTTP_HOST'] from referer - And Sockets..


$_SERVER['HTTP_HOST'] from referer - And Sockets..

Reply
  #1 (permalink)  
Old 10-03-04, 08:00 AM
Acecool's Avatar
Acecool Acecool is offline
Aspiring Coder
 
Join Date: Nov 2003
Posts: 506
Thanks: 0
Thanked 0 Times in 0 Posts
$_SERVER['HTTP_HOST'] from referer - And Sockets..

Is there a way to get it, example.

I have a script to echo the http_host, another website uses file_get_contents or something, I want it to display the HTTP_HOST for the site that requests it.

Havent seen a way, REMOTE ADDR is the users ip, that doesnt help either..


Another question:
How can you use sockets to view a file from another website?

For example, if you want to get a RSS feed from a site, but http wrappers arent enabled.

Thanks.
__________________
Check Acecoolco.com for PHP Tutorials, and other tuts
If you plan on contacting me, please read this: Legal Terms & Conditions
Reply With Quote
  #2 (permalink)  
Old 10-03-04, 10:40 AM
mikaelf mikaelf is offline
Wannabe Coder
 
Join Date: Jun 2004
Location: php[dot]net
Posts: 198
Thanks: 0
Thanked 0 Times in 0 Posts
Hi, acecool. You can have a look first at your PHP source: main/fopen_wrappers.c. For simplicity, you can check PHP manual: fsockopen to find more info about the problem you're facing right now. Good luck!!
__________________
Useful PHP links:
bugs.php.net - for reporting PHP bugs
pear.php.net - PHP extension and application repository
pecl.php.net - get non standard PHP modules, submit yours
www.phpclasses.org - PHP classes repository
Reply With Quote
  #3 (permalink)  
Old 10-03-04, 11:02 AM
Acecool's Avatar
Acecool Acecool is offline
Aspiring Coder
 
Join Date: Nov 2003
Posts: 506
Thanks: 0
Thanked 0 Times in 0 Posts
Hey, its for sites that dont have the fopen wrappers enabled..

fsocketopen should work or?
Looking into it, thanks.
__________________
Check Acecoolco.com for PHP Tutorials, and other tuts
If you plan on contacting me, please read this: Legal Terms & Conditions
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT -5. The time now is 04:34 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.