0

I have a code and need help. I have a curl call with a bash sign like this

http://example.com.ua/script.php

clients send me data using a script but some send me the bash # which I need to save all the data to my database. When I get $_SERVER I don't see all the data how can get all the data? for example:

I have

http://example.com.ua/script.php#code1234

I need to save:

example.com.ua/script.php#code1234

but I see

example.com.ua/script.php

hakre
  • 193,403
  • 52
  • 435
  • 836
Jim
  • 3
  • 1

1 Answers1

2

PHP does not have access to the location hash, period.

You only have access to querystrings in PHP, and if you need to get the hash, you would have to use javascript to get it, and send it to your PHP script with ajax.

adeneo
  • 312,895
  • 29
  • 395
  • 388
  • Assuming requests can be sent using a form it is possible to use JavaScript to fill a hidden input-field with the information instead of using AJAX, which might seem easier if you're new to web development. – Jakob Pogulis Apr 07 '13 at 19:48
  • @JakobPogulis - Yes, I suppose that would be possible. It does'nt really matter how you send the hash, the point really is that it's not available on the serverside, only on the clientside, and as such would normally require some sort of javascript solution to send it to the server. – adeneo Apr 07 '13 at 19:53
  • I can't use ajax but i ask to everyone to change the url to send to me -- thank – Jim Apr 07 '13 at 23:23