Jump to content

luke777

Members
  • Posts

    101
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

luke777's Achievements

Member

Member (2/5)

0

Reputation

  1. I now have old.php reading from new.php and createpage.php working also thanks very much! I had to add rewritebase /~wilson because i was running off an ip address this was the problem !
  2. Yes I am using old.php and new.php they are real files in /public_html/ old.php contains <?php echo 'old'; ?> and new.php contains <?php echo 'new'; ?> I just tried the htaccess code for /banners also and got redirected to 404 when I typed mysite.com/banners/any-name into browser : / And of course createpage.php is in place to echo 'createpage' but i see only a 404 error still :|
  3. hey requinix, i just stuck [R] without the L it didnt work with the L aswell. And Im getting a redirect that works. I spoke to hostgator support couldnt give me much info other than 'they dont support scripting errors' Im sure its just an issue with their hosting. I setup 2 free hosting account and it worked on them. So Im just going to have to change host i dont think there is any other solution is there? I need it to run without the address bar changing obviously just old.php to new with no change in url
  4. The strangest thing is that when I remove the htaccess code new.php or old.php appears fine. new.php contains "new" old.php contains "old" so the htaccess must be doing something...Just giving me hostgator 404 error page for some reason when the htaccess code is in place though - i realise the code above is ftp logs, cpanel contains access logs but says nothing about a 404 for the new.php doesnt even log it at all while there is other logs there.
  5. 183.88.244.104 223 /home/lwilson9/public_html/.htaccess a _ o r lwilson9 ftp 1 * c Wed Dec 19 12:54:27 2012 0 183.88.244.104 218 /home/lwilson9/public_html/.htaccess a _ i r lwilson9 ftp 1 * c Wed Dec 19 12:54:50 2012 0 183.88.244.104 226 /home/lwilson9/public_html/.htaccess a _ o r lwilson9 ftp 1 * c Wed Dec 19 12:55:09 2012 0 183.88.244.104 219 /home/lwilson9/public_html/.htaccess a _ i r lwilson9 ftp 1 * c Wed Dec 19 13:00:27 2012 0 183.88.244.61 222 /home/lwilson9/public_html/.htaccess a _ i r lwilson9 ftp 1 * c I just got this can you make head or tail of it? I logged onto cpanel to check access logs there too but couldnt find any, these are from ftp not sure if relevant yes new.php is 100% in place, i really dont get this..
  6. Hi requinix, thanks for for this my .htaccess definatly now reads RewriteEngine On RewriteRule ^/?old\.php$ new.php [L] and I also have new.php and old.php yet with this code im recieving a 404 error when i type /old.php and this htaccess code is implemented. I just cant get past this stage could you please check the code mabe its something to do with my account hostgator im not sure
  7. Hey, I'm having difficulty getting my htaccess working. I havnt dealt with apache for such a long time a forgot how much I sucked at it. RewriteEngine On RewriteRule ^old.php$ ^new.php [R,NC,L] This is my first step which I cant seem to get working, i've tried several variations : / I'm not sure if its my hosting or what (I'm with hostgator) Obviously the above should read new.php when user types mywebsite.com/old.php but url should stay the same which would be great. But that doesn't work for me : / So this is embarrasing, very short code and I'm getting nowhere but what am I doing wrong? I ultimatly want to make any requests in /banners/example-user-type for the request to be resent to /banners/createpage.php but url should stay the same as the user typed the first time. Any help goes without saying, you'll be a legend. More stuck than ive been in a long while with this
  8. Hi there, Can anyone show me how I can grab the value "c87cc576092fe1a0f5ac3d50091694b4" out of this string, it changes. Also its coming from a socket a $buffer variable, so How can I do this without grabbing everything else aswell, ie all the data after it too If someone could show me how to do this, I think you can do it with the split function, i just dont know how. if someone could show. i'd be SO greatful
  9. Like I said too smart. Thank you all VERY much. especially anups
  10. I'm ok with PHP but probably not half as good as some of you guys on here. I am basically trying to find a way to grab a line from a huge and I mean huge text file.... its basically a list of keywords I want to call by line number but without preferably going through them all before I get to that line.....otherwise couldmcrash my server obviously. At the moment im using this $lines = file('http://www.mysite.com/keywords.txt'); // Loop through our array, show HTML source as HTML source; and line numbers too. foreach ($lines as $line_num => $line) { echo "$line_num"; } This works but im sure theres gotta be a better way of doing to save on usuage because this is putting the whole file into the memory and if I can simply say to php give me line number 97, would umm RULE.... Hope you guys can come up with a solution as your much smarter than me ty
  11. JAVASCRIPT CODER WANTED I hope this is the right place to post, couldnt find anywhere else basically....I do code but not in javascript so need some help with this.. A page in javascript that will work by automatically clicking a link on an external site. The link will be on an external site to the one im actually putting the user onto so this will have to be done through an iframe and the click will be made on the external site by javascript by seeing the hyperlinks anchor text. PM me for more detailed desc, will pay instantly via paypal - once the job is done. Please only well spoken english. No offence... fed up of explaining again and again Look forward to hearing from somone. Luke
  12. i tried this already, and you know what it does in firefox..... prompts a download on every html page....."save as" i dont want to save it i want to view it normally with php orking inside it
  13. so you gotta do 2 pageviews before i can update the user with how many days left? thats rediculous... there must b a way!
  14. right basically... what i want to do is give a user a cookie (the date 1 - 30) and at the top right of the page will say "SALE NOW ON - 6 DAYS LEFT" then the next day the formula is $date - $cookie = $timeleft ie. they come back one day later and theres "...5 DAYS LEFT" heres what iv tried.... <?php $date = date("d"); $cookie = $_COOKIE["user"]; if ($cookie!="") { $new = $date - $cookie; $expire=time()+60*60*24*6; setcookie("user", "$date", $expire); } else { $new = "22"; } echo $cookie."<br>"; echo "cookie: ".$cookie; echo "<br>sent: $new"; ?> this is me just trying to sort the cookie out, is there any easy way of doing this? i thought it would be pretty smart to make each customer think theres an expiring sale on BUT i suck at php... and even the above isnt doin what i thought it would :'(
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.