Re: [PHP] Problems with CURL using an HTTP Proxy on PHP5
On Fri, Dec 16, 2011 at 10:09 PM, Francisco M. Marzoa Alonso wrote: > > I know it is NOT a problem with the website, because if I comment out > the line curl_setopt ($ch, CURLOPT_HTTPPROXYTUNNEL, 1) disabling the use > of a proxy, it works fine. > > I know the proxy is working fine, because if I use curl from command > line like: > > curl -x 1.2.3.4: http://mycheckhost.com/ > CURLOPT_HTTPPROXYTUNNEL is not for enabling/disabling proxy, it's for proxy tunneling. On the command line you should try curl --proxytunnel -x 1.2.3.4: http://mycheckhost.com/ to check if tunneling works. Do you really need a tunnel? Cheers, Matijn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Online Form Creation
On Dec 21, 2011, at 2:14 AM, Christopher Lee wrote: > Hello All, > > I have two forms (see attached) that I would like to recreate and enable the > user to complete the form online. The data would be collected in a MySQL DB. > > http://ucensys.com/activities.pdf > > http://ucensys.com/guidelines.pdf > > You will see that the forms are in a matrix format. I am having trouble > figuring out the best way to create the form and ensure the data is collected > properly in the DB. Any suggestions would be greatly appreciated. > > Best, > > Christopher I don't see a problem here. 1. Figure out how to create a HTML form (Investigate HTML tables). 2. Then write a PHP that will scrub the data and submit it to MySQL. The length and layout of the forms are of no significance. This is basic html/php -- try creating something and submit your work for our review. If you want us to write the code for you, please look elsewhere. Cheers, tedd _ t...@sperling.com http://sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Unique items in an array
Hi folks, I just wanted to add a little something to this thread as I reworked some of the code and came across an interesting tidbit. I was trying to merge many result sets which now had the table's primary key as the array key, but found that when array_merge() was done, all of the array's keys were lost, like so: array(2) { [704]=> array(36) { ["contact_id"]=> string(3) "704" ["contact_first_name"]=> string(4) "Marc" ["contact_last_name"]=> string(4) "Guay" } [705]=> array(36) { ["contact_id"]=> string(3) "705" ["contact_first_name"]=> string(4) "Marc" ["contact_last_name"]=> string(5) "Guay2" } } array_merge with: array(0) { } left me with: array(2) { [0]=> array(36) { ["contact_id"]=> string(3) "704" ["contact_first_name"]=> string(4) "Marc" ["contact_last_name"]=> string(4) "Guay" } [1]=> array(36) { ["contact_id"]=> string(3) "705" ["contact_first_name"]=> string(4) "Marc" ["contact_last_name"]=> string(5) "Guay2" } } Pretty crummy. Apparently what I wanted was as simple as: $new_array = $array1 + $array2, which I didn't even know was an option. Thank you php.net/manual. Marc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php