|
-
Feb 21st, 2002, 03:31 AM
#1
Thread Starter
Hyperactive Member
Need help with php
im trying to get this asp scritp from brainjar.com to php because my server is linux and only supports php and cgi can some one conver this into php for me please??? ill add thanks or like to you site for your help
[Cookie]
<% 'Set scheme cookie.
Response.Buffer = true
if Request.QueryString("scheme") <> "" then
Response.Cookies("scheme") = Request.QueryString("scheme")
Response.Cookies("scheme").Expires = _
FormatDateTime(DateAdd("d", 60, Now()))
else
Response.Cookies("scheme").Expires = _
FormatDateTime(DateAdd("d", -1, Now()))
end if
'Send back to referring page.
Response.Redirect(Request.ServerVariables("HTTP_REFERER")) %>
[/Cookie]
[Include Style Sheet[
<link href="/common/main.css" rel="stylesheet" type="text/css">
<% if Request.Cookies("scheme") <> "" then %>
<link href="/common//main.css"
rel="stylesheet" type="text/css">
<% end if %>
[/Include Style Sheet]
Please thank for your help
-
Feb 21st, 2002, 12:41 PM
#2
Member
Working on it.
But give me 6 hrs from posting this, since I have other work at office too.
Will let u know of course.
And if you can give me access to your remote server so that I can actually run it (right now I am just going to translate the syntax) then I can check it up too.
Thanks.
-
Feb 21st, 2002, 01:58 PM
#3
Thread Starter
Hyperactive Member
hmm you want access to my server?
-
Feb 21st, 2002, 04:41 PM
#4
PowerPoster
somewhere i saw a utility that would convert ASP to PHP. i can't remember what it is called though. I'll look
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
-
Feb 21st, 2002, 05:55 PM
#5
Thread Starter
Hyperactive Member
ya its called asp2php i tryed it...It didnt work
-
Feb 21st, 2002, 09:36 PM
#6
Member
<?php
if ($scheme <> '')
{
setcookie ('scheme', $scheme,time()+3600);
}
else
{
setcookie ('scheme', '',time()-3600);
}
header('location:'.$HTTP_REFERER);
exit;
?>
Now where is the Stylesheet code to go? In another page I suppose, since you are already redirecting the user to the refering page from here.
Here is code to include the ss:
<?php
if ($scheme <> '')
{
?>
<link href="/common//main.css"
rel="stylesheet" type="text/css">
<?php
}
?>
question: why the // before main.css (typo?)
note that u do not have to do anything special to use the cookie var: once set, it is available as a global var like other script wide variables. So access it simply by typing $scheme.
HTH. If there's a syntactical error, though I 've tried to be accurate, it might cropus sinceI am writing this code from memory without executing it(wihich is why i wanted access to your server from my office!). Get back and I'll set it right in case of errors.
Thanks
-
Feb 21st, 2002, 09:39 PM
#7
Member
BTW
Where *are* you using this code? If you like, here's a humble request to put my site link on your site:
<humblerequest>
Please put my website's link on your site.
Lyra Computing
</humblerequest>
-
Feb 21st, 2002, 11:47 PM
#8
Thread Starter
Hyperactive Member
-
Feb 22nd, 2002, 12:00 AM
#9
Thread Starter
Hyperactive Member
Do you have icq or something that we can talk on ?
-
Feb 22nd, 2002, 02:44 PM
#10
Thread Starter
Hyperactive Member
The code didnt work i dont think i gave all the code my bad
here is the link for the script
http://www.brainjar.com/asp/schemes/
Thanks for helping me
-
Feb 22nd, 2002, 02:57 PM
#11
Member
-
Feb 22nd, 2002, 02:57 PM
#12
Member
ok. looking into it...
what's the error, btw? some syntax problem or functional error?
-
Feb 22nd, 2002, 11:34 PM
#13
Thread Starter
Hyperactive Member
I think it was a functional dont remember i deletesd the scritp
-
Feb 25th, 2002, 02:53 AM
#14
Thread Starter
Hyperactive Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|