php-general Digest 9 May 2009 12:42:16 -0000 Issue 6112

Topics (messages 292412 through 292415):

Re: CURL error help
        292412 by: Jônatas Zechim

Re: how to enable ttf support in php 5.2.9
        292413 by: Ross McKay

Re: Problems with HTTPS and maybe an .htaccess???
        292414 by: Ross McKay

Re: [email protected], Tim-Hinnerk Heuer has invited you to open a 
Google mail account
        292415 by: Nathan Rixham

Administrivia:

To subscribe to the digest, e-mail:
        [email protected]

To unsubscribe from the digest, e-mail:
        [email protected]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
U r correct! It's ok know.


-----Mensagem original-----
De: Shawn McKenzie [mailto:[email protected]] 
Enviada em: sexta-feira, 8 de maio de 2009 13:34
Para: Miller, Terion
Cc: Jônatas Zechim; PHP-General List
Assunto: Re: RES: RES: RES: [PHP] CURL error help

Miller, Terion wrote:
> 
> 
> On 5/8/09 10:55 AM, "Jônatas Zechim" <[email protected]> wrote:
> 
> Ok, but u need to confirm  the $args vars are being passed to that
funtion,
> because I thing they're blanks.
> 
> Zechim
> zechim.com
> São Paulo/Brazil
> 
> here is the code from the dom.php file, as it stands currently my error
reads:
> 
> 
> Warning: file_get_contents($target_url) [function.file-get-contents]:
failed to open stream: No such file or directory in
/var/www/vhosts/getpublished.news-leader.com/httpdocs/Warrants/inc/dom.php
on line 39
> 
> Here is the code from dom.php:
> 
> 
> define('HDOM_TYPE_ELEMENT', 1);
> define('HDOM_TYPE_COMMENT', 2);
> define('HDOM_TYPE_TEXT',    3);
> define('HDOM_TYPE_ENDTAG',  4);
> define('HDOM_TYPE_ROOT',    5);
> define('HDOM_TYPE_UNKNOWN', 6);
> define('HDOM_QUOTE_DOUBLE', 0);
> define('HDOM_QUOTE_SINGLE', 1);
> define('HDOM_QUOTE_NO',     3);
> define('HDOM_INFO_BEGIN',   0);
> define('HDOM_INFO_END',     1);
> define('HDOM_INFO_QUOTE',   2);
> define('HDOM_INFO_SPACE',   3);
> define('HDOM_INFO_TEXT',    4);
> define('HDOM_INFO_INNER',   5);
> define('HDOM_INFO_OUTER',   6);
> define('HDOM_INFO_ENDSPACE',7);
> 
> // helper functions
> //
----------------------------------------------------------------------------
-
> // get html dom from file
> function file_get_html() {
>    $dom = new simple_html_dom;
>    $args = func_get_args();
>    $dom->load(call_user_func_array('file_get_contents', $args), true);
>    return $dom;
> 
> }
> 
> // get html dom from string
> function str_get_html($str, $lowercase=true) {
>    $dom = new simple_html_dom;
>    $dom->load($str, $lowercase);
>    return $dom;
> }
> 
> // dump html dom tree
> function dump_html_tree($node, $show_attr=true, $deep=0) {
>    $lead = str_repeat('    ', $deep);
>    echo $lead.$node->tag;
>    if ($show_attr && count($node->attr)>0) {
>        echo '(';
>        foreach($node->attr as $k=>$v)
>            echo "[$k]=>\"".$node->$k.'", ';
>        echo ')';
>    }
>    echo "\n";
> 
>    foreach($node->nodes as $c)
>        dump_html_tree($c, $show_attr, $deep+1);
> }
> 
> // get dom form file (deprecated)
> function file_get_dom() {
>    $dom = new simple_html_dom;
>    $args = func_get_args();
>    $dom->load(call_user_func_array('file_get_contents', $args), true);
>    return $dom;
> }
> 
> // get dom form string (deprecated)
> function str_get_dom($str, $lowercase=true) {
>    $dom = new simple_html_dom;
>    $dom->load($str, $lowercase);
>    return $dom;
> }
> 
> 

I've answered your question.  It's not in that file it's in your
function call to file_get_html().  You've got your parameter variable in
single frigging quotes!

-- 
Thanks!
-Shawn
http://www.spidean.com


--- End Message ---
--- Begin Message ---
On Tue, 5 May 2009 17:27:57 -0400, tedd.sperling wrote:

>I have one client who no matter how many times I talk to him about 
>gremlins and how he should make sure his entries are plain text, he 
>still cuts and paste things directly from M$ Word and then wonders 
>"Where did those come from? They weren't there when I added that 
>text. What did you do?"

If that's using TinyMCE, enable the Paste From Word button (or the Paste
as Plain Text button) and disable the regular Paste button :)
-- 
Ross McKay, Toronto, NSW Australia
"Pay no attention to that man behind the curtain" - Wizard of Oz

--- End Message ---
--- Begin Message ---
On Tue, 05 May 2009 13:20:56 -0500, Skip Evans wrote:

>[...]
>But now I have a problem implementing this on their 
>development site, which is just a duplicate code base inside a 
>directory public_html/_dev and a domain name dev.sitename.com, 
>instead of sitename.com.
>
>The problem is, and I believe it may be the .htaccess file, 
>redirecting the https pages to the live [...]

You should be telling the browser to redirect to the new page, rather
than just pulling up a page to offer back instead of the requested URL.
You want the browser to request a new page, using HTTPS (i.e. SSL or
TLS). See here, which forces a redirect to HTTPS for any pages in the
orders folder that have been requested via HTTP:

RewriteCond %{SERVER_PORT}  !443$
RewriteRule ^orders/?.*$    https://%{SERVER_NAME}/orders [R=301,L]

The bit at the end, R=301 makes Apache tell the browser to ask for
another page at the new URL.

The %{SERVER_NAME} bit tells Apache to insert the server name, whether
it be your sitename.com or dev.sitename.com
-- 
Ross McKay, Toronto, NSW Australia
"Let the laddie play wi the knife - he'll learn"
- The Wee Book of Calvin

--- End Message ---
--- Begin Message ---
Lenin wrote:
Yeah gmail is a nice thing :)

The best ever mailing system world has ever seen until now.


Because now you can get new LeninMail from phpXperts - it works offline, it works in your fridge, you car, your bath, everywhere conventional mail doesn't work.

LeninMail combines all the power of E with all the functionality of G to give you a new experience unparalleled by any other technology.

Sheena from Cambridge:
"LeninMail is sooooooo good, all I need is one spoonful in my bath and I'm ready to communicate, stubborn limescale used to be a real headache, but now I just LeninMail it away."

James Smith JNR from Ghana
"LeninMail is amazing - its handy SendAnythingAnywhere feature has allowed me to be lmailing my grade A spam from everywhere I go - and with LeninMails ForceItThrough technology I know my spam will be penetrating millions of peoples brains in seconds. LMail has made me rich and now I have 60 million that I need to transfer to you, all you need to do is send me a 1% security fee to.."

L is over FIVE letters after G and even more than E - so much power - such bigger numbers.

BANG and the mail is gone.

Get LeninMail from all good phpXperts stockists NOW!

--- End Message ---

Reply via email to