Is there permanent URL for downloads?
7 replies
1

09.05.12 02:03:21 am
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
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
Easy.
Simply host your own server and use this php script:
Now when you go to this page it will automatically redirect you to the cs2d 0.1.2.0 linux archive.
Simply host your own server and use this php script:
Code:
1
2
3
4
5
6
7
8
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>')));
?>
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.
@
Rumine:
This doesn't solve the cid issue he has. He wants to download directly without being redirected to another page.
@
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.
Rumine: This doesn't solve the cid issue he has. He wants to download directly without being redirected to another page.
@
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.
DC has written:@
Rumine:
This doesn't solve the cid issue he has. He wants to download directly without being redirected to another page.
@
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.
Rumine: This doesn't solve the cid issue he has. He wants to download directly without being redirected to another page.
@
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.
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
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]
--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]
@
Rumine: 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.
Rumine: 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.
Then simply use php as a proxy, download it on the local machine and allow it to be cached to prevent dos to the
server.
server.
1








Is there permanent URL for downloads?

