Search Results

Search found 32 results on 2 pages for 'probocop'.

Page 1/2 | 1 2  | Next Page >

  • Apache - Restrict to IP not working.

    - by Probocop
    Hi, I've a subdomain that I only want to be accessible internally; I'm trying to achieve this in Apache by editing the VirtualHost block for that domain. Can anybody see where I'm going wrong? Note, my internal IP address here are 192.168.10.xxx. My code is as follows: <VirtualHost *:80> ServerName test.epiphanydev2.co.uk DocumentRoot /var/www/test ErrorLog /var/log/apache2/error_test_co_uk.log LogLevel warn CustomLog /var/log/apache2/access_test_co_uk.log combined <Directory /var/www/test> Order allow,deny Allow from 192.168.10.0/24 Allow from 127 </Directory> </VirtualHost> Thanks

    Read the article

  • Google API to check number of indexed pages?

    - by Probocop
    Is there a Google API similar to Yahoo and Bing's API's to check for the number of indexed pages on a specified domain? For example, for Yahoo if I type in the following URL: http://search.yahooapis.com/SiteExplorerService/V1/pageData?appid=MTSlade&query=http://www.dave-sellers.co.uk&domain_only=1&results=1 Then it will return some XML detailing the number of pages indexed as 'totalResultsAvailable' Any idea? Thanks

    Read the article

  • Parsing XML in Javascript getElementsByTagName not working

    - by Probocop
    Hi, I am trying to parse the following XML with javascript: <?xml version='1.0' encoding='UTF-8'?> <ResultSet> <Result> <URL>www.asd.com</URL> <Value>10500</Value> </Result> </ResultSet> The XML is generated by a PHP script to get how many pages are indexed in Bing. My javascript function is as follows: function bingIndexedPages() { ws_url = "http://archreport.epiphanydev2.co.uk/worker.php?query=bingindexed&domain="+$('#hidden_the_domain').val(); $.ajax({ type: "GET", url: ws_url, dataType: "xml", success: function(xmlIn){ alert('success'); result = xmlIn.getElementsByTagName("Result"); $('#tb_actualvsindexedbing_indexed').val($(result.getElementsByTagName("Value")).text()); $('#img_actualvsindexedbing_worked').attr("src","/images/worked.jpg"); }, error: function() {$('#img_actualvsindexedbing_worked').attr("src","/images/failed.jpg");} }); } The problem I'm having is firebug is saying: 'result.getElementsByTagName is not a function' Can you see what is going wrong? Thanks

    Read the article

  • Jquery - Check for bad words on form submit?

    - by Probocop
    Does anybody know of a good Jquery solution to checking for swear words when a form is submitted? Basically I have a form which submits to Twitter, upon successfully passing a swear word check it will submit via ajax. I know how to do it in PHP (for non javascript enabled users), I did a foreach loop through an array of predefined bad words and checked them against what was submitted. How would I do a similar thing with Jquery? Thanks

    Read the article

  • How to use SQL - INSERT...ON DUPLICATE KEY UPDATE?

    - by Probocop
    Hi, I have a script which captures tweets and puts them into a database. I will be running the script on a cronjob and then displaying the tweets on my site from the database to prevent hitting the limit on the twitter API. So I don't want to have duplicate tweets in my database, I understand I can use 'INSERT...ON DUPLICATE KEY UPDATE' to achieve this, but I don't quite understand how to use it. My database structure is as follows. Table - Hash id (auto_increment) tweet user user_url And currently my SQL to insert is as follows: $tweet = $clean_content[0]; $user_url = $clean_uri[0]; $user = $clean_name[0]; $query='INSERT INTO hash (tweet, user, user_url) VALUES ("'.$tweet.'", "'.$user.'", "'.$user_url.'")'; mysql_query($query); How would I correctly use 'INSERT...ON DUPLICATE KEY UPDATE' to insert only if it doesn't exist, and update if it does? Thanks

    Read the article

  • Ajax call not working...

    - by Probocop
    Hi, I have a form that submits to a PHP script with Jquery and Ajax. The PHP script returns some XML. For some reason the Ajax success function is not firing, and the error ones is. Can anybody see where I'm going wrong? My Jquery is as follows $('#submit-excuse').submit(function (event) { event.preventDefault(); ws_url = 'http://jacamo.epiphanydev2.co.uk/content/inc/excuse-submit.php?excuse='+$('input#excuse').val(); $.ajax({ type: 'GET', url: ws_url, dataType: "xml", beforeSend: function() { $('p#response').text('Sending.'); }, success: function(xmlIn) { results = xmlIn.getElementsByTagName("ReportID"); }, error: function() { $('p#response').text('Error.'); } }); }); And my PHP script is as follows: $excuse = $_GET['excuse']; $badwords = array ( 'one', 'two', 'three', 'four', 'five' ); if ($excuse == '') { $error = 'enter something'; } else { foreach ($badwords as $word) { $pos = strpos($excuse, $word); if($pos !== false) { $passed = false; } } if ($passed !== false) { $username = 'xxxxx'; $password = 'xxxxx'; $message = $excuse; $url = 'http://twitter.com/statuses/update.xml'; $curl_handle = curl_init(); curl_setopt($curl_handle, CURLOPT_URL, "$url"); curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 2); curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl_handle, CURLOPT_POST, 1); curl_setopt($curl_handle, CURLOPT_POSTFIELDS, "status=$message"); curl_setopt($curl_handle, CURLOPT_USERPWD, "$username:$password"); $buffer = curl_exec($curl_handle); curl_close($curl_handle); $passed = 'yes'; } echo "<?xml version='1.0' encoding='UTF-8'?>\n"; echo "\t<result>\n"; echo "\t\t<passed>" . $passed . "</passed>\n"; echo "\t</result>"; } Thanks

    Read the article

  • Windows server Task Scheduler, close after?

    - by Probocop
    I have a scheduled task on my server which runs a PHP script every minute. In the 'Run' part of the scheduled task I have the following: "C:\Program Files\Internet Explorer\iexplore.exe" "http://www.example.co.uk/script.php" So when it runs it opens Internet Explorer and browses to that URL. Is it possible to get it to close Internet Explorer after running the script?

    Read the article

  • jQuery - Sorting an array?

    - by Probocop
    Hi, I'm using Ajax to get some XML, and then filling in some fields on a form with the results. There is a numerical field on the form and I would like to sort the results by this number (highest first). How would I go about doing this in jQuery? My js function code is currently: function linkCounts() { ws_url = "http://archreport.epiphanydev2.co.uk/worker.php?query=linkcounts&domain="+$('#hidden_the_domain').val(); $.ajax({ type: "GET", url: ws_url, dataType: "xml", success: function(xmlIn){ results = xmlIn.getElementsByTagName("URL"); for ( var i = 0; i < results.length; i++ ) { $("#tb_domain_linkcount_url_"+(i+1)).val($(results[i].getElementsByTagName("Page")).text()); $("#tb_domain_linkcount_num_"+(i+1)).val($(results[i].getElementsByTagName("Links")).text()); } $('#img_linkcount_worked').attr("src","/images/worked.jpg"); }, error: function(){$('#img_linkcount_worked').attr("src","/images/failed.jpg");} }); } The Links tag is the one I'm wanting to sort it on. Thanks For reference the XML that's getting returned is like the following: <?xml version="1.0" encoding="utf-8" standalone="yes"?> <Response> <ResponseCode>1</ResponseCode> <ResponseStatus>OK</ResponseStatus> <ReportId>2</ReportId> <UrlChecked /> <MaxLinks>75</MaxLinks> <PagesFound>121</PagesFound> <URLs> <URL> <Page>http://www.epiphanysolutions.co.uk/blog</Page> <Links>78</Links> </URL> <URL> <Page>http://www.epiphanysolutions.co.uk/blog/</Page> <Links>78</Links> </URL> <URL> <Page>http://www.epiphanysolutions.co.uk/blog/author/daniel-peden/</Page> <Links>78</Links> </URL> <URL> <Page>http://www.epiphanysolutions.co.uk/blog/author/daniel-peden/page/2/</Page> <Links>78</Links> </URL> </URLS> </Response>

    Read the article

  • Jquery - Dynamically build form action on submit?

    - by Probocop
    Hi, I'm trying to have the action of a HTML form built when the user clicks the submit button. So the user fills in a form, clicks submit, then the action gets built then it actually gets submitted. The reason being is because the form has a load of options on it which will be passed to a script. How would I go about doing this with Jquery?

    Read the article

  • Disabled javascript for printing?

    - by Probocop
    This may seem a strange question, but is it possible to disable javascript for the printed version of a webpage? The reason being, it causes the printout's layout to all be on top of each other. But if I turn off javascript it works fine. Any ideas?

    Read the article

  • Apache - Restrict to IP not working.

    - by Probocop
    Hi, I've a subdomain that I only want to be accessible internally; I'm trying to achieve this in Apache by editing the VirtualHost block for that domain. Can anybody see where I'm going wrong? Note, my internal IP address here are 192.168.10.xxx. My code is as follows: <VirtualHost *:80> ServerName test.epiphanydev2.co.uk DocumentRoot /var/www/test ErrorLog /var/log/apache2/error_test_co_uk.log LogLevel warn CustomLog /var/log/apache2/access_test_co_uk.log combined <Directory /var/www/test> Order allow,deny Allow from 192.168.10.0/24 Allow from 127 </Directory> </VirtualHost> Thanks

    Read the article

  • Jquery Ajax refresh not working in IE.

    - by Probocop
    Hi, I have a <ul> which refreshes every ten seconds to check if there have been any new tweets (its pulling from a twitter feed). This works fine in Firefox and Chrome etc, but it does not work in any version if Internet Explorer. My code is as follows: setInterval(function() { $("#banter .scroll-pane").load(location.href+" #banter .scroll-pane>*",""); }, 10000); My PHP function creating the list is as follows: function showTweets($section, $limit, $class) { $result = mysql_query("SELECT * FROM hash WHERE section = '".$section."' ORDER BY date DESC LIMIT ".$limit); echo '<ul class="scroll-pane '.$class.'">'; while($row = mysql_fetch_array($result)) { echo '<li>'; echo '<p>'.html_entity_decode($row['tweet']).'</p>'; echo '<a href="'.$row['user_url'].'">'.$row['user'].'</a>'; echo '</li>'; } echo '</ul>'; } Any idea what's going wrong? Thanks

    Read the article

1 2  | Next Page >