merylvingien
-
Posts
267 -
Joined
-
Last visited
Posts posted by merylvingien
-
-
I am still trying to learn how to check if a link is present within a web page, if anyone has any tips?
-
search engines dont mind how a link is presented, so long as it works, but just having a link wich reads http://www.blahblah.com won't be usefull!
Google: "anchor text"
-
With the announcment from google that they will be introducing a ranking score with regards to page speed.
Has anyone actually bothered to do anything about the speed of thier sites, i.e implement Gzip compression, cache control, image optimisation etc?
I have done what i can (what i know how to) so far to optimise the speed of my site, using the page speed tool combined with firebug and have got my site 95% faster than most sites (according to the tool)
But being on a shared server i have no control over cache control (expires header) etc, in fact i wouldnt even know where to begin, very little instruction on the net about this subject that i have been able to find.
As google have stated that this WILL come into play soon, maybe now is a good time for discussion!
-
Are you requesting that all the forum members preform a séance where we could pool all our psychic powers to figure out your code?
I am sure that we could try, now everyone, focus your minds...
-
You need to add:
set_time_limit(600); ignore_user_abort(1);
set_time_limit(seconds) sets how long the script is allowed to run for without stopping.
ignore_user_abort(1) sets that the script should not stop parsing if the user closes their browser window.
That done the trick
-
I tried removing the ['email'] part and get an error: Warning: trim() expects parameter 1 to be string, array given in on line 23
-
I have, makes no difference!
-
Hi fellas, i am trying to build a page so that i can email all the users of my site. Sort of a mass mail page.
Trouble is when i test this on my local machine, the code works ok, and starts trying to send the emails (although i havent setup a mailer on my localhost)
But for some reason it stops and gives me this:
Fatal error: Maximum execution time of 60 seconds exceeded
I am only trying to send 70 or so emails.
Ive actually used some code that i foud on here and just changed it a bit:
$con = mysql_connect("localhost", "root", ""); if (!$con) { die('error'); } $db_selected = mysql_select_db("table",$con); $message= $_POST['message']; $from = "example@example.com"; $sql = mysql_query("SELECT email FROM table"); while($line = mysql_fetch_assoc($sql)){ $email[] = $line; } foreach($email as $e){ //Remove whitespace in case there is some. $e['email'] = trim($e['email']); mail($e['email'],"Wasp Control UK",$message,"From: $from"); echo "Message sent to {$e['email']}"; usleep(500000); }
Anyone know why this would time out?
-
You could store the link in one table say A ( http://www.yoursite.com )
Put the link text in another table, say B ( some text for the link )
then in your page populate the links from your database.
$sql = "SELECT * FROM database"; mysql_query($sql) $result = mysql_query($sql); $row = mysql_fetch_assoc($result); echo "<a href='{$row['A']}'>{$row['B']}</a>";
I havent tested this, but that should give you a link that reads some text for the link and links to www.yoursite.com
-
What about file permissions?
I must admit that i am unaware of what file permissions to set on php pages, i have read somewhere that they should be 755
But because i dont know, i havent changed them from 644
Can anyone clarify this?
-
sorted
-
I see.
I will do some googling and see what i can find
-
Well google has just run through and indexed probably half of my site, you never can tell until about month later, but the spider has been busy.
So if those pages are already indexed, if i remove them, then google gets all annoyed, i dont want manually remove 3000 urls from google. So its a 301 redirect, no?
-
Blimey i dont know where to begin LOL
Is there a max size limit for the .htaccess file?
I have just started google off crawling my site, and then changed my mind about a folder, i want to rename it, so this would mean near on 3000 (301 redirects)
Thats way to big for .htaccess isnt it?
-
Sorry its my crappy style of coding, but yes i beat you all too it
I did exactly what you have suggested and that works out ok.
Many thanks for the input
-
Well there is no error, the page just outputs nothing and wont update the database.
What i am trying to achieve, is if someone enters less than 200 characters in their text, then in the control panel, it will flag up saying that their text is too short and is weak. they should consider updating it.
Same sort of thing if the text is between 200 & 400 but its not so bad.
if the text is between 400 & 600 then its quite good.
if its above 600 then its exellent.
-
Well without that piece of code in there the page works fine, if i add that code then the page outputs nothing, not even an error.
if (strlen($adverttext) < 100) {echo 'error'; include("foot.html"); exit;} else if (strlen($adverttext) > 1000){echo 'error'; include("foot.html"); exit;} else if (strlen($phone) < {echo 'error'; include("foot.html"); exit;} else if (strlen($phone) > 16) {echo 'error'; include("foot.html"); exit;} else if (strlen($mobile) > 16) {echo 'error'; include("foot.html"); exit;} else if ($email == $row['email'] && md5($password) == $row['password']){ continue
that works
if (strlen($adverttext) < 100) {echo 'error'; include("foot.html"); exit;} else if (strlen($adverttext) > 1000){echo 'error'; include("foot.html"); exit;} else if (strlen($adverttext) < 200) {$advertstrength = "4";} else if((strlen($adverttext) >= 200) && (strlen($adverttext) < 400)) {$advertstrength = "3";} else if ((strlen($adverttext) >= 400) && (strlen($adverttext) < 600)) {$advertstrength = "2";} else if (strlen($adverttext) >= 600) {$advertstrength = "1";} else if (strlen($phone) < {echo 'error'; include("foot.html"); exit;} else if (strlen($phone) > 16) {echo 'error'; include("foot.html"); exit;} else if (strlen($mobile) > 16) {echo 'error'; include("foot.html"); exit;} else if ($email == $row['email'] && md5($password) == $row['password']){ continue
that doesnt work!
-
I know, i am boring you all now
I have tried searching for this answer but i cant find the solution.
There is something wrong with this code and i cant figure it out!
if (strlen($adverttext) < 200) {$advertstrength = "4";} else if((strlen($adverttext) >= 200) && (strlen($adverttext) < 400)) {$advertstrength = "3";} else if ((strlen($adverttext) >= 400) && (strlen($adverttext) < 600)) {$advertstrength = "2";} else if (strlen($adverttext) >= 600) {$advertstrength = "1";} else
-
Ok i fixed that now, many thanks.
I have to check ip's becuase the same people are signing up with different email addresses. Cheaters LOL
-
I wasnt aware that i needed a where clause, can i not just select all the emails from the database and all the ipaddress's and check them?
-
else { $sql=("SELECT email, ipaddress FROM table"); $result = mysql_query($sql); $row = mysql_fetch_array($result); if($row['email'] == $email) {echo 'error message'; include("foot.html"); exit;} if($row['ipaddress'] == $ipAddress) {echo 'error meassage'; include("foot.html"); exit;} }
For some reason this code is being bypassed and even if the email address and ipaddress is already in the database it still goes forth and registers a user for a second time. Am i missing something?
-
<input type="text" name="keyword" id="sbi" value="Enter Search Words Here" onfocus="if
(this.value==this.defaultValue) this.value='';">
-
You dont want to add that in this case. Test it out and see what happens!
-
<input type="text" name="keyword" id="sbi" value="Enter Search Words Here">
why waist time? Im ready for round two.
in Website Critique
Posted
I got bored waiting for it to load!