Jump to content

per1os

Newly Registered
  • Posts

    3,095
  • Joined

  • Last visited

About per1os

  • Birthday 01/15/1984

Profile Information

  • Gender
    Female
  • Location
    ur buTT

per1os's Achievements

Member

Member (2/5)

0

Reputation

  1. Your better bet would be to use a place holder and then do a str_replace on the text. As I highly discourage the user of eval. $text = 'Something Your IP Is: %userip% something else'; $text = str_replace('%userip%', $_SERVER['REMOTE_ADDR'], $text); echo $text; Should do the trick.
  2. www. is not any seo friendlier, just an FYI I do not think it makes much difference, other than your URL will always be 4 characters shorter no matter what. If you want to test it and do not know if you have mod_rewrite enabled you can wrap it in an if statement: <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTP_HOST} ^i-stevenage.co.uk RewriteRule ^(.*)$ http://www.i-stevenage.co.uk/$1 [R=permanent,L] </IfModule> This way your site won't break if mod_rewrite is not on. To test if it is working, you just have to goto the non-www version of your site and it should 301 redirect you to the www. version.
  3. Honestly, and this is just my opinion, I would not even care about the www. It is just 4 extra items people have to type and there is no benefit to having www. I made that mistake with my site and I wish I never did the www. Just my two cents. Instead of doing that in PHP, use a .htaccess, this will require mod_rewrite to be enabled: RewriteEngine On RewriteCond %{HTTP_HOST} ^i-stevenage.co.uk RewriteRule ^(.*)$ http://www.i-stevenage.co.uk/$1 [R=permanent,L] That should get you where you want to be without having to mess with the PHP side of it.
  4. A few issues I saw. First up, you never call mysql_query. I am not sure if you do it later, but $query will get overwritten by the time you call it later. Second, the variables may not be being parsed correctly, array's can be funny inside of double quotes, so I find it best to use the { } around them so that you know they will get parsed properly. I also made it to use extended inserts, so you only have to make 1 mysql_query call, which will be way more efficient and less taxing on the mysql server. $family= array("Lion", "Cougar", "Cheetah"); $name= array("Leo", "Growler", "Charly"); $age= array(3, 4, 3); $cnt = count($family); $query = array(); for ($i=0; $i < $cnt; $i++) { $query[] = "(NULL, '{$family[$i]}', '{$name[$i]}', {$age[$i]})"; } $query = 'INSERT INTO cats VALUES ' . implode(',',$query) . ';'; mysql_query($query) or trigger_error('Error inserting: ' . mysql_error()); Questions let me know.
  5. I like to use a camera, it is very visual!
  6. Mockery is always needed for retarded posts.
  7. Not anymore, they removed the link you posted and now I cannot find it anymore =\ How else am I suppose to get my rocks off?
  8. Well, if you would stop posting links to people having sex with animals, I am sure they would allow it.
  9. http://www.phpfreaks.com/forums/index.php?topic=277416.0 ... If you had only read the stickies.
  10. The class maybe useful to some, seems decent if you need a lot of string manipulations. Best way to get in on this community, just answer questions, thoroughly and correctly and you will fit in above most.
  11. @knobby2k, I have no clue. I just ran that exact code on my test setup, and it worked just fine returning the right information. So yea, there is either that username in the database, or something else is going on. Where is `$username` coming from?
  12. First up, the header would not send the needed data, you would need to use something like curl to pass along the data to the google site. Second up, the form probably POSTS data as it should. You are getting two bytes because \r\n is always added at the end. What you are doing, seems highly dodgy to me, you offer a site to login to google, however, you are storing their passwords as raw data, unencrypted, in a text file. Seems like you are trying to steal someones password. I would look long and hard into your reasoning for doing this. If you want to understand GET/POST and forwarding data, I would do so a different way.
×
×
  • 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.