Skip to content

Instantly share code, notes, and snippets.

Created October 1, 2018 10:06
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Download .crx Chrome Extension file with PHP
if(isset($_POST["url"]) && filter_var($_POST["url"], FILTER_VALIDATE_URL)){
//Get extension id
$pos = strrpos($_POST["url"], '/');
$end = $pos === false ? $_POST["url"] : substr($_POST["url"], $pos + 1);
$id = substr($end, 0, strpos($end, "?"));
$durl = "".$id."%26uc&prodversion=32";
//Simply get!
header("Location: $durl");
<form method="post">
<input type="text" name="url">
<input type="submit" name="submit" value="Download crx!">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment