Jump to content

$_GET


ajicles

Recommended Posts

I am seen people have dynamic pages that loads the information from a database and then displays that information from the url. EG domain.com/somedirectory/something I have a website that does this but uses domain.com/something.php?id=something . This works great but when I go to try and get the statistics for that page from facebook for number of people that have liked that page.

 

When I go to: http://graph.facebook.com/http://likebook.cz.cc/ It shows me the information:

{
   "id": "**************",
   "name": "LikeBook",
   "picture": "http://profile.ak.fbcdn.net/hprofile-ak-snc4/hs178.ash2/41817_130259343675613_3465_s.jpg",
   "link": "http://www.facebook.com/pages/LikeBook/130259343675613",
   "category": "Website",
   "description": "Collect every like at LikeBook.cz.cc",
   "fan_count": 3
}

 

But when I try and go to: http://graph.facebook.com/http://likebook.cz.cc/like.php?id=31 It shows me:

 

{
   "id": "http://likebook.cz.cc/like.php"
}

 

So what I need to do is. Make a dynamic page within that sub directory.

 

So that http://likebook.cz.cc/like/31 does grabs the information from line 31 of my database, like http://likebook.cz.cc/like.php?id=31 would do.

 

Thank you

~AJ

Link to comment
https://forums.phpfreaks.com/topic/211467-_get/
Share on other sites

I believe I would have to write a script for apache. Some 404 pages display what you were trying to look for on the page. I just want to know how that works.

 

Also I found a website that says I could use CGI to load dynamic content. I haven't coded CGI and don't know how to script something like this up.

 

I host my website on a free web hosting and to enable CGI I used .htaccess

Options +ExecCGI
AddHandler cgi-script cgi pl 

 

If someone could help me that would be greatly appreciated.

 

~AJ

Link to comment
https://forums.phpfreaks.com/topic/211467-_get/#findComment-1102850
Share on other sites

Don't make a noob over think lol. I have tried this:

Redirect 301 / index.php

 

And it doesn't redirect it to index.php

 

Within the index.php I will just get the referrer then get rid of anything I don't want and then do the sql queries etc.. Error trap it so people can't injection attack and wont accept letters.

 

Its not simple I googled it I got this: httpd.apache.org/docs/2.0/mod/mod_rewrite.html and I don't see anything I need.

Link to comment
https://forums.phpfreaks.com/topic/211467-_get/#findComment-1102894
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.