HEllo I've this URL I have to get with PHP

http://www.domain.com/forum/#forum/General-discussions-0.htm

The issue is this isn't a genuine URL, but this the mask produced through the .htaccess.

I have to obtain the visible URL and never the actual path from the file, because I have to compare it with a few PHP variables I've.

Actually the actual path may be like this:

http://domain.com/modules/boonex/forum/index.php

And for the reason that strategy is totally useless for me personally.

How do you obtain the first URL because it is?

You cannot have that from http://www.domain.com/forum/#forum/General-discussions-0.htm. Everything following the fragment (#) isn't even send towards the server, there's not a way to retrieve it save for any postponed update with javascript. All you will get it's http://www.domain.com/forum/ send towards the server, as well as on the onload event of the document you are able to load something along with javascript.

Consider the origin code or it might not have real web addresses whatsoever. The part is perfect for ajax based navigation. It might imply that you will find no real web addresses on that website and when you will find then they must be removed from <a href="someurl"> because they might masked using javascript.

With

file_get_contents(); 

for instance. Neither user nor your server mind about .htaccess It's server proccessing the request who've to assist you to fix address

however php does ignore everything after #, so within this situation you've got no chance to have it without real url

As @Wrikken stated, there's no method of getting url after # fragment