Sinisterly
[Script] Download v1.0 - Printable Version

+- Sinisterly (https://sinister.ly)
+-- Forum: Coding (https://sinister.ly/Forum-Coding)
+--- Forum: PHP (https://sinister.ly/Forum-PHP)
+--- Thread: [Script] Download v1.0 (/Thread-Script-Download-v1-0)



[Script] Download v1.0 - H4R0015K - 08-21-2012

Ok So I coded This phpScript Which Will Generate Special Link For The Visitor And Will Give The Download Link Only If The User Gets 5 Visitors From his/her Link..

How To setup :
1) Create a table in mysql With 4 columns witn name id,ip,code,visit in same order.
2) Change the username,password,host,db,table,website,download link with yours in php file.
3) upload it to your host.

PHP Code:
<html><head><title>Download v1.0</title><body> <?php $id=$_GET['id']; $user='username'; $pass='password'; $host='host'; $table='visitors'; $db='download'; $connection=mysql_connect($host,$user,$pass) or die('err1'); mysql_select_db($db) or die('err2'); $code=rand(); $ip=$_SERVER['REMOTE_ADDR']; $add="INSERT INTO $table(code,ip,visit) values('$code','$ip','0')"; mysql_query($add) or die('err3'); echo "<table width='200'><tr><th><p>Your Specail Link</p></th></tr><tr><td><input type='text' size='40' value='yoursite/download.php?id=$code'></td></tr></table>"; if($id!="") { $check=mysql_query("SELECT * FROM $table WHERE code='$id'") or die("err4"); $check2=mysql_fetch_row($check) or die("The Link Is Invalid"); if($check2[1]==$ip){echo"You Have Earned ".$check2[3]." visits"; if ($check2[3]==5){echo"<a href='Download link here'> Here is your Dowload link</a>"; mysql_query("DELETE FROM $table WHERE code='$id'");} else{ $visit=$check2[3] + 1; mysql_query("UPDATE $table SET visit='$visit' WHERE code='$id'"); } } } mysql_close($connection); ?> </body></html>



RE: [Script] Download v1.0 - 1234hotmaster - 09-18-2012

What? Can you explain better please?


RE: [Script] Download v1.0 - seth - 09-18-2012

judging from the code it's a script that allow users to download stuff from the site and it keeps a count of the number of downloads but i don't see an upload nor restrictions on file types allowed or size


RE: [Script] Download v1.0 - Dashing Dave - 09-18-2012

Lol, I didn't get it. & don't know what to do.


RE: [Script] Download v1.0 - H4R0015K - 09-19-2012

(09-18-2012, 10:01 PM)seth Wrote: judging from the code it's a script that allow users to download stuff from the site and it keeps a count of the number of downloads but i don't see an upload nor restrictions on file types allowed or size

the code is not build to upload files...you have to upload file on other place and add that link to the code when user comes to this script page he will get a special link if he manage to get 5 hits to his special link he will get the download link..simpleCool


RE: [Script] Download v1.0 - 1234hotmaster - 09-20-2012

And what is this even used for?...


RE: [Script] Download v1.0 - H4R0015K - 09-20-2012

(09-20-2012, 02:22 AM)1234hotmaster Wrote: And what is this even used for?...

to spread the link or you can say to get traffic


RE: [Script] Download v1.0 - 1234hotmaster - 09-20-2012

Can you give me a example of a site that uses this method?


RE: [Script] Download v1.0 - H4R0015K - 09-20-2012

this type of script are mostly use on site where you have refer your special link to unlock a content...as of now I don't have a site link that uses it...

I first shared this script here
www.blackhatteam.com/f165/download-v1-0-script-79127.html
where it has pretty much nice response

the demo is not working now... I will fix it if I got some time