Created
July 30, 2017 18:14
-
-
Save battis/c81610134e287dfcce21ff8963964e41 to your computer and use it in GitHub Desktop.
Linking to a Cell in a Google Spreadsheet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$url = $_REQUEST["url"]; | |
$key = $_REQUEST["key"]; | |
$anchor = $_REQUEST["anchor"]; | |
$html = file_get_contents($url); | |
$output = str_replace($key, "<a name="$anchor"></a>$key", $html); | |
$output = str_replace("href='/", "href='https://docs.google.com/", $output); | |
header("Content-Type: text/html"); | |
echo $output; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment