can someone help me modifying this script
Moderator: General Moderators
can someone help me modifying this script
Moved by moderator to the appropriate Forum.
hi
i need a help about php script
i want to use link shortening script on my own host i found a good script for doing it too
i already installed and using it
but my problem is this script have ability that you can define tag for your created short url but i am not able to use some characters like _ or . or - and etc
in fact i don not know anything about php
is it possible to add those characters to the script so i would be able to use those characters too while chosing tag for the shortened url ?
plz help me
if needed iwill upload the script too
thanks friends
hi
i need a help about php script
i want to use link shortening script on my own host i found a good script for doing it too
i already installed and using it
but my problem is this script have ability that you can define tag for your created short url but i am not able to use some characters like _ or . or - and etc
in fact i don not know anything about php
is it possible to add those characters to the script so i would be able to use those characters too while chosing tag for the shortened url ?
plz help me
if needed iwill upload the script too
thanks friends
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: can someone help me modifying this script
Yes you will need to post the relevant code.
Re: can someone help me modifying this script
okay thanks
which codes should i put here ?
these are php files of the script
in the root
httaccess
config
contact
create_template
go
install
send
config-mail
create
frame
index.html
maile
and in the folder admin the files are
empty
common
index
login
logout
view
and some images
and in folder css there is a style file
and a folder img with some pics
so which codes should i put here ?
which codes should i put here ?
these are php files of the script
in the root
httaccess
config
contact
create_template
go
install
send
config-mail
create
frame
index.html
maile
and in the folder admin the files are
empty
common
index
login
logout
view
and some images
and in folder css there is a style file
and a folder img with some pics
so which codes should i put here ?
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: can someone help me modifying this script
I have no idea..I'm not familiar with your software. Whatever code generates the link.
..and please do not post a very long code snipplet. It is important to only post relevant code.
..and please do not post a very long code snipplet. It is important to only post relevant code.
Re: can someone help me modifying this script
hi
thanks so i think its better that i add the whole scipt
i thnik the code is defined in the create.php file
thnaks for your help
thanks so i think its better that i add the whole scipt
i thnik the code is defined in the create.php file
thnaks for your help
- Attachments
-
- Short_Url.rar
- (99.66 KiB) Downloaded 3 times
Re: can someone help me modifying this script
No offense, but you do really think any of us has the time to go over all your scripts and give you advice on how to install it? did you try anything it yourself? what problems did you encounter?
If you do not make the minimum effort to solve your problem yourself, how do you expect others to help you in their free time?
If you do not make the minimum effort to solve your problem yourself, how do you expect others to help you in their free time?
Re: can someone help me modifying this script
hi
i did not want that someone goes through the script and modify it for me
i jsu asked what should i do to be able to use some characters like _ or . or - and etc when using tag defining ability of the script
and i said im not good in php
so i taught someone will help me how to add those characters to script so id be able to use them while defining tag for shortened url
thanks
i did not want that someone goes through the script and modify it for me
i jsu asked what should i do to be able to use some characters like _ or . or - and etc when using tag defining ability of the script
and i said im not good in php
so i taught someone will help me how to add those characters to script so id be able to use them while defining tag for shortened url
thanks
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: can someone help me modifying this script
You need to find and post the code responsible for the url generation. Simple as that. We cannot help you modify something we cannot see.
Re: can someone help me modifying this script
thanks
so i think this is the php code need to be modifed as i think
i hope im right
so i think this is the php code need to be modifed as i think
i hope im right
Code: Select all
<?
/************************************************************************
Persian Short Url Free Edition
Copyright(C), PersianScript.ir 2008
************************************************************************/
include("config.php");
if (strstr($_SERVER['HTTP_REFERER'], $root));
else { header ("Location: $rooturl"); }
$ip = $_SERVER['REMOTE_ADDR'];
$url = mysql_real_escape_string($_POST['url']);
if(preg_match('|^http(s)?://[a-z0-9-]+(\.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$|i', $url)) {
if (empty($_POST['tag'])) {
$query = mysql_query("INSERT INTO $table (ip,url) VALUES ('$ip','$url')") or die('MySQL error: '.mysql_error());
$qs = mysql_insert_id();
} else {
if (ereg('^[a-zA-Z0-9]+[a-zA-Z0-9]+$', $_POST['tag'])) {
$tag = mysql_real_escape_string($_POST['tag']);
$query = mysql_query("select * from $table where `tag` = '$tag';") or die('MySQL error: '.mysql_error());
if (mysql_num_rows($query) != 0)
die("??? ?? ??? ???? ???? ??? ???? ???? ??? ???.???? ??????? ? ?? ????? ?? ?????? ????");
else {
$query = mysql_query("insert $table (ip,url,tag) VALUES ('$ip','$url','$tag')") or die('MySQL error: '.mysql_error());
$qs = $tag;
}
} else
die('??? ?? ??? ???? ???? ??? ??? ???? ???.???? ?? ????? ???? ????');
}
$link = $destination . $qs;
require 'create_template.php';
} else
echo ' ?? ???? ???? http:// ????? ?? ???? ???? ??? ??? ???? ??????? ???.?? ?????? ???? ???? ???? ';
?>