Dev Shed Forums http://forums.devshed.com/ Dev Shed - Open Source web development forums. Topics covered include PHP, Apache, mySQL, Zope, Jserv, Java, Python, Zend, XML, DHTML, Javascript and more. en Thu, 19 Oct 2017 18:35:57 GMT vBulletin 60 http://forums.devshed.com/images/misc/rss.png Dev Shed Forums http://forums.devshed.com/ Looking for Beta Testers for iOS/Android App http://forums.devshed.com/dev-shed-lounge/979290-looking-beta-testers-ios-android-app-new-post.html Thu, 19 Oct 2017 15:06:15 GMT I'm looking for a few beta testers that would be willing to install, test and just play around with an App that's just been released. it's available on both stores right now. It's an entertainment platform used to send and receive video messages.

If you're interested, please let me know. No newbies to the forums. Hopefully some folks that I've known for a while around here are interested. Send me a PM.

-John ]]>
Dev Shed Lounge Sepodati http://forums.devshed.com/dev-shed-lounge-26/looking-beta-testers-ios-android-app-979290.html
Button requires ActiveX control. http://forums.devshed.com/html-programming/979289-button-requires-activex-control-new-post.html Thu, 19 Oct 2017 11:35:49 GMT
]]>
<div style="border: 1px dashed gray; padding: 1px;">
<div>
<button type="button" class="button" onclick="this.parentNode.parentNode.childNodes[1].style.display = ''; this.parentNode.style.display = 'none'; "title="Blah">
<font color="#000000" size="1"><b>Show full story.</b></font></button></div>
<div id="spoiler" style="display: none;">

Blah blah blah, spoiler.

</div></div>


It's a simple button that says "Show full story" and when you click on it, it expands.

Only problem is, on some computers, IE will pop up a window that asks you permission to enable ActiveX control or whatever, some IE does not.

Can the code be written better to not have that?

Thanks. ]]>
HTML Programming LostShadow http://forums.devshed.com/html-programming-1/button-requires-activex-control-979289.html
Filter Code Goes On Which Line ? http://forums.devshed.com/php-development/979288-filter-code-goes-line-new-post.html Thu, 19 Oct 2017 10:47:12 GMT Folks, Where on Mini Proxy, on which line, would I add the banned words filter code (the code which you see below) so that, when banned words are found on the proxied pages, then the banned words are substituted ? Mini Proxy is here: https://github.com/josh****/miniProxy/blob/master/miniProxy.php Filter Code: Folks,

Where on Mini Proxy, on which line, would I add the banned words filter code (the code which you see below) so that, when banned words are found on the proxied pages, then the banned words are substituted ?

Mini Proxy is here:
https://github.com/josh****/miniProx.../miniProxy.php

Filter Code:

Code:

<?php

/*
ERROR HANDLING
*/
//declare(strict_types=1);
ini_set('display_errors', '1');
ini_set('display_startup_errors', '1');
error_reporting(E_ALL);
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);

// 1). Set banned words.
$banned_words = array("blow", "nut", "bull****");
// 2). $curl is going to be data type curl resource.
$curl = curl_init();
// 3). Set cURL options.
curl_setopt($curl, CURLOPT_URL, 'https://www.buzzfeed.com/mjs538/the-68-words-you-cant-say-on-tv?utm_term=.xlN0R1Go89#.pbdl8dYm3X');
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true );
// 4). Run cURL (execute http request).
$result = curl_exec($curl);
if (curl_errno($curl)) {
    echo 'Error:' . curl_error($curl);
}
$response = curl_getinfo( $curl );
if($response['http_code'] == '200' )
{
    $regex = '/\b';   
    $regex .= implode('\b|\b', $banned_words); 
    $regex .= '\b/i';
    $substitute = '****';
    $cleanresult = preg_replace($regex, $substitute, $result);
    echo $cleanresult;
}
curl_close($curl);
?>

]]>
PHP Development UniqueIdeaMan http://forums.devshed.com/php-development-5/filter-code-goes-line-979288.html
VPS optimization http://forums.devshed.com/web-hosting/979287-vps-optimization-new-post.html Thu, 19 Oct 2017 04:46:21 GMT I was looking for tips to optimize VPS, came across best article with complete details to optimize VPS. Check out this article to know more on optimization of VPS. (http://bit.ly/2yyPyrX) I was looking for tips to optimize VPS, came across best article with complete details to optimize VPS. Check out this article to know more on optimization of VPS. ]]> Web Hosting Merry J http://forums.devshed.com/web-hosting-12/vps-optimization-979287.html <![CDATA[Word Document Automation Using Content UI Editor (XML) & VBA - Assistance Needed]]> http://forums.devshed.com/programming-languages/979284-word-document-automation-using-content-ui-editor-xml-vba-assistance-new-post.html Wed, 18 Oct 2017 17:30:09 GMT Hi,

If anyone could assist me with this challenge I would be eternally grateful. Happy to contribute something for your time. I just need to get one button working. Then I will be fine.

I've recently been asked to automate the creation of a proposal document using Microsoft Word 2016.
I've done it before so I thought I would do it again. I designed a ribbon bar with a sequence of buttons each having some VBA code behind them to perform the task.
I didnt want employees to mess with the ribbon or the buttons so I utilised Content UI Editor from XMLOpenOrg to create the necessary ribbons and buttons within
a MacroEnabled Microsoft Word document. The XML code creates the ribbon and its structor as shown below.

STEPS

So I create a standard blank word document
I then Save it as a Macro Enabled Word File
I then open the Macro Enabled file using Content UI Editor
I then add the XML code to create the new ribbon and buttons I want, remembering to add the name of the
macro "onAction='MacroName" which will be called when the button on the ribbon is pressed. (See futher down for VBA code)

This is the XML code I use once the Macro Enables Word File has been opened in Content UI Editor.

<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
<ribbon startFromScratch="false">
<tabs>
<tab id="customTab" label="PDT Proposal">
<group id="Content" label="Document Introduction">
<button id="content1" label="Title Page" size="large" onAction="Insert_TitlePage" image="GeneralDocument_Icon" />
<button id="content2" label="Why PDT Global" size="large" onAction="Insert_WhyPGTGlobal" image="content_page" />
<button id="content3" label="Client Requirements" size="large" onAction="Insert_Requirements" image="content_page"/>
<button id="content4" label="Delivery Methods" size="large" onAction="Insert_Delivery_Methods" image="content_page"/>
<button id="content5" label="Proposal Programme" size="large" onAction="Insert_Proposal_Programme" image="content_page"/>
<button id="content6" label="Discovering UB" size="large" onAction="Insert_DiscoverUB" image="content_page"/>
<button id="content7" label="UB for All" size="large" onAction="Insert_UB4ALL" image="content_page"/>
</group>
</tab>
</tabs>
</ribbon>
</customUI>

I then save the document.
Exit out of the Content UI Editor application and then open the macro enabled word document.
When the word document is opened the Ribbon Appears as do the buttons. Great!

Behind each button sits the VBA code which instructs word to access the BlockBuilder Function
and inserts the predefined items of text | tables | icons and graphics.I wish to be inserted

This is the VB Code that I am using.

Sub Insert_TitlePage(control As IRibbonControl)
Call InsertPageBreak
ActiveDocument.AttachedTemplate.BuildingBlockEntries("001_Insert_TitlePage").Insert _
Where:=Selection.Range
End Sub

Sub Insert_WhyPDTGlobal(control As IRibbonControl)
ActiveDocument.AttachedTemplate.BuildingBlockEntries("002_WhyPDTGlobal").Insert _
Where:=Selection.Range
End Sub

Sub Insert_Requirements(control As IRibbonControl)
ActiveDocument.AttachedTemplate.BuildingBlockEntries("003_Requirements").Insert _
Where:=Selection.Range

End Sub

Sub Insert_ProposalProgramme(control As IRibbonControl)

ActiveDocument.AttachedTemplate.BuildingBlockEntries("004_ProposalProgram").Insert _
Where:=Selection.Range

End Sub

Sub Insert_DiscoverUB(control As IRibbonControl)

ActiveDocument.AttachedTemplate.BuildingBlockEntries("005_Discover_UB").Insert _
Where:=Selection.Range

End Sub

Sub Insert_UB4ALL(control As IRibbonControl)

ActiveDocument.AttachedTemplate.BuildingBlockEntries("006_UB4ALL").Insert _
Where:=Selection.Range

End Sub

Sub Insert_DeliveryMethods(control As IRibbonControl)

ActiveDocument.AttachedTemplate.BuildingBlockEntries("007_DeliveryMethods").Insert _
Where:=Selection.Range

End Sub

HERE IS MY PROBLEM

Each time I click a button in the document to run the VBA Code.
I get this Microsoft Visual Basic for Applications dialogue box with a Red Circle and X in the
middle with no error message explaining what action to take next. Having tried everything I know
I decided to resort to a forum of experts who might be able to shed some light on the issue.

I'm using Windows 10 Professional
Microsoft Word v2016
Content UI Editor (Download Link: http://openxmldeveloper.org/cfs-file...ditorSetup.zip)
Useful Link: https://social.msdn.microsoft.com/Fo...?forum=worddev

Your assistance is both respected and greatly appreciated.

Many thanks in advance.

Mark Jones ]]>
Other Programming Languages JonesMark1974 http://forums.devshed.com/programming-languages-139/word-document-automation-using-content-ui-editor-xml-vba-assistance-979284.html
<![CDATA[WHUK | 20% OFF on Shared Hosting | New Domain TLD's up for grabs!]]> http://forums.devshed.com/web-hosting-offers/979283-whuk-20-shared-hosting-domain-tlds-grabs-new-post.html Wed, 18 Oct 2017 13:43:13 GMT WHUK (Webhosting UK Com Ltd.), a UK based web host since 2001 offering shared hosting services on Cloud platform. Also, there are new domain TLD's up for grabs!

Quote:

Use Discount Coupon - "SHAREDSAVE20" to Get 20% OFF on All Shared Hosting Plans
This is a limited time period offer and ends on Wednesday 24 October 2017, 11.59pm BST. So hurry before the offer ends.

Quote:

Initiate a LIVE CHAT with one of our friendly sales advisor to avail exclusive benefits on these shared servers!
As an introductory offer:

Quote:

45% OFF .Space TLD! Register at just £4.16 ex. VAT!
Quote:

67% OFF .Site TLD! Register at just £6.66 ex. VAT!
So rush to register yours today!

To find your perfect TLDs for business and personal use, Visit: https://www.webhosting.uk.com/domain-names/

Quote:

Do not hesitate to initiate a LIVE CHAT with one of our friendly sales advisor to know more on the domain prices!
The Linux Shared Hosting plans are mentioned below:

Cloud cPanel Starter
5GB SSD Storage
Unmetered Bandwidth
Host 2 Websites
Unlimited Emails
Unlimited Databases
cPanel Control Panel
FREE Domain on annual plan
24x7 Technical Support
99.9% Uptime Guarantee
Monthly Price: £2.49 GBP | Order Now

Cloud cPanel Premium
10GB SSD Storage
Unmetered Bandwidth
Host 5 Websites
Unlimited Emails
Unlimited Databases
cPanel Control Panel
FREE Domain on annual plan
24x7 Technical Support
99.9% Uptime Guarantee
Monthly Price: £3.99 GBP | Order Now

Cloud cPanel Advanced
20GB SSD Storage
Unmetered Bandwidth
Host 15 Websites
Unlimited Emails
Unlimited Databases
cPanel Control Panel
FREE Domain on annual plan
24x7 Technical Support
99.9% Uptime Guarantee
Monthly Price: £5.49 GBP | Order Now

Cloud cPanel Developer
40GB SSD Storage
Unmetered Bandwidth
Host Unlimited Websites
Unlimited Emails
Unlimited Databases
cPanel Control Panel
FREE Domain on annual plan
24x7 Technical Support
99.9% Uptime Guarantee
Monthly Price: £6.99 GBP | Order Now

For full list of Linux Shared Hosting Packages, visit: https://www.webhosting.uk.com/cpanel-hosting/

The Windows Shared Hosting plans are mentioned below:

Cloud Windows Starter
5GB SSD Storage
Unmetered Bandwidth
Host 2 Websites
Unlimited Emails
Unlimited Databases
Plesk Control Panel
FREE Domain on annual plan
24x7 Technical Support
99.9% Uptime Guarantee
Monthly Price: £2.49 GBP | Order Now

Cloud Windows Premium
10GB SSD Storage
Unmetered Bandwidth
Host 5 Websites
Unlimited Emails
Unlimited Databases
Plesk Control Panel
FREE Domain on annual plan
24x7 Technical Support
99.9% Uptime Guarantee
Monthly Price: £3.99 GBP | Order Now

Cloud Windows Advanced
20GB SSD Storage
Unmetered Bandwidth
Host 15 Websites
Unlimited Emails
Unlimited Databases
Plesk Control Panel
FREE Domain on annual plan
24x7 Technical Support
99.9% Uptime Guarantee
Monthly Price: £5.49 GBP | Order Now

Cloud Windows Developer
40GB SSD Storage
Unmetered Bandwidth
Host Unlimited Websites
Unlimited Emails
Unlimited Databases
Plesk Control Panel
FREE Domain on annual plan
24x7 Technical Support
99.9% Uptime Guarantee
Monthly Price: £6.99 GBP | Order Now

For full list of Windows Shared Hosting Packages, visit: https://www.webhosting.uk.com/windows-hosting/

WHUK offers with uninterrupted customer support and 99.95% uptime guarantee along with ensuring the speed and smooth functioning of the website even during the high traffic times. These shared hosting packages are the best solutions for small and medium businesses. With all the features mentioned above and 24/7 pro-active monitoring, the shared hosting platform provided by WHUK is a complete value for money.

In case of any questions, you can approach our Sales Department through 24*7 Live chat, you can drop us an email at sales @ webhosting.uk.com or call us on the toll free number 0808-862-0890 / +44-191-303-8069. ]]>
Web Hosting Offers James-A http://forums.devshed.com/web-hosting-offers-100/whuk-20-shared-hosting-domain-tlds-grabs-979283.html
Sending array values to database in a form http://forums.devshed.com/php-development/979282-sending-array-values-database-form-new-post.html Wed, 18 Oct 2017 13:26:36 GMT For every category that is listed with a check mark I show the "order" of the the product I am editing. i.e. The product is number "2" means it appears 2nd that category. If I have multiple categories posting it is only holding and storing a singe value. The rest are showing "0" and they should be their respective placement order number.

Imagine a vertical list of categories with check boxes and some are checked with hidden values. Like "2" as described above.

To simplify it, I am only showing the three sections of code where I get the value posted, then loop, and then insert to the database.

Listing and showing the categories and check marks and values WORKS.

What DOESN'T work is storing each value. The ' p_order' is always "0" for all entries.

Code:

$cats = $_REQUEST['prodCategories'];
$orderp = $_REQUEST['orderp'];
               
       

-------------------------------------------------------------------


$wpdb->query("DELETE FROM category_assoc WHERE prod_id = '$lastID'");
     

        for($i= 0; $i < count($cats); $i++)

        {

                $thecatx = $cats[$i];
                $orderx = $orderp[$i];

                $catCategory = "INSERT INTO category_assoc (prod_id, cat_id, p_order) VALUES ('$lastID', '$thecatx', '$orderx')";
               
                $wpdb->query($catCategory);
               
        }


-----------------------------------------------------------------

$cats = $prod->getProductCategories();
                                if(count($cats)>0)
                                {
                               
                                        foreach($cats as $cat)
                                        {
                                                ?>
                                                <tr>
                                                <td><?php echo $cat['cat_name'];?></td>
                                                <td><input type='checkbox' name='prodCategories[]' value='<?php echo $cat['cat_id']; ?>' <?php if($editProduct) echo $prod->isCheckSelected($cat['cat_id'], $vals['prod_id']);?>/>
                                                <?php if($editProduct) echo $prod->gettheOrder($cat['cat_id'], $vals['prod_id']); ?>
                                               
                                                <input type='hidden' name='orderp[]' value='<?php echo $prod->gettheOrder($cat['cat_id'], $vals['prod_id']);?>' />
                                                </td>
                                                </tr>
                                                <?php
                                       
                                        }
                                }

]]>
PHP Development mallen http://forums.devshed.com/php-development-5/sending-array-values-database-form-979282.html
Cloud Hosting For Developers – TRY IT FREE – No credit card required! http://forums.devshed.com/web-hosting-offers/979280-cloud-hosting-developers-try-free-credit-card-required-new-post.html Wed, 18 Oct 2017 11:09:02 GMT MilesWeb’s next-generation *cloud hosting service (https://www.milesweb.com/hosting/cloud-hosting/)* can automatically scale any web application in real-time. Our Cloud hosting is 100% scalable and flexible. Everything that you expect from a real cloud platform like elastic compute, automatic vertical / horizontal scaling, server load balancer, container service, resource orchestration, high... MilesWeb’s next-generation cloud hosting service can automatically scale any web application in real-time. Our Cloud hosting is 100% scalable and flexible. Everything that you expect from a real cloud platform like elastic compute, automatic vertical / horizontal scaling, server load balancer, container service, resource orchestration, high availability, pay for usage, DevOps automation, marketplace with 1-click app deployment, self-provisioning access etc is offered with MilesWeb cloud hosting platform.

Why MilesWeb Cloud?

  • Launch your cloud instance within minutes
  • Cloud for small businesses and big enterprises
  • Pay for usage not server size
  • Java, PHP, Ruby, Python, Node.js and Docker support
  • Automatic scaling without downtime
  • Platform ready automated for DevOps
  • More than 100 pre-configured apps for 1-click install

Below are few short videos that will help you to easily understand our cloud offerings.

How MilesWeb Public Cloud Hosting works?

https://www.youtube.com/watch?v=JduZQtrOjXc

Launch Cloud Instance with automatic scaling:

https://www.youtube.com/watch?v=10WGGUSlK9A

Easily deploy apps on cloud from MilesWeb marketplace:

https://www.youtube.com/watch?v=d3rfTxNQFXg

MilesWeb cloud has all the features that other cloud providers are missing.

  • Automatic vertical scaling without downtime
  • Automatic horizontal scaling without downtime
  • Migrating between clouds without downtime
  • Pay for actually used resources
  • Self-service portal for fast creation and prototyping
  • Stack of pre-configured servers
  • Improved Docker support
  • 100+ pre-configured 1-click apps for installation
  • Configuring traffic distribution between instances via UI


Try MilesWeb Cloud FREE for 30 Days.

No Credit Card Required!

If you have any questions please feel free to get in touch with our cloud experts through live chat, phone or email.

Visit : https://www.milesweb.com/hosting/cloud-hosting/ ]]>
Web Hosting Offers MilesWeb http://forums.devshed.com/web-hosting-offers-100/cloud-hosting-developers-try-free-credit-card-required-979280.html
<![CDATA[Python Guru's I'm looking for you!]]> http://forums.devshed.com/hire-programmer/979278-python-gurus-im-looking-new-post.html Wed, 18 Oct 2017 10:04:45 GMT Hey, I'm Jake from Knowit in London.

We're looking for a few Python Developers to move over here. I'd love to have a chat about if anyone is interested. Please see a few details below.

A Tech start-up in London are looking for a Mid/Senior Python Developer to help scale their machine learning product - designed to locate new social events (Film/Music/Arts etc)

Company Tech Stack:
- Python(Django)
- React on Front end
- Scrum Methodology

Company Culture:
- 20 people so far
- Buzzy and collaborative atmosphere

Please write back to me on here, or if you want to be confidential then email jake@knowit.co.uk ]]>
Hire A Programmer jakeknowit http://forums.devshed.com/hire-programmer-57/python-gurus-im-looking-979278.html
Starting at $69/Mo High Performance Android App Marketing From TEMOK | 5 Star Ratings http://forums.devshed.com/web-hosting-offers/979277-starting-69-mo-performance-android-app-marketing-temok-5-star-ratings-new-post.html Wed, 18 Oct 2017 09:28:09 GMT With the development of the mobile app market growing at such a rate, you will find many app marketing companies rising, which are offering assistance in app promotion, optimization and also advertising. Choosing the perfect support from a mass of start ups and expansive companies can be a hard work. *Temok* offer APP Install Services to clients all over the world. We are in Google Play business... With the development of the mobile app market growing at such a rate, you will find many app marketing companies rising, which are offering assistance in app promotion, optimization and also advertising. Choosing the perfect support from a mass of start ups and expansive companies can be a hard work. Temok offer APP Install Services to clients all over the world. We are in Google Play business for past 2 years. Temok also provides Android App Reviews and Ratings based on your requirements. Never again will you stare at your app's download tracker filled with depressing ZEROs. Our app marketing service can provide up to 100,000 installs Each And Every Single Day.


We are proudly offering four different Android App Marketing Plans at the moment. Below you will find some details of them. Choose the right plan according to your need and budget & get it.

⇒⇒ Android App Marketing Starter Plan ⇐⇐

∙ 100 Installs
∙ 20 - 5 Star Ratings
∙ 10 Positive Reviews
∙ 50 Google+ Share
∙ Unique Devices + IP
∙ Worldwide Delivery
∙ Google Play App Link
∙ Delivered in 4-5 days
∙ Price: $69/Month ⊣ Order Starter Plan

⇒⇒ Android App Marketing Advanced Plan ⇐⇐

∙ 200 Installs
∙ 40 - 5 Star Ratings
∙ 20 Positive Reviews
∙ 100 Google+ Share
∙ Unique Devices + IP
∙ Worldwide Delivery
∙ Google Play App Link
∙ Delivered in 4-5 days
∙ Price: $138/Month ⊣ Order Advanced Plan

⇒⇒ Android App Marketing Professional Plan ⇐⇐

∙ 300 Installs
∙ 80 - 5 Star Ratings
∙ 40 Positive Reviews
∙ 250 Google+ Share
∙ Unique Devices + IP
∙ Worldwide Delivery
∙ Google Play App Link
∙ Delivered in 4-5 days
∙ Price: $276/Month ⊣ Order Professional Plan

⇒⇒ Android App Marketing First-Class Plan ⇐⇐

∙ 500 Installs
∙ 160 - 5 Star Ratings
∙ 80 Positive Reviews
∙ 500 Google+ Share
∙ Unique Devices + IP
∙ Worldwide Delivery
∙ Google Play App Link
∙ Delivered in 4-5 days
∙ Price: $500/Month ⊣ Order First Class Plan

So, our most important objective is customer satisfaction. This isn't just a phrase, we genuinely doing everything to make our customers pleased. Because of these facts, today, We happily provides over 8000 clients globally. Our services are world famous, ask your peers about us, they may already be part of the Temok family.

∙ We accept VISA, MasterCard, American Express, PayPal, WorldPay and Diners Club International for payment.

If you need any assistance please let us know sales[at]temok.com
]]>
Web Hosting Offers tk-hassan http://forums.devshed.com/web-hosting-offers-100/starting-69-mo-performance-android-app-marketing-temok-5-star-ratings-979277.html
Banned Words Filter http://forums.devshed.com/php-development/979276-banned-words-filter-new-post.html Wed, 18 Oct 2017 00:18:19 GMT Folks,

Q1. Do you consider the following code to be safe & sound to substitute banned words found on the page ?
If not, then maybe I try str_replace instead of preg_match ?

PHP Code:

<?php

/*
ERROR HANDLING
*/
//declare(strict_types=1);
ini_set('display_errors''1');
ini_set('display_startup_errors''1');
error_reporting(E_ALL);
mysqli_report(MYSQLI_REPORT_ERROR MYSQLI_REPORT_STRICT);

// 1). Set banned words.
$banned_words = array("blow""nut""bull****");
// 2). $curl is going to be data type curl resource.
$curl curl_init();
// 3). Set cURL options.
curl_setopt($curlCURLOPT_URL'https://www.buzzfeed.com/mjs538/the-68-words-you-cant-say-on-tv?utm_term=.xlN0R1Go89#.pbdl8dYm3X');
curl_setopt($curlCURLOPT_SSL_VERIFYPEERfalse);
curl_setopt($curlCURLOPT_RETURNTRANSFERtrue );
// 4). Run cURL (execute http request).
$result curl_exec($curl);
if (
curl_errno($curl)) {
    echo 
'Error:' curl_error($curl);
}
$response curl_getinfo$curl );
if(
$response['http_code'] == '200' )
{
    
$regex '/\b';     
    
$regex .= implode('\b|\b'$banned_words);   
    
$regex .= '\b/i'
    
$substitute '****';
    
$cleanresult preg_replace($regex$substitute$result);
    echo 
$cleanresult;
}
curl_close($curl);
?>

Q2. How would you code it yourself ? I mean, may I see a code sample ? I've done my best.

Q3. If I change this:

PHP Code:

// 3). Set cURL options.
curl_setopt($curlCURLOPT_URL'https://www.buzzfeed.com/mjs538/the-68-words-you-cant-say-on-tv?utm_term=.xlN0R1Go89#.pbdl8dYm3X'); 

to this:

PHP Code:

// 3). Set cURL options.
$url "https://www.buzzfeed.com/mjs538/the-68-words-you-cant-say-on-tv?utm_term=.xlN0R1Go89#.pbdl8dYm3X";
curl_setopt($curlCURLOPT_URL"$url"); 

then it works fine. But, is it safe to do it like this ?

Q4. Where on Mini Proxy, on which line, would I add the banned words filter code (the code which you see in my Q1) or your banned words filter code so that, when banned words are found on the proxied pages, then the banned words are substituted ?

Folks, you're welcome to add a few lines of code onto the Mini Proxy so that the proxy users are blocked from viewing pages that contain banned words.
Mini Proxy is here:
https://github.com/josh****/miniProx.../miniProxy.php

Finally, kindly attach the script here so that I can get hold of your update and install it on my site. You're welcome to use the proxy regular and you'e welcome to invite others to use it to.
I've googled but no luck in finding a shared webhost who will allow me to run a web proxy. :banghead:
Therefore, you're welcome to recommend many. :wink:
I'll only hire the dedicated server once I've picked-up a lot of regular users. :D ]]>
PHP Development UniqueIdeaMan http://forums.devshed.com/php-development-5/banned-words-filter-979276.html
Point rotation function in javascript http://forums.devshed.com/game-development/979275-rotation-function-javascript-new-post.html Tue, 17 Oct 2017 13:39:41 GMT ]]> Writing a function to rotate a point in javascript:

Code:

<!doctype html>

<html>

        <head>
       
                <script>
                // ==============================================================
                // Test rotate_point()
                // ==============================================================
                function rotate_test() {
               
                        var x = 3;
                        var y = 3;
                        var degrees = 90;
                        var rotated_point = rotate_point(x, y, degrees);
                        console.log("Original point: (" + x + ", " + y + ")");
                        var msg = "Rotated point: (" + rotated_point[0] + ", ";
                        msg += rotated_point[1] + ")";
                        console.log(msg);
               
                        return;
                }
                // ==============================================================
                // Rotate a point (x, y) by degrees degrees.
                // Returns the coordinates of the rotated point as a two item
                // array in the format [x, y]
                // ==============================================================
                function rotate_point(x, y, degrees) {
               
                        // convert cartesian point to polar representation
                        var r = Math.sqrt((x * x) + (y * y));
                        var theta = Math.atan(y / x);
                        // add rotation degrees to polar coordinates
                        // (degrees must be converted to radians before addition?)
                        // 2 pi radians = 360 degrees
                        // pi radians = 180 degrees
                        // (pi / 180) radians = 1 degree
                        var radians = degrees * (Math.PI / 180);
                        theta += radians;                       
                        // account for rotation beyond 2 pi radians
                        // (i.e. one full revolution)
                        if (theta > Math.PI) {
                                var total_pi_multiples = Math.floor(theta / Math.PI);
                                var deduction = total_pi_multiples * Math.PI;
                                theta -= deduction;
                        }
                        // convert polar back to cartesian
                        // (adjust for positive/negative cos value, depending on
                        // quadrant? (cos is positive in the 1st and 4th quadrants?))
                        // i.e. cos is positive for the following ranges of theta;
                        //  0 degrees <= theta <=  90 degrees
                        // 270 degrees <= theta <= 360 degrees
                        // i.e.
                        //  0 pi <= theta <= pi / 2
                        // 3/2 pi <= theta <= 2 pi
                        // As theta is currently in radians, we'll use the radian units
                        var cos_theta = Math.cos(theta);
                        if ((cos_theta >= 0) && (cos_theta <= (Math.PI / 2))) {
                                cos_theta = Math.abs(cos_theta);
                        }
                        if ((cos_theta >= (Math.PI * 1.5)) && (cos_theta <= (Math.PI * 2))) {
                                cos_theta = Math.abs(cos_theta);
                        }
                       
                        // We'll need to adjust sin theta in a similar fashion to above with cos
                        // sin is positive in the first and second quadrants. Adjust accordingly.
                        var sin_theta = Math.sin(theta);
                        // two adjoining quadrants = one big semicircular segment to check
                        if ((sin_theta >= 0) && (sin_theta <= Math.PI))
                                sin_theta = Math.abs(sin_theta);
                        x = r * cos_theta;
                        y = r * sin_theta;

                        return [x, y];
                }
                // ==============================================================               
                </script>
       
       
        </head>
       
        <body>
       
                <button onclick="rotate_test()">Rotate Test</button>
       
        </body>


</html>

Any ideas where I'm going wrong?

:) ]]>
Game Development Miktor http://forums.devshed.com/game-development-141/rotation-function-javascript-979275.html
<![CDATA[[1QCloud.com]★Amazing deal!★Lifetime 50% OFF★US Xen Cloud Servers★From $4.97/mo]]> http://forums.devshed.com/web-hosting-offers/979274-1qcloud-com-amazing-deal-lifetime-50-xen-cloud-servers-4-97-mo-new-post.html Tue, 17 Oct 2017 12:37:08 GMT ***SPECIAL OFFER! **** HURRY UP!* * Need an enterprise quality cloud server solution at costs that are BEYOND BELIEF? We’ll get you started in seconds!* A Reliable Cloud Server Provider *1QCloud.com* (http://www.1QCloud.com) is a cloud server provider devoted to bringing you the high quality cloud hosting services at low costs. We are a team of *Cisco, Red Hat, Debian, FreeBSD*...
**SPECIAL OFFER! **
HURRY UP!


Need an enterprise quality cloud server solution at costs that are BEYOND BELIEF? We’ll get you started in seconds!


A Reliable Cloud Server Provider

1QCloud.com is a cloud server provider devoted to bringing you the high quality cloud hosting services at low costs.
We are a team of Cisco, Red Hat, Debian, FreeBSD certified experts, with 10+ years of experience in implementing and managing IT infrastructures for small businesses and large enterprises.

Professional technical support 24/7 with the fastest response time is guaranteed.

Our cloud hosting infrastructure is based on powerful SuperMicro enterprise hardware. The data is stored in the most secure SSD grade RAID 10 storage systems that offer top-quality business agility and exceptional application uptime.
We are not using VZ - all our cloud servers are Xen-based, with guaranteed resource allocation.

Our equipment is located in the C7’s Salt Lake City Datacenter, which is a certified Tier III capacity enabling a seamless operation with 99.9% uptime.

Learn more about our hosting infrastructure with the unlimited security and reliability.

Cloud Server Features:

  • Instant deployment

  • Guaranteed resources

  • Easily scalable

  • 24/7 professional customer support

  • 99.9% uptime guarantee

  • 30 days money back guarantee

  • Availability, flexibility, self-healing and automatic failover with the industry-leading OnApp cloud platform

  • Extensive security and fail-safe redundancy in the certified Tier III datacenter

  • Full IPv6 support


OUTSTANDING SALE!

50% OFF FOR LIFE


coupon supply limited, HURRY while it lasts!

coupon code: 50OFF


We have 6 Plans to choose from:

1 unit
  • 1 core CPU
  • 1 GB RAM
  • 30 GB disk
  • traffic unlimited
  • $9.95/mo - $4.97/mo

    ORDER NOW

2 units
  • 1 core CPU
  • 2 GB RAM
  • 60 GB disk
  • traffic unlimited
  • $19.95/mo - $9.97/mo

    ORDER NOW

4 units
  • 1 core CPU
  • 4 GB RAM
  • 120 GB disk
  • traffic unlimited
  • $39.95/mo - $19.97/mo

    ORDER NOW

8 units
  • 2 core CPU
  • 8 GB RAM
  • 240 GB disk
  • traffic unlimited
  • $79.95/mo - $39.97/mo

    ORDER NOW

16 units
  • 4 core CPU
  • 16 GB RAM
  • 480 GB disk
  • traffic unlimited
  • $149.95/mo - $74.97/mo

    ORDER NOW

32 units
  • 8 core CPU
  • 32 GB RAM
  • 960 GB disk
  • traffic unlimited
  • $279.90/mo - $139.95/mo

    ORDER NOW


--------------------------------------------------------------------------
You can also check out some tests:

Speedtest result from a running cloud server

Download test

Speedtest hosted on a cloud server

Test host/IP:
test.1qcloud.com (185.72.156.4)
---------------------------------------------------------------------------


For additional details, contact us through our website http://www.1qcloud.com/
Thanks for visiting!
]]>
Web Hosting Offers 1Q Cloud http://forums.devshed.com/web-hosting-offers-100/1qcloud-com-amazing-deal-lifetime-50-xen-cloud-servers-4-97-mo-979274.html
<![CDATA[PyAudio Example program: [Errno Input overflowed] - CHANNELS]]> http://forums.devshed.com/python-programming/979273-pyaudio-example-program-errno-input-overflowed-channels-new-post.html Tue, 17 Oct 2017 10:19:39 GMT It seems there are more than 1 solution to this, including buffer size, sample rate etc, but I have not seen this one given elsewhere.

In case anyone is having problems running the pyaudio examples like I was please see if this is not your issue

I was running the "Record a few seconds of audio and save to a WAVE file" example program

The error I got was

Traceback (most recent call last):
File "rec_and_play.py", line 46, in <module>
data = input_stream.read(BUFFER_SIZE)
File "/usr/lib/python2.7/dist-packages/pyaudio.py", line 605, in read
return pa.read_stream(self._stream, num_frames)
IOError: [Errno Input overflowed] -9981

Code:

import audioop
To show more I placed this under 'for i in range(...)'
Code:

    data = input_stream.read(BUFFER_SIZE)
    mx = audioop.max(data, 2)
    print mx

The error appeared after a few (2-5) frames lengths were printed

please check the CHANNELS variable.
My audio was mono and it needed CHANNELS=1 in both input and output (if you are using the output). For my situation, this solved the problem.

Technically, of course, this is my error and not the fault of the program. ]]>
Python Programming ocpaul20 http://forums.devshed.com/python-programming-11/pyaudio-example-program-errno-input-overflowed-channels-979273.html
<![CDATA[♛[VPSnet.com] - Fast SSD VPS in Europe| From 2.10 $ 1GB RAM, 30-DAYS MONEY BACK♛]]> http://forums.devshed.com/web-hosting-offers/979272-vpsnet-com-fast-ssd-vps-europe-2-10-1gb-ram-30-days-money-new-post.html Tue, 17 Oct 2017 08:47:36 GMT *VPSNET.COM DELIVERS SECURE, RELIABLE AND AFFORDABLE VPS HOSTING SOLUTIONS* *VPSnet.com* (https://www.vpsnet.com/en) *offers reliable, affordable servers and has been specializing in the field of data centre services since 2007. By choosing the services of VPSnet.com, customers both reduce their expenditures and save time*. Running the own data centre, VPSnet.com controls the total...
VPSNET.COM DELIVERS SECURE, RELIABLE AND AFFORDABLE VPS HOSTING SOLUTIONS




VPSnet.com offers reliable, affordable servers and has been specializing in the field of data centre services since 2007.
By choosing the services of VPSnet.com, customers both reduce their expenditures and save time
.

Running the own data centre, VPSnet.com controls the total service provision process, so it can both provide complex services and ensure high service availability for a competitive price. Flexible solutions, long-term experience, a competitive service price and a constant improvement process – this is why You should be considered for choosing us.

At this time VPSnet.com has significantly increased VPS resources. From now on all VPS servers will have up to double resources for the same price:

VPS-1
  • 1GB RAM
  • 2Ghz/1 core CPU
  • 10GB SSD
  • 50Mbps uplink
  • Unlimited transfer
  • Daily Backups
  • 1x IPv4
  • /112 (65,536 IPs) IPv6
  • OpenVZ/Custom
  • $2.10/month
  • <CLICK HERE TO GET STARTED>

VPS-2
  • 2GB RAM
  • 3Ghz/1 core CPU
  • 15GB SSD
  • 80Mbps uplink
  • Unlimited transfer
  • Daily Backups
  • 1x IPv4
  • /112 (65,536 IPs) IPv6
  • OpenVZ/Custom
  • $3.1/month
  • <CLICK HERE TO GET STARTED>

VPS-3
  • 3GB RAM
  • 4Ghz/2 cores CPU
  • 20GB SSD
  • 100Mbps uplink
  • Unlimited transfer
  • Daily Backups
  • 1x IPv4
  • /112 (65,536 IPs) IPv6
  • OpenVZ/Custom
  • $4.19/month
  • <CLICK HERE TO GET STARTED>

VPS-4
  • 4GB RAM
  • 5Ghz/2 cores CPU
  • 30GB SSD
  • 100Mbps uplink
  • Unlimited transfer
  • Daily Backups
  • 1x IPv4
  • /112 (65,536 IPs) IPv6
  • OpenVZ/Custom
  • $5.77/month
  • <CLICK HERE TO GET STARTED>


Click here for more VPS plans


All VPS come with:
  • Instant activation
  • Daily backups
  • Professional support team
  • 30-day money-back guarantee
  • High frequency CPU cores (higher or equal to 3.4 ghz per core)
  • Easy to use control panel
  • Premium network
  • High quality equipment
  • TUN/TAP support
  • Manual reverse DNS (PTR) management
  • Ability to manage resources
  • Possibility to order/renew for 1 day
  • Get IPv6 address for free
  • Possibility to upgrade server resources in any time for free (trading resources with expiration date)
  • And more



Wide range of payment methods:
  • Credit/Debit cards
  • PayPal
  • WebMoney
  • E-banking systems
  • PaySera
  • SafetyPay
  • CashU
  • Bank wire transfer
  • SMS messages
  • And many others


Maximum availability, the best performance, and professional customer service
Allow us the opportunity to exceed your expectations



Terms of Service, Privacy Policy and other legal info can be found here


Have any questions? Click <Click Here> to get in touch and a friendly member of staff will get back to you as soon as possible!

Our other services:


Network information
Vilnius, Lithuania
Test IPv4: 91.211.244.3
Test IPv6: 2a05:7cc0::3


--
VPSnet.com Administration
UAB ESNET
https://www.vpsnet.com/ ]]>
Web Hosting Offers VPSnet http://forums.devshed.com/web-hosting-offers-100/vpsnet-com-fast-ssd-vps-europe-2-10-1gb-ram-30-days-money-979272.html