English Is there permanent URL for downloads?

7 replies
Goto Page
To the start Previous 1 Next To the start
Up
rafaelff1
User
Offline Off
Hi there.

I'm packaging CS2D to Archlinux (here) but I'm having issues with the files' URLs, as they relies on 'cid' that changes for each connection that access the download page. See cid "101010101010" (fake) in this example:

http://www.unrealsoftware.de/get.php?get=cs2d_0120_linux.zip&p=1&cid=101010101010

My problem is that everytime an Arch user install the package, the package script automatically will download source files from Unreal... but will get wrong session, with wrong 'cid'.

Is there a permanent URL or something that I could put in the package and don't worry with the 'cid' ?

Thanks in advance
09.05.12 08:14:25 am
Up
kemine
User
Offline Off
Easy.

Simply host your own server and use this php script:

Code:
1
2
3
4
5
6
7
8
<?php
function get($a,$b,$c){
     $y = explode($b,$a);
     $x = explode($c,$y[1]);
     return $x[0];
}
header("Location: http://www.unrealsoftware.de/".html_entity_decode(get(file_get_contents("http://www.unrealsoftware.de/get.php?get=cs2d_0120_linux.zip"),'<a class="l_dl" href="','">Download</a>')));
?>


Now when you go to this page it will automatically redirect you to the cs2d 0.1.2.0 linux archive.
09.05.12 11:57:09 am
Up
DC
Admin
Offline Off
@user kemine:
This doesn't solve the cid issue he has. He wants to download directly without being redirected to another page.

@user rafaelff1:
No, this doesn't work. The CID (client id) is a security protection against hot linking. I don't want other sites to steal my traffic without showing unrealsoftware.de

Only a few files (like the CS2D dedicated server) can be downloaded directly. Sorry.
09.05.12 02:14:48 pm
Up
rafaelff1
User
Offline Off
user DC has written:
@user kemine:
This doesn't solve the cid issue he has. He wants to download directly without being redirected to another page.

@user rafaelff1:
No, this doesn't work. The CID (client id) is a security protection against hot linking. I don't want other sites to steal my traffic without showing unrealsoftware.de

Only a few files (like the CS2D dedicated server) can be downloaded directly. Sorry.


Quite disappointing, as this doesn't help me at all to provide packages of games from Unreal Software to my linux distribution, but thanks anyway. I got some shell scripting to work around this issue.
09.05.12 04:00:44 pm
Up
kemine
User
Offline Off
Actually I've tested it with wget and it works fine.

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
root:~$ wget localhost
--08:57:16--  http://localhost/
           => `index.html'
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://www.unrealsoftware.de/get.php?get=cs2d_0120_linux.zip&p=1&cid=1
2396057845 [following]
--08:57:17--  http://www.unrealsoftware.de/get.php?get=cs2d_0120_linux.zip&p=1&c
id=12396057845
           => `get.php@get=cs2d_0120_linux.zip&p=1&cid=12396057845'
Resolving www.unrealsoftware.de... 85.214.102.60
Connecting to www.unrealsoftware.de|85.214.102.60|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 857,948 (838K) [application/octet-stream]

100%[====================================>] 857,948      254.23K/s    ETA 00:00

08:57:21 (210.38 KB/s) - `get.php@get=cs2d_0120_linux.zip&p=1&cid=12396057845' s
aved [857948/857948]
09.05.12 04:16:33 pm
Up
DC
Admin
Offline Off
@user kemine: You still didn't get the problem. The client ID is different for each IP. It's a hot linking protection...

Your link http://www.unrealsoftware.de/get.php?get=cs2d_0120_linux.zip&p=1&cid=12396057845 doesn't start the download for me for example because I would have to use another cid.
09.05.12 05:36:05 pm
Up
kemine
User
Offline Off
Then simply use php as a proxy, download it on the local machine and allow it to be cached to prevent dos to the us server.
12.05.12 03:17:39 pm
Up
Qrchack
GAME BANNED
Offline Off
Or you can simply make a mirror on other FTP server
To the start Previous 1 Next To the start