...

View Full Version : I was given a php code to use for a website with no information on how to apply it.



Technobabble
09-27-2005, 09:08 PM
I have a code that sends users to a different website that is encrypted. I was told that since we build websites, we should know what to do and they don't support webmasters, the just hand out the code.



<?php

$today=getdate();
$shift=$today['mday'];
$b=$shift;
$a="XXXXXXXXX";
$s = $a << $b;
$c = $a >> (32 - $b);
$s = $s | $c;

header('Location: http://frankscarcare.wheelwizard.net?ackid=$s');
?>


a=account number

explaination to go with the code is: Everything is complete on this side. I just need you to add the following code at the appropriate place to get
a connection between your web site and Wheel Wizard.



Thanks for your help

Alex

nikkiH
09-27-2005, 09:31 PM
It goes towards the top of your page code, before any output is written (due to header:location). It will redirect the user to the other site.

felgall
09-27-2005, 09:51 PM
It looks more like it is intended to be a complete page in itself. If you link to that page it will then transfer automatically to the external site.

Technobabble
09-27-2005, 10:35 PM
Thanks for the replies,

however, I still don't understand.



<a href="http://www.frankscarcare.com/ww.php">Click here</a>


and



<?php

$today=getdate();
$shift=$today['mday'];
$b=$shift;
$a="070444596";
$s = $a << $b;
$c = $a >> (32 - $b);
$s = $s | $c;

header('Location: http://frankscarcare.wheelwizard.net?ackid=1274027036');
?>


I have the html in a ww.htm (http://www.frankscarcare.com/ww.htm)
and the php uploaded to ww.php at the same domain. That doesn't work, I am sure its something small that I am leaving out.

Alex

Fou-Lu
09-27-2005, 11:34 PM
Without knowing what this:
http://frankscarcare.wheelwizard.net?ackid=
Is supposed to do on their side, it does make it a little harder.

With that aside, you are using bitwise operations, and your values should be (int) types. You have string data:
$a="070444596";
Which would produce like, -1610612736 or something stupid like that (today being the 27th) on a bitwise left shift. So your first operation is already toasted off.
Simply remove your quotations around that value, and proceed from there. Shouldn't be a problem for you. If you should still have problems, ensure that your getdate() is returning in GMT format instead.

Other than that, this is a complete script, simply modify your $a variable.

Technobabble
09-28-2005, 01:03 PM
Fou-lu, you were correct in your assumption. The code basically turns the link into a secret handshake. However nothing I have done works to get it to link to the site. Untill your post telling me that the ("") didn't belong with the numbers, I couldn't get this thing to do anything. It works now that the ("") are not around the number! :thumbsup:

Thanks all for talking a look at this, its always the little things that bite ya! :D

Fou-Lu
09-28-2005, 03:49 PM
N/P
You should still double check the date parameters on your system as well, to ensure that they are in GMT. If they are not, its a simple fix for you. Chances are you are good though, so I wouldn't be overly concerned.
Glad it worked for you, bitwise can be tricky, when you use string data it will attempt to convert on an ascii level, which obviously you don't want to do. Thats the reason for the interesting bit shifts.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum