I upload the file and I can see the detail(like this url: https://usegalaxy.org/datasets/bbd44e69cb8906b5bfdda35045c40d09/show_params) in usegalaxy.org website
but when I use curl to download it, I got error: "This link may not be followed from within Galaxy"
my php code are:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://usegalaxy.org/datasets/bbd44e69cb8906b5bfdda35045c40d09/show_param");
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_COOKIE, 'galaxysession=bbd44e69cb8906b543889f6ebcb0f23d40822fa0fadc2a10d088a7a073a95f454dba36841fb66580');
curl_setopt($ch, CURLOPT_REFERER, 'https://usegalaxy.org/');
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 5.1; rv:29.0) Gecko/20100101 Firefox/29.0');
$response = curl_exec($ch);
curl_close($ch);
print_r($response);
and the cookie, I will use the latest value
who can tell me the error, and how to fix it?
thanks
yes, because the url: https://usegalaxy.org/datasets/bbd44e69cb8906b5bfdda35045c40d09
can visit without login
and url https://usegalaxy.org/datasets/bbd44e69cb8906b5bfdda35045c40d09/show_param need login can see
Please explain your problem, I can't see it.
first step: I login by email and password using php curl code, and I got the session cookie(i.e:
galaxysession=bbd44e69cb8906b543889f6ebcb0f23d40822fa0fadc2a10d088a7a073a95f454dba36841fb66580
)my issue is how to keep login status to next step(i.e show detail: https://usegalaxy.org/datasets/bbd44e69cb8906b5bfdda35045c40d09/show_param)
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, ' https://usegalaxy.org/datasets/bbd44e69cb8906b5bfdda35045c40d09/show_param');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_COOKIE, 'galaxysession=bbd44e69cb8906b543889f6ebcb0f23d40822fa0fadc2a10d088a7a073a95f454dba36841fb66580');
curl_setopt($ch, CURLOPT_REFERER, 'https://usegalaxy.org/');
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
curl_close($ch);
var_dump($response);
I got: string(49) "This link may not be followed from within Galaxy."
Can you help me?
Thanks, I will try to have a look at the api of galaxy.
If the API is what you were looking for, please mark my post about it above as an accepted answer -- this helps us know when a problem is resolved and makes it easier for others with similar issues to find correct answers in the future.