• Private URL to members profile 1 0 5 1
Currently:  

Author Topic: Private URL to members profile  (Read 147983 times)

0 Members and 1 Guest are viewing this topic.

Offline VonHerzen

  • Newbie
  • *
  • Posts: 42
    • View Profile
Re: Private URL to members profile
« Reply #75 on: July 30, 2008, 05:26:35 PM »

Hi CanonInk! Vielen dank!
Greetings from very sunny Madrid.

It works now perfectly with some modifications:
1.- On the .htaccess file I needed to insert this code before
Code: [Select]
RewriteEngine On.
2.- It works without creating a folder called who.
3.- As I have used who.php version 1.1 I did not do the array test.php file and it works.

Hey, your website is nice! Thank you once again!!    :)

Offline CanonInk

  • Newbie
  • *
  • Posts: 48
    • View Profile
Re: Private URL to members profile
« Reply #76 on: July 30, 2008, 10:20:24 PM »

Hi CanonInk! Vielen dank!
Greetings from very sunny Madrid.

It works now perfectly with some modifications:
1.- On the .htaccess file I needed to insert this code before
Code: [Select]
RewriteEngine On.
2.- It works without creating a folder called who.
3.- As I have used who.php version 1.1 I did not do the array test.php file and it works.

Hey, your website is nice! Thank you once again!!    :)

- You are right with step 1 :thumbup:
- who needs at my server
- this is possible, but is dependent on server (Apache,...)

Thank you very much for the flowers  :lol:

CanonInk

Offline crs

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Re: Private URL to members profile
« Reply #77 on: May 01, 2009, 01:43:28 AM »
Hello

Maybe i click on a User on a page, the following link appears in my browsers url input bar: http://mypage.de/member.php?action=showprofile&user_id=5

Is it possible to show only the private URL in the browsers input-bar?
Im asking for that, because the users didnīt see, that they got a short-url to her own profile and they are using the long links -.-

Thanks for help

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.806
  • I ♥ 4I
    • View Profile
Re: Private URL to members profile
« Reply #78 on: May 29, 2009, 10:05:22 AM »
Da ich Google Friendly URLs installiert habe, habe ich die who.php so abgewandelt:

<?
// Settings
///////////////////////////////////////////

$url "http://www.meineseite.de";
$table "4images_users"//do not edit if you have not changed table prefix 

// Code
///////////////////////////////////////////

include "config.php";
$a_url $_SERVER["REQUEST_URI"];
$i explode("/"$a_url);
$b count($i);
$b $b-1;
$i str_replace(array("%20"), " "$i[$b]);
if ((
$i != "") and ($i != "guest"))
{
	
$db mysql_connect("$db_host""$db_user""$db_password") or die ("Error");
	
	
@
mysql_select_db("$db_name"$db) or die ("DB not found");
	
	
	
$result mysql_query("SELECT user_id FROM `$table` WHERE user_name='$i'");
	
	
	
$row mysql_fetch_array($result);
	
	
	
$id $row['user_id'];
	
	
header("Location: ".$url."/profile".$id.".htm");
}
else
{
header("Location: ".$url."");
}
?>


Das klappt wunderbar. Jetzt wollte ich eine weitere Datei erstellen, namens Image:

image.php
<?
// Settings
///////////////////////////////////////////

$url "http://www.meineseite.de";
$table "4images_images"//do not edit if you have not changed table prefix 

// Code
///////////////////////////////////////////

include "config.php";
$a_url $_SERVER["REQUEST_URI"];
$i explode("/"$a_url);
$b count($i);
$b $b-1;
$i str_replace(array("%20"), " "$i[$b]);
if ((
$i != "") and ($i != "guest"))
{
	
$db mysql_connect("$db_host""$db_user""$db_password") or die ("Error");
	
	
@
mysql_select_db("$db_name"$db) or die ("DB not found");
	
	
	
$result mysql_query("SELECT image_id FROM `$table` WHERE image_name='$i'");
	
	
	
$row mysql_fetch_array($result);
	
	
	
$id $row['image_id'];
	
	
header("Location: ".$url."/video".$id.".htm");
}
else
{
header("Location: ".$url."");
}
?>


Die URL zu dem Bild sieht so aus: image-fggf-3.htm

Aber wie mache ich das, dass er die Image_id und den image_name ausgibt?

Ich habe das so versucht:

<?
// Settings
///////////////////////////////////////////

$url "http://www.anitube.de";
$table "4images_images"//do not edit if you have not changed table prefix 

// Code
///////////////////////////////////////////

include "config.php";
$a_url $_SERVER["REQUEST_URI"];
$i explode("/"$a_url);
$b count($i);
$b $b-1;
$i str_replace(array("%20"), " "$i[$b]);
if ((
$i != "") and ($i != "guest"))
{
	
$db mysql_connect("$db_host""$db_user""$db_password") or die ("Error");
	
	
@
mysql_select_db("$db_name"$db) or die ("DB not found");
	
	
	
$result mysql_query("SELECT image_id FROM `$table` WHERE image_name='$i'");
	
	
	
$resultname mysql_query("SELECT image_name FROM `$table` WHERE image_id='$i'");
	
	
	
$row mysql_fetch_array($result);
	
	
	
$id $row['image_id'];
	
	
	
$name $row['image_name'];
	
	
header("Location: ".$url."/video-".$name."-".$id.".htm");
}
else
{
header("Location: ".$url."");
}
?>


Das scheint aber nicht richtig zu sein, da es dann nun so aufgerufen wird: image--3.htm
Der name zwischen - und - fehlt, dennoch wird es aufgerufen, aber wie klappt das richtig?