Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8023245
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:30:39+00:00 2026-06-04T22:30:39+00:00

I’m currently using this code to generate an hyperlink in an .xls file from

  • 0

I’m currently using this code to generate an hyperlink in an .xls file from an intranet server.

This .xls file is an order I submit by email to one of my supplier.

/* WEBSERVER1 */  
$ORDER=$_GET['ORDER'];
$EZAB=$_GET['EZAB'];
$IP=$_GET['IP'];

$ARRAY = array(
    "ORDER" => $ORDER,
    "EZAB" => $EZAB,
    "IP" => $IP);

$SERIAL=serialize($ARRAY);
$q=base64_encode($SERIAL);
$URL="http://mywebsite/?q=".$q
$EXCELHYPERLINK='=hyperlink("'.$URL.'")';

I want my supplier to click on the link in the .xls file to confirm the order has been processed, instead of replying to the original email.

The intranet server not being accessible from the outside world, the link is pointing on a webserver hosting the following code.

/* WEBSERVER2 */
$q=$_GET['q'];
$SERIAL=base64_decode($q);
$ARRAY=unserialize($SERIAL);
// Do something...

I would rather prefer not to use database.

Do you have any thought on how i can make the content of the “$KEY” not that easy to find out?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T22:30:42+00:00Added an answer on June 4, 2026 at 10:30 pm

    mcrypt allows me to encrypt the data transmitted via GET. (thanks to @dAm2K)

    The base64_encode is not enough to make the encrypted date URL friendly as it include (“+”,”/” and “=” characters) (thanks to @DavidThomas)

    I used str_replace to replace those 3 characters and everything is working fine.

    Here’s the corrected code for the intranet server:

    /* WEBSERVER1 */  
    $ORDER=$_GET['ORDER'];
    $EZAB=$_GET['EZAB'];
    $IP=$_GET['IP'];
    
    $ARRAY = array(
        "ORDER" => $ORDER,
        "EZAB" => $EZAB,
        "IP" => $IP);
    
    $SERIAL=serialize($ARRAY);
    $M=mcrypt_module_open('rijndael-256','','cbc','');
    $KEY=md5("gi7aesawde2zomspgo8guvivmer8oici");
    $IV=md5("dob1depatodop7lipdaig7bebeaion9d");
    mcrypt_generic_init($M,$KEY,$IV);
    $ENCRYPTEDDATA=mcrypt_generic($M,$SERIAL);
    mcrypt_generic_deinit($M);
    mcrypt_module_close($M);
    $q=base64_encode($ENCRYPTEDDATA);
    $q=str_replace(array('+','/','='),array('-','_','.'),$q);
    
    $URL="http://mywebsite/?q=".$q;
    $EXCELHYPERLINK='=hyperlink("'.$URL.'")';
    

    and for the webserver :

    /* WEBSERVER2 */
    $q=$_GET['q'];
    $q=str_replace(array('-','_','.'),array('+','/','='),$q);
    $ENCRYPTEDDATA=base64_decode($q);
    $M=mcrypt_module_open('rijndael-256','','cbc','');
    $KEY=md5("gi7aesawde2zomspgo8guvivmer8oici");
    $IV=md5("dob1depatodop7lipdaig7bebeaion9d");
    mcrypt_generic_init($M,$KEY,$IV);
    $SERIAL=mdecrypt_generic($M,$ENCRYPTEDDATA);
    mcrypt_generic_deinit($M);
    mcrypt_module_close($M);
    $ARRAY=unserialize($SERIAL);
    
    // Do something...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I want use html5's new tag to play a wav file (currently only supported
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I am currently running into a problem where an element is coming back from
Does anyone know how can I replace this 2 symbol below from the string
link Im having trouble converting the html entites into html characters, (&# 8217;) i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.