Jump to content

Craig Hopson

Members
  • Posts

    212
  • Joined

  • Last visited

Everything posted by Craig Hopson

  1. Oh I see thank you so much saved me hours of messing about
  2. no its about 50 pages long every thing is stretched out
  3. Thanks so much for your help i've done as you said but its still the same??? Have i missed something else??
  4. my friend has this site http://www.allaboutbouncycastles.co.uk/ works fine on IE9 but any thing less dont display correctly any ideas why Thanks guys
  5. I have found the problem to be open ssl not installed
  6. http://www.myworldconnect.com/test.php
  7. ahh thank you i will check it THANKS edit :- allow_url_fopen =ON any other ideas?
  8. OK so i have this snipit of code and it's making me look like a fool <?php$url="All other trademarks and material are the prop of their respectful owners";$site = file_get_contents("https://www.footle.net");if (strpos($site,$url) !== false) { echo 'GOOD'; } else { echo 'BAD';}?> Works fine on my server but my clients server gives this error PLEASE help me work round this
  9. Maybe be I am if so is there a way to detect linux server
  10. Yes im using the crontab command which only works on apache severs
  11. hi how can i check if the web server is apache, i have the crontab script which only works on apache servers so i would like something like if($_SERVER['server_software'] == 'apache'){// do something here} My server is apache yet if i echo "$_SERVER['server_software'];" it says its LiteSpeed which is based on apache Question:-How can i check if the web server is apache
  12. Got it to work now file_put_contents('crontab.txt','0 * * * * php /home/chsitesc/delete1.php'.PHP_EOL);echo exec('crontab crontab.txt');$output = exec('crontab -l');echo $output;$myFile = "crontab.txt";unlink($myFile);
  13. should create a cron job but just wont work
  14. hi guys im stuck again this is what i have so far but it wont work <?php$data = '0 0 * * * /usr/local/bin/php $HOME/public_html/run_this_script.php';file_put_contents('cron.txt', $data, FILE_APPEND);exec("/usr/bin/crontab cron.txt", $output, $return);if($return === 0) {echo 'Cron Successful';} else {echo 'Cron Unsuccessful';}echo "<br />\nOutput:<br /><br />";var_dump($output);echo "<br /><br />done!";?>
  15. Still cant get this code to work i have broken it back to basics still giving error $test = "http://seekface.com/themes/blue/ico.gif";$URL = "www.seekface.com";echo preg_replace($URL," ",$test);
  16. any help with the regex code?
  17. Thanks been trying for ages
  18. hi guys what am i doing wrong $url1 = "http://twitterrooms.co.uk";echo str_replace('~&http://[a-zA-Z0-9]','*',$url1); the output i would like is http://***********.**.**
  19. They run windows 7, i'm not to shore my self but i think they run simular to intel i7
  20. Is there an example of this i had a little search and made this <!DOCTYPE html><?phpecho '<h1> Testing</h1>PLEASE ADD THIS CODE TO YOUR SITES FRONT PAGE<pre style="background:green;padding:20px;"><div id="backlink"><a href="http://twitterrooms.co.uk"><img src="http://twitterrooms.co.uk/themes/charcoal/twitterrooms5.png"></a></div></pre><form action="test.php" method="post">Site: <input type="text" name="site" placeholder="http://example.com" /><input type="hidden" name="check" value="1"/><input type="submit" value="Check" /></form>';if($_POST['check'] == 1){if($_POST['site'] == ''){echo 'Please enter a site';}else{$haystack = file_get_contents($_POST['site']);$needle = '<div id="backlink"><a href="http://twitterrooms.co.uk"><img src="http://twitterrooms.co.uk/themes/charcoal/twitterrooms5.png"></a></div>';if (strpos($haystack,$needle) !== false) { echo 'FOUND IT';}else{ echo 'ITS NOT THERE';}$_POST['check'] = 0;}}//echo'<div id="backlink"><a href="http://twitterrooms.co.uk"><img src="http://twitterrooms.co.uk/themes/charcoal/twitterrooms5.png"></a></div>';?>
  21. I was looking through ebay at old work stations and found 2x 8core xeon setups for well in your budget here is an example but its in UK but still cheaphttp://www.ebay.co.uk/itm/HP-XW8400-2x-Quad-Core-Xeon-X5355-Tower-Server-16GB-RAM-500GB-SATA-RAID-Storage-/110901556065?pt=UK_Computing_Servers&hash=item19d23f7361
  22. Hi all some has asked me to right a script for them but i'm not shore what they want this is what they said to me.... i want something that will give a code of my banner...and members put that code on their websites ...then something checks to see if the code is really there..then it will allow that member to put his link on my site. Question 1...Is there a pre-made script for this already?Question 2...If not i assume i would use a cron job?Question 3...How can i make a script check another site's content? Thanks
  23. Thanks for the quick responce i have read that but really dont understand. The top script does support paging and limiting and puts results in a table i dont want all that just yet i want to learn...do you know/Can you convert top script into its most basic form ie the bottom script
  24. hi guys i'm stuck i'm trying to query in drupal, here is what works function browse_output() { $query = db_select('users', 'd')->extend('PagerDefault'); $query->fields('d', array('uid', 'name', 'picture')); $result = $query ->limit(10) ->orderBy('d.uid') ->execute(); $rows = array(); foreach ($result as $row) { $rows[] = array('data' => (array) $row); } $build['pager_table'] = array( '#theme' => 'table', '#rows' => $rows, '#empty' => t('There are no date formats found in the db'), ); $build['pager_pager'] = array('#theme' => 'pager'); return $build;} and this displays a table with user id, name, and picture(number)ok i know it works but i dont understand what is going on in the code and why cant i do it like this $result = mysql_query("SELECT * FROM users");while($row = mysql_fetch_array($result)) { echo $row['picture']." ".$row['id']." ".$row['name']; echo "<br />"; } ANY advice on this would help and yes i've read the documentation but cant make much sence from it i got the function browse_output from the examples on the Drupal site Thanks
×
×
  • Create New...