Current location: Hot Scripts Forums » Programming Languages » PHP » How to pass server response to Perticuler/Unique client javascript using php


How to pass server response to Perticuler/Unique client javascript using php

Reply
  #1 (permalink)  
Old 03-24-07, 03:08 PM
method method is offline
Wannabe Coder
 
Join Date: Jul 2006
Posts: 228
Thanks: 0
Thanked 0 Times in 0 Posts
Arrow How to pass server response to Perticuler/Unique client javascript using php

Hi all .could any one show me how i can pass server response to perticuler unique client javascript
without using ajax.Suppose i have their ip.I am looking for most effect way to achive this task.I want to know
how to indentify the user corectly and send that responde to his javascript page.
Looking forward for response.
Thanks
Reply With Quote
  #2 (permalink)  
Old 03-25-07, 06:02 AM
job0107's Avatar
job0107 job0107 is offline
Community Liaison
 
Join Date: Dec 2006
Location: Tacoma, Washington USA
Posts: 3,454
Thanks: 0
Thanked 140 Times in 137 Posts
Here are most of the server responses from PHP inserted into javascript:
javascript Code:
  1. <SCRIPT>
  2. var js_http_accept = "<?php echo($_SERVER[HTTP_ACCEPT]) ?>";
  3. var js_http_accept_language = "<?php echjo($_SERVER[HTTP_ACCEPT_LANGUAGE]) ?>";
  4. var js_http_accept_encoding = "<?php echo($_SERVER[HTTP_ACCEPT_ENCODING]) ?>";
  5. var js_http_user_agent = "<?php echo($_SERVER[HTTP_USER_AGENT]) ?>";
  6. var js_http_host = "<?php echo($_SERVER[HTTP_HOST]) ?>";
  7. var js_http_connection = "<?php echo($_SERVER[HTTP_CONNECTION]) ?>";
  8. var js_comspec = "<?php echo($_SERVER[COMSPEC]) ?>";
  9. var js_pathext = "<?php echo($_SERVER[PATHEXT]) ?>";
  10. var js_windir = "<?php echo($_SERVER[WINDIR]) ?>";
  11. var js_server_software = "<?php echo($_SERVER[SERVER_SOFTWARE]) ?>";
  12. var js_server_name = "<?php echo($_SERVER[SERVER_NAME]) ?>";
  13. var js_server_addr = "<?php echo($_SERVER[SERVER_ADDR]) ?>";
  14. var js_server_port = "<?php echo($_SERVER[SERVER_PORT]) ?>";
  15. var js_remote_host = "<?php echo($_SERVER[REMOTE_HOST]) ?>";
  16. var js_remote_addr = "<?php echo($_SERVER[REMOTE_ADDR]) ?>";
  17. var js_document_root = "<?php echo($_SERVER[DOCUMENT_ROOT]) ?>";
  18. var js_server_admin = "<?php echo($_SERVER[SERVER_ADMIN]) ?>";
  19. var js_script_filename = "<?php echo($_SERVER[SCRIPT_FILENAME]) ?>";
  20. var js_remote_port = "<?php echo($_SERVER[REMOTE_PORT]) ?>";
  21. var js_gateway_interface = "<?php echo($_SERVER[GATEWAY_INTERFACE]) ?>";
  22. var js_server_protocol = "<?php echo($_SERVER[SERVER_PROTOCOL]) ?>";
  23. var js_request_method = "<?php echo($_SERVER[REQUEST_METHOD]) ?>";
  24. var js_request_uri = "<?php echo($_SERVER[REQUEST_URI]) ?>";
  25. var js_script_name = "<?php echo($_SERVER[SCRIPT_NAME]) ?>";
  26. var js_php_self = "<?php echo($_SERVER[PHP_SELF]) ?>";
  27. var js_request_time = "<?php echo($_SERVER[REQUEST_TIME]) ?>";
  28.  
  29.  
  30. document.write(js_http_accept);
  31. document.write('<br>' + js_http_accept_language);
  32. document.write('<br>' + js_http_accept_encoding);
  33. document.write('<br>' + js_http_user_agent);
  34. document.write('<br>' + js_http_host);
  35. document.write('<br>' + js_http_connection);
  36. document.write('<br>' + js_comspec);
  37. document.write('<br>' + js_pathext);
  38. document.write('<br>' + js_windir);
  39. document.write('<br>' + js_server_software);
  40. document.write('<br>' + js_server_name);
  41. document.write('<br>' + js_server_addr);
  42. document.write('<br>' + js_server_port);
  43. document.write('<br>' + js_remote_host);
  44. document.write('<br>' + js_remote_addr);
  45. document.write('<br>' + js_document_root);
  46. document.write('<br>' + js_server_admin);
  47. document.write('<br>' + js_script_filename);
  48. document.write('<br>' + js_remote_port);
  49. document.write('<br>' + js_gateway_interface);
  50. document.write('<br>' + js_server_protocol);
  51. document.write('<br>' + js_request_method);
  52. document.write('<br>' + js_request_uri);
  53. document.write('<br>' + js_script_name);
  54. document.write('<br>' + js_php_self);
  55. document.write('<br>' + js_request_time);
  56. </SCRIPT>
__________________
Jerry Broughton

Last edited by UnrealEd; 03-25-07 at 02:53 PM.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
execute php into javascript function Hagoromo PHP 3 05-23-07 02:19 AM
soccet client server gagarin_uri C/C++ 1 11-15-06 04:09 PM
move files around an ftp server, with php file upload script? wapchimp PHP 2 12-19-04 07:27 AM
php/apacher server displaying php code doctork1 PHP 2 12-15-04 12:10 PM
Please Help ! sweetgurl Everything Java 2 04-13-04 11:57 AM


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