
Shaun
Members-
Posts
63 -
Joined
-
Last visited
About Shaun
- Birthday 04/25/1989
Contact Methods
- MSN
-
Website URL
http://www.shacow.com
Profile Information
-
Gender
Male
-
Location
Midlands
Shaun's Achievements

Member (2/5)
0
Reputation
-
Pulling my hair out over header( "Location: and referal information
Shaun replied to Shaun's topic in PHP Coding Help
Thank Marcus, I was starting to think the same. It's strange how its handled, I managed to find some info about using python instead. Ill leave a link here should anyone need it for reference. http://code.google.com/p/ga-demos/wiki/GaRedirects -
Hi folks, im in a spot of bother and I really hope someone can help me out here. So I understand that http_referer is passed by your browser and not the server. I also understand that you can have some trouble with referals on the same domain so I tested this on two different domains. I also tested three browsers, FireFox, Chrome, and IE. But I still cannot view the referal information when my php script uses header("location:.... There is no problem if I use actual html links. I have tried forcing the http status as 200, 301, 303 and still nothing. I have no idea why the browser will not pass this information along. The first page on domain1.com: <?php header( "Location: http://domain2.com" ); ?> The second page on domain2.com: <?php echo $_SERVER['HTTP_REFERER']; ?> thank you all very much for your time, it is most appriciated! - Shaun
-
ah right ok, thanks
-
instead of $xml = simplexml_load_file($url) or die('Cannot retrieve feed'); could I do $xml = simplexml_load_file($url) or $xml = 0; ?? the reason I ask, is because my server sometimes plays up, and wont resolve names.. and instead of returning the error, or dieing.. I want to just return $xml as another value to check against in another script.
-
Ive just found these set of functions that work perfectly http://w-shadow.com/blog/2008/07/05/how-to-get-redirect-url-in-php/ <- just incase anyone else is interested.
-
Hi, im am absolutely lost with this. I am trying to make a php script that will check if a site in my database is actually valid. for example, $domain = "http://somedomain.com/?page=somepage&something=somethingelse"; I want to be able to connect to $domain and make sure that the url does actually point to the exact match that $domain is. The reason is that I have some sites in my database that use a php headers redirect and I cannot actually get the original domain without manually visiting each and every url in my db.. now this wouldnt be a problem with a small bd.. but I have a list of over 200k results.. so it will take me a very long time. I must apologise for not writing any code here, the only reason I havent tried is because i really do not have a clue where to start. I am thinking i will need to use fsocks, and $_SERVER['REMOTE_ADDR'] and one big loop, (for each etc) if anyone has the time, could you possible help me out with this? thank you so much, Shaun
-
if your not using any sql, you dont have to worry about injection?
-
thanks, that has helped a lot
-
If you dont have a web server to run it from, you can simple use http://www.wampserver.com/ . I use it for all my dev work, it is very simple and easy. No configuration needed
-
Agreed, use javascript to offset from the servers time
-
You want an php ajax clock. take a look at this: http://ehsun7b.blogspot.com/2007/10/ajax-clock-show-alive-clock-using.html
-
Hi, I have been reading the quide at http://www.dagondesign.com/articles/writing-secure-php-scripts-part-1/ and was just wondering if I would be safe to use these functions in my code. For displaying content from db: function fix_for_page($value){ $value = htmlspecialchars(trim($value)); if (get_magic_quotes_gpc()) $value = stripslashes($value); return $value; } for posting stuff to db: function fix_for_mysql($value){ if (get_magic_quotes_gpc()) $value = stripslashes($value); $value = mysql_real_escape_string($value); return $value; } I guess I would just call the function up on every variable that either gets posted to my db, or viewed from my db? Does anyone have any other recommendations? I am also in the process of recoding a lot of my pages as I was unaware of register globals problems, so if anyone has tips there also? thank you all, Shaun
-
dont show the form if it has been sucessfully processed.
Shaun replied to Shaun's topic in PHP Coding Help
I have my own server, I havent put this script live on it yet. It is just sitting on my home pc. Ive just googled and I guess im going to have to re code a lot of things.. -
dont show the form if it has been sucessfully processed.
Shaun replied to Shaun's topic in PHP Coding Help
according to php info register_globals On On ? you have me worried. :S -
dont show the form if it has been sucessfully processed.
Shaun replied to Shaun's topic in PHP Coding Help
Ok ive just tried: <? if (!empty($email)) { $result = mysql_query("Select * from users where email='$email'"); $totnum = mysql_num_rows($result); if($totnum>0) { $pw = mysql_result($result,0,"pw") ; include('pwmail.php'); $msg='You password has been sent!'; $state=1; } else $msg="error; $state=0; } ?> <table width="300" border="0" align="center" cellspacing="0"> <tr> <td><div align="left"> <h3>Forgot your password? </h3> </div></td> </tr> <tr> <td><?=$msg?><br /> <? if($state==1) {?> <? }else{?> Enter your email address.<br /> <form id="form1" name="form1" method="post" action=""> <input name="email" type="text" id="email" size="30" /> <input type="submit" name="Submit" value="Get it" /> </form> <? }?> </td> </tr> </table> But it still shows no matter what...