Jump to content
MakeWebGames

[site tools] Useful little function: Get_url


DougK

Recommended Posts

Here is a handy little functiont that you can add to global_funcs.

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

This returns the full URL, including the query string. For example, www.criminalexistence.com/index.php?act ... t&topic=11 returns exactly that.

I use this for troubleshooting, logging, and advanced cheat detection in the game I am developing. I'm sure there are some here that could benefit from it as well.

Link to comment
Share on other sites

Re: Useful little function: Get_url

Nope, just put it at the very end of global_func (before the ?> ). For example, I use it for logging cheat attempts. I have a table that tracks the time, user, URL, and posted variables any time someone tries to cheat. I use this in addition to killing the page when a player tries to cheat, for example by changing the userid after losing an attack. This way I can see not just who tries to cheat, but how they try to cheat as well.

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...

Re: Useful little function: Get_url

i need to un cache my pages my game says summit like this

[i have not stolen the name of this site its just an example] E.G:http://www.criminalexistance.com

for every page, so instead of http://www.criminalexistance.com/login.php it will be http://www.criminalexistance.com. Anybody got any ideas? i tried using the code above but it didnt fix my problem and i dnt think it was sposed to but it was wirth a try

Link to comment
Share on other sites

  • 4 months later...

Re: [site tools] Useful little function: Get_url

 

i need to un cache my pages my game says summit like this

[i have not stolen the name of this site its just an example] E.G:http://www.criminalexistance.com

for every page, so instead of http://www.criminalexistance.com/login.php it will be http://www.criminalexistance.com. Anybody got any ideas? i tried using the code above but it didnt fix my problem and i dnt think it was sposed to but it was wirth a try

Do you have an index file in the root of that folder?

Link to comment
Share on other sites

Re: [site tools] Useful little function: Get_url

 

cool little function lol will it work for v2 ..?? :|

It's a universal function that should work in any php app. For v2, you can place it in global_func.php then use it anywhere in the game files you want.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...