php-general Digest 19 Feb 2004 12:16:25 -0000 Issue 2599

Topics (messages 178194 through 178236):

Re: checking users have the latest version of a file
        178194 by: Chris W. Parker
        178196 by: daniel.electroteque.org
        178197 by: daniel.electroteque.org
        178198 by: daniel.electroteque.org
        178202 by: Jason Wong
        178220 by: Marek Kilimajer
        178229 by: daniel.electroteque.org

fonts
        178195 by: Jake McHenry
        178199 by: Jake McHenry
        178201 by: Ryan A
        178203 by: Jake McHenry
        178207 by: Binay
        178212 by: Paul Furman
        178214 by: - Edwin -
        178216 by: - Edwin -

Re: diskusage
        178200 by: Chakravarthy Cuddapah
        178217 by: - Edwin -

Re: Recursive Select Box
        178204 by: Matt Palermo

Mimetypes and image uploads
        178205 by: daniel.electroteque.org

Re: Parse Error
        178206 by: Bob Eldred
        178213 by: - Edwin -
        178218 by: Bob Eldred

Re: How to detect session expiry
        178208 by: Binay

Re: Is it posible to embed scripts from other server?
        178209 by: Binay

Re: fopen errors
        178210 by: John Nichel

Re: PHP Header to stimulate a POST method or POST string????
        178211 by: John Nichel
        178215 by: daniel.electroteque.org

Re: PDF - Coords
        178219 by: Juan Torres
        178222 by: Jyry Kuukkanen
        178224 by: Juan Torres

Re: SWFShape HOW TO DRAW ELLIPSE????
        178221 by: Marco Schuler

Make Php with ALL modules / options
        178223 by: Dave Carrera

Handle NTLM Logins with PHP
        178225 by: Korn.Christopher.SWM.DE
        178226 by: Stuart
        178228 by: Korn.Christopher.SWM.DE
        178230 by: Stuart

Re: Nested Loops
        178227 by: Ford, Mike               [LSS]

PHPSESSID and URL rewriting
        178231 by: Seba
        178236 by: Seba

generate a image link with php
        178232 by: Dominique ANOKRE
        178233 by: Stuart
        178234 by: Nguyen Huu Hoa
        178235 by: Dominique ANOKRE

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 ---
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
    on Wednesday, February 18, 2004 3:42 PM said:

> Hi there i am developing a collaboration filespace, i was wondering if
> there is any way either using diff or filesize to check if users have
> the latest version of a file before uploading their copy ?

md5 the file.

i assume YOU will know which file is the latest version. if their hash
does not match your hash they don't have the same file and should
therefore be updated.

> Let me know thankyou.

ok sure no problem.


chris.

--- End Message ---
--- Begin Message ---
I dont understand what you are doing with the md5, and

i assume YOU will know which file is the latest version.

this is what i have to try and find out to prevent that.

> [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
>    on Wednesday, February 18, 2004 3:42 PM said:
>
>> Hi there i am developing a collaboration filespace, i was wondering if
>> there is any way either using diff or filesize to check if users have
>> the latest version of a file before uploading their copy ?
>
> md5 the file.
>
> i assume YOU will know which file is the latest version. if their hash
> does not match your hash they don't have the same file and should
> therefore be updated.
>
>> Let me know thankyou.
>
> ok sure no problem.
>
>
> chris.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
> I dont understand what you are doing with the md5, and
>
> i assume YOU will know which file is the latest version.
>
> this is what i have to try and find out to prevent that.
>
>> [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
>>    on Wednesday, February 18, 2004 3:42 PM said:


What i'm gonna ask is, would simply checking that the new file being upload
is larger than the latest file updated work ?

--- End Message ---
--- Begin Message ---
> I dont understand what you are doing with the md5, and
>
> i assume YOU will know which file is the latest version.
>
> this is what i have to try and find out to prevent that.
>

How could i check for date modified on an uploaded file ?

--- End Message ---
--- Begin Message ---
On Thursday 19 February 2004 09:19, [EMAIL PROTECTED] wrote:

> What i'm gonna ask is, would simply checking that the new file being upload
> is larger than the latest file updated work ?

Only if the latest version is always larger than the previous versions.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Knocked, you weren't in.
                -- Opportunity
*/

--- End Message ---
--- Begin Message --- [EMAIL PROTECTED] wrote:
I dont understand what you are doing with the md5, and

i assume YOU will know which file is the latest version.

this is what i have to try and find out to prevent that.



How could i check for date modified on an uploaded file ?


Not possible. Uploaded files have modification times set to the time of upload.

--- End Message ---
--- Begin Message ---
I was considering my only last options is diff and filesize, but then i was
thinking say the latest file is a size of 1mb, the copy of the users machine
is 2mb but is still not in sync with the latest copy then . sorry to trouble
you about this, i would have intergrated php with cvs viewer, but this type
of infrastructure would be painful to get onto the public server, being that
i still dont have cvs on my development machine i insisted i get, therefore
the only way i could get it on in a short time would be to do it myself but
i doubt that can happen hehe ;)

--- End Message ---
--- Begin Message ---
is there a way I can have a special font on a page, and if the viewer doesn't have 
that font, have it auto downloaded and installed?

Thanks,
Jake

--- End Message ---
--- Begin Message ---
----- Original Message ----- 
From: <[EMAIL PROTECTED]>
To: "Jake McHenry" <[EMAIL PROTECTED]>
Sent: Wednesday, February 18, 2004 8:07 PM
Subject: Re: [PHP] fonts


> leaving aside the obvious serious security implications of what 
> you're after, you're assuming that you'll be able to accurately 
> determine the OS of the user's machine and have the font set 
> available.  this seems unlikely.
> 
> 
> 
> ---------- Original Message ----------
> > From: Jake McHenry <[EMAIL PROTECTED]>
> > To: [EMAIL PROTECTED]
> > Date: Wednesday, February 18, 2004 07:56:09 PM -0500
> > Subject: [PHP] fonts
> >
> > is there a way I can have a special font on a page, and if the
> > viewer doesn't have that font, have it auto downloaded and
> > installed?
> >
> > Thanks,
> > Jake
> 
> ---------- End Original Message ----------
> 
> 
> 



it's for my intranet, figured it might be easier this way instead of
touching every machine. All my machines are either on 98 or XP, which both
will use the same font. I've manually installed it on 4 machines so far, 2
xp and 2 98, but have around 950 left.

can I do it?

Jake

--- End Message ---
--- Begin Message ---
Ummm, if displaying just webpages and the font is so important...cant you
just make image files (ie. JPG) or
am I missing something?

-Ryan


On 2/19/2004 2:36:30 AM, Jake McHenry ([EMAIL PROTECTED]) wrote:
> ----- Original Message -----
> From: <[EMAIL PROTECTED]>
> To: "Jake McHenry" <[EMAIL PROTECTED]>
> Sent: Wednesday, February 18, 2004 8:07 PM
> Subject: Re: [PHP] fonts
>
>
> > leaving aside the obvious serious security implications of what
> > you're after, you're assuming that
> you'll be able to accurately
> > determine the OS of the user's machine
> and have the font set
> > available.  this seems unlikely.
> >
> >
> >
> > ---------- Original Message ----------
> > > From: Jake McHenry <[EMAIL PROTECTED]>
> > > To: [EMAIL PROTECTED]
> > > Date: Wednesday, February 18, 2004 07:56:09 PM -0500
> > > Subject: [PHP] fonts
> > >
> > > is there a way I can have a special font on a page, and if the
> > > viewer
> doesn't have that font, have it auto downloaded and
> > > installed?
> > >
> > > Thanks,
> > > Jake
> >
> > ---------- End Original Message ----------
> >
> >
> >
>
>
>
> it's
> for my intranet, figured it might be easier this way instead of
> touching every machine. All my machines are either on 98 or XP, which
> both
> will use the same font. I

--- End Message ---
--- Begin Message ---
----- Original Message ----- 
From: "Ryan A" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, February 18, 2004 10:02 PM
Subject: Re: [PHP] fonts


> Ummm, if displaying just webpages and the font is so important...cant you
> just make image files (ie. JPG) or
> am I missing something?
>
> -Ryan
>
>
> On 2/19/2004 2:36:30 AM, Jake McHenry ([EMAIL PROTECTED]) wrote:
> > ----- Original Message -----
> > From: <[EMAIL PROTECTED]>
> > To: "Jake McHenry" <[EMAIL PROTECTED]>
> > Sent: Wednesday, February 18, 2004 8:07 PM
> > Subject: Re: [PHP] fonts
> >
> >
> > > leaving aside the obvious serious security implications of what
> > > you're after, you're assuming that
> > you'll be able to accurately
> > > determine the OS of the user's machine
> > and have the font set
> > > available.  this seems unlikely.
> > >
> > >
> > >
> > > ---------- Original Message ----------
> > > > From: Jake McHenry <[EMAIL PROTECTED]>
> > > > To: [EMAIL PROTECTED]
> > > > Date: Wednesday, February 18, 2004 07:56:09 PM -0500
> > > > Subject: [PHP] fonts
> > > >
> > > > is there a way I can have a special font on a page, and if the
> > > > viewer
> > doesn't have that font, have it auto downloaded and
> > > > installed?
> > > >
> > > > Thanks,
> > > > Jake
> > >
> > > ---------- End Original Message ----------
> > >
> > >
> > >
> >
> >
> >
> > it's
> > for my intranet, figured it might be easier this way instead of
> > touching every machine. All my machines are either on 98 or XP, which
> > both
> > will use the same font. I
>

Image files for the entire website? I want this to be the standard font for
the text of the site.

--- End Message ---
--- Begin Message ---
Hi
I think u need to embed particular font into ur pages and save ur self from
the hassle of auto downloading of the font in case the users don have(that
font).

http://www.tijs.org/embed/

Read above article which will more clarify the scenario.

Thanks

Binay

----- Original Message -----
From: "Jake McHenry" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 19, 2004 6:26 AM
Subject: [PHP] fonts


is there a way I can have a special font on a page, and if the viewer
doesn't have that font, have it auto downloaded and installed?

Thanks,
Jake

--- End Message ---
--- Begin Message --- Jake McHenry wrote:


it's
for my intranet, figured it might be easier this way instead of
touching every machine. All my machines are either on 98 or XP, which
both will use the same font.


There is such a thing as embedding fonts in a web page. I don't know the specifics but it exists.
--- End Message ---
--- Begin Message ---
On Wed, 18 Feb 2004 22:09:13 -0500
"Jake McHenry" <[EMAIL PROTECTED]> wrote:

[...]

> Image files for the entire website? I want this to be the
> standard font for the text of the site.

Then why not just use standard fonts that exist on the clients?

--

- E -

--- End Message ---
--- Begin Message ---
On Wed, 18 Feb 2004 20:36:30 -0500
"Jake McHenry" <[EMAIL PROTECTED]> wrote:

> it's for my intranet, figured it might be easier this way
> instead of touching every machine. All my machines are either
> on 98 or XP, which both will use the same font. I've manually
> installed it on 4 machines so far, 2 xp and 2 98, but have
> around 950 left.
> 
> can I do it?

Why not? A minute for each and you can finish it in less than a
day if my calculations were correct ;)

Or, try stylesheets: (And since you mentioned 98 or XP, this
might just work for you.)

<style type="text/css">
<!--
  @font-face {
    font-family: "mysuperfont";
    src:url(/location/of/my/superfont.eot);
  }
  h1 {
    font-family: "mysuperfont";
  }
//-->
</style>

For conversion of your fonts to .eot format, check:

  http://www.microsoft.com/typography/web/embedding/weft3/

And, pls. trim your posts!

--

- E -

"I may have invented it [Ctrl-Alt-Delete],
  but Bill made it famous." - David Bradley

--- End Message ---
--- Begin Message ---
From the terminal I can do this by:
ssh [EMAIL PROTECTED] du -hs /home/user | awk '{print $1}'

The same does not work in php. I used system and also shell_exec. Works only on localhost. But not remote system.

Appreciate any help.




----Original Message Follows---- From: "John W. Holmes" <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: Chakravarthy Cuddapah <[EMAIL PROTECTED]> CC: [EMAIL PROTECTED] Subject: Re: [PHP] diskusage Date: Mon, 16 Feb 2004 15:17:52 -0500

Chakravarthy Cuddapah wrote:
In php I want to know space used (du) by user on a remote system. Can anyone pls tell me how this can be done.

Just call du through exec().


--
---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

_________________________________________________________________
Take off on a romantic weekend or a family adventure to these great U.S. locations. http://special.msn.com/local/hotdestinations.armx

--- End Message ---
--- Begin Message ---
On Wed, 18 Feb 2004 21:21:45 -0500
"Chakravarthy Cuddapah" <[EMAIL PROTECTED]> wrote:

> From the terminal I can do this by:
> ssh [EMAIL PROTECTED] du -hs /home/user | awk '{print $1}'

Hmm... that's a pretty scary setup. You can ssh as root? Without
a password? I wouldn't want that kind of setup even if I'm using
"authorized_keys" and stuff. Anyway...

> The same does not work in php. I used system and also
> shell_exec. Works only on localhost. But not remote system.

Most likely it's because when you're running your (php) script
you're NOT running as root. Try running the script as root (from
the command line) and see what happens.

--

- E -

--- End Message ---
--- Begin Message ---
No, i'm using a MySQL DB.

"Justin Patrin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Matt Palermo wrote:
>
> > Hey everyone.  I'm looking for assistance/suggestions/answers on how to
> > build a select dropdown box from data that needs to be pulled
recursively
> > from a MySQL database.  Basically the situation is mainly for a
dicussion
> > thread system type of thing where I have categories nested inside
> > categories, nested inside categories...  Anyway, I want to be able to
build
> > a drop down box containing all the categories indented underneath it's
> > parent category to look something similar to this:
> >
> > -------------------------
> > Top Level Category
> >      - Nested Category
> >           - Lower level
> >                - Etc....
> > Top Level Category
> >      - Nested Category
> > Top Level Category
> > -------------------------
> >
> > Then the user will be able to select one from the dropdown menu.  I have
all
> > the categories stored in a MySQL database called site_categories.  The
table
> > is setup like this:
> >
> > __________________________________
> > | Cat_ID | Cat_Parent |       Cat_Name         |
> > |---------------------------------------------|
> > |    1       |         0         |       Top Level  1      |
> > |---------------------------------------------|
> > |    2       |         1         |       Nested 1            |
> > |---------------------------------------------|
> > |    3       |         0         |       Top Level   2     |
> > |---------------------------------------------|
> > |    4       |         2         |       Nested 2            |
> > |---------------------------------------------|
> >
> > Sorry for the bad pictures you hopefully you get the idea.  Anything
with a
> > 0 Cat_Parent is a Top Level category.  Then the others are all nested
inside
> > other categories that have the same Cat_ID as the nested categories
> > Cat_Parent.  I basically need help creating a properly indented dropdown
> > menu box using this structure from the database.  I assume I'm gonna
have to
> > use some sort of recursion here, but I'm not sure how to go about this.
> > Please help if you can.
> >
> > Thanks,
> >
> > Matt
> > http://sweetphp.com
>
> I'd suggest using a recursive function. (I'm assuming you're using PEAR
> DB...)
>
> function getSelect(&$db, $catParent = 0, $indent = '') {
>    $sth = $db->query('SELECT * FROM categories WHERE Cat_Parent =
> '.$catParent);
>    while($rec = $sth->fetchRow()) {
>      echo '<option
> value="'.$rec['Cat_ID'].'">'.$indent.$rec['Cat_Name'].'</option>';
>      getSelect($db, $rec['Cat_ID'], $indent.'  ');
>    }
> }
>
> $db = DB::connect('mysql://user:[EMAIL PROTECTED]/db');
> $db->setFetchMode(DB_FETCHMODE_ASSOC);
> echo '<select name="selectBox">';
> getSelect($db);
> echo '</select>';
>
> I think that will work ;-)
>
>
> --
> paperCrane <Justin Patrin>

--- End Message ---
--- Begin Message ---
I just discovered something totally bizarre with file uploads and mime
types, if i have the document open i am trying to upload say a word file
application/octet-stream and if i close the document application/msword ,
why is this ?

--- End Message ---
--- Begin Message ---
----- Original Message ----- 
From: "Jay Blanchard" <[EMAIL PROTECTED]>
To: "Rolf van de Krol" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Tuesday, February 17, 2004 9:06 AM
Subject: RE: [PHP] Parse Error
>
> The error is:
> Parse error: parse error, unexpected T_VARIABLE in
> /www/htdocs/rolfvand/thinkquest/browsercheck.php on line 46
> [/snip]
>
> All of your values are not enclosed with single quotes - the first
four
> are, last four aren't

That's almost definitely not the issue.  Worst case scenario with the
non-existent quotes is that MySQL will put bad information into the
database if it's expecting numbers there and gets a string, or the query
will fail if it's a string with whitespace.  It ought to parse just
fine.

Personally, I bet there's something not too far above the posted lines
that's bad.

Although the soon-to-follow query will look odd.
"$result=mysql_query($mysql_query);"

Bob

--- End Message ---
--- Begin Message ---
On Wed, 18 Feb 2004 21:35:15 -0800
"Bob Eldred" <[EMAIL PROTECTED]> wrote:

> > The error is:
> > Parse error: parse error, unexpected T_VARIABLE in
> > /www/htdocs/rolfvand/thinkquest/browsercheck.php on line 46
> > [/snip]
> >
> > All of your values are not enclosed with single quotes - the
> > first
> four
> > are, last four aren't
> 
> That's almost definitely not the issue.  Worst case scenario
> with the non-existent quotes is that MySQL will put bad
> information into the database if it's expecting numbers there
> and gets a string, or the query will fail if it's a string with
> whitespace.  It ought to parse just fine.

??

Your query wouldn't even be executed if you have a "parse error"
on your script. (So, it's not even possible for MySQL to "put bad
information into the database"...) Single quotes, double quotes,
semi-colon ought to be checked if one has "Parse error: parse
error, unexpected T_VARIABLE in blah blah blah"...

...[snip]...

--

- E -

--- End Message ---
--- Begin Message ---
Since I replied only to Edwin.

----- Original Message ----- 
From: "Bob Eldred" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 18, 2004 10:40 PM
Subject: Re: [PHP] Parse Error


> Yes.  Of course not.  That wasn't the point.  The point was that the
> parse error isn't caused by the lack of single quotes.
>
> Were everything else right in the script, that query would be just
fine.
>
> ----- Original Message ----- 
> From: "- Edwin -" <[EMAIL PROTECTED]>
> To: "Bob Eldred" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Wednesday, February 18, 2004 10:04 PM
> Subject: Re: [PHP] Parse Error
>
>
> > On Wed, 18 Feb 2004 21:35:15 -0800
> > "Bob Eldred" <[EMAIL PROTECTED]> wrote:
> >
> > > > The error is:
> > > > Parse error: parse error, unexpected T_VARIABLE in
> > > > /www/htdocs/rolfvand/thinkquest/browsercheck.php on line 46
> > > > [/snip]
> > > >
> > > > All of your values are not enclosed with single quotes - the
> > > > first
> > > four
> > > > are, last four aren't
> > >
> > > That's almost definitely not the issue.  Worst case scenario
> > > with the non-existent quotes is that MySQL will put bad
> > > information into the database if it's expecting numbers there
> > > and gets a string, or the query will fail if it's a string with
> > > whitespace.  It ought to parse just fine.
> >
> > ??
> >
> > Your query wouldn't even be executed if you have a "parse error"
> > on your script. (So, it's not even possible for MySQL to "put bad
> > information into the database"...) Single quotes, double quotes,
> > semi-colon ought to be checked if one has "Parse error: parse
> > error, unexpected T_VARIABLE in blah blah blah"...
> >
> > ...[snip]...
> >
> > --
> >
> > - E -
> >
> >
>

--- End Message ---
--- Begin Message ---
This question has been answered several times ... so search the archive ...

Binay
----- Original Message ----- 
From: "Radek Zajkowski (Mac)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 19, 2004 3:25 AM
Subject: [PHP] How to detect session expiry


> How do I tell if session has expired?
> 
> It would help me with providing the user with a comment such as: "your
> session has expired please login in again"
> 
> Thanks
> 
> R>
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
$fp =fopen("http://www.anotherserver.com/script.php","r";);

then read the required information using fread or fgets functions.

hope tht helps

Binay

----- Original Message -----
From: "The PHP Newbie" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 19, 2004 3:26 AM
Subject: [PHP] Is it posible to embed scripts from other server?


> HI there!
>
> Hope someone can help me with this: Is it posible to run a PHP script from
a different server than the one requesting the script.?
>
> I would like to know if u can do this with php, just like the Server
Includes in CGI and if u have an example of how to do it.
>
> I have a script in lets say www.myserverrightnow.com and this script needs
to call the info from a script from  www.anotherserver.com, is there a way
to stablish a connection between?
>
> Thanks for ur help!
>
>
> Regards,
>
> Luis Soriano.
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail SpamGuard - Read only the mail you want.

--- End Message ---
--- Begin Message --- admin wrote:
I have a PHP front end with a MySQL back end with a longblob field.

Okay?


I am thinking the problem exists in the PHP part.

Probably not.


Here is the code I am using:

$fileHandle = fopen($fileUpload, "r");
$fileContent = fread($fileHandle, $fileUpload_size);
$fileContent = addslashes($fileContent);

Then it goes into the Db connection part.

When I run the script I get the following error:

Warning: fopen("C:\\00000-temp\\100_0078.jpg", "r") -No such file or
directory in /var/www/testbed/httpdocs/blob/grabfile.php on line 41

Pretty self explanatory.


Warning Supplied argument is not a valid File-Handle resource in
/var/www/testbed/httpdocs/blob/grabfile.php on line 45

Direct result of the first error.


Then only thing that really jumps out at me in the file source path of
C:\\00000-temp\\100_0078.jpg  there is a couple of extra Backslashes (\)
in the path statement.

This really should be quite obvious. First, looks as if your script is running on a *nix box, yet you're trying to open a file using a Windoze directory structure. I'm going to say that this won't work. Two, it looks as if you're trying to read in an image...binary file...to enter it into a blob field in MySQL, so why are you going to 'addslashes()' to it"? Third.....well, I won't open that can of worms about storing your images in the DB....


I am using a sample script that pulled from one of the websites.

You need to modify the script to fit your environment.


--
By-Tor.com
It's all about the Rush
http://www.by-tor.com

--- End Message ---
--- Begin Message --- Scott Fletcher wrote:

This is what I get...

--snip--
1
Warning: fsockopen() [function.fsockopen]: php_hostconnect: connect failed
in /home/website/emarket/www/zz_test.php on line 4

Warning: fsockopen() [function.fsockopen]: unable to connect to
www.google.com:80 in /home/website/emarket/www/zz_test.php on line 4
[13] [Permission denied]
--snip--

Can the box where the script lives and runs hit google?


--
By-Tor.com
It's all about the Rush
http://www.by-tor.com

--- End Message ---
--- Begin Message ---
Firstly i luv the subject mwuahhaha, you may want to check out the pear
class HTTP_Request , it'll do post and get sockets.

--- End Message ---
--- Begin Message ---
¡Hola!

Excuse me, but my english is bad :(.

My problem is: When I'm writting text in a PDF document, I want to know the
current position, or next position of next text to insert.

I want to know when I'm near the finish page.

I hope that you can help me.

Thank you!
Juan Torres.

PD: Do you know Spain or spanish language? ;)


> ¹Hola!
>
> Maybe Señor Torres wanted to know the current position of drawing text or
> an image, that is not really possible - as far as I know - in producing
> PDF document.
>
> Juan, could you specify the actual problem you are facing? That might lead
> you to get the answer for your question.
>
>
>
> --
> Hienoja terveisiä
> --Jyry
> C|:-(    C|:-/    C|========8-O    C|8-/    C|:-(

--- End Message ---
--- Begin Message ---
On Thu, 19 Feb 2004, Juan Torres wrote:

> ¡Hola!
> 
> Excuse me, but my english is bad :(.
> 
> My problem is: When I'm writting text in a PDF document, I want to know the
> current position, or next position of next text to insert.
> 
> I want to know when I'm near the finish page.


¡Hola!

There is no need nor a reason to find out current position using PDF 
functions.

If you are outputting lines after lines, you need to keep track of the
y-position by yourself. The following simple and ugly piece of code should 
demostrate the logic:

define(MAX_Y_POS, 300);
define(ROW_HEIGHT, 4);
$y_pos = 0;
foreach ($many_rows as $row) {
    if ($y_pos > MAX_Y_POS) {
        makePageChange();
        $y_pos = 0;
    }; // if
    $y_pos += ROW_HEIGHT;

    printRow($row);
}; // foreach


If you use pdflib, you might want to take a look at sopdf.php - it's 
available from dataxi.sourceforge.net. Get the latest version of 
solib.tar.gz - that includes sopdf.php



> PD: Do you know Spain or spanish language? ;)

¡Si! Estudio español - este es segundo año, bastante listo :-)
Ahora leo un libro de Montalbán, de Pepe Carvalho :-)))

-- 
Regards,
--Jyry
C|:-(    C|:-/    C|========8-O    C|8-/    C|:-(

--- End Message ---
--- Begin Message ---
Thanks very much!
You are very nice.
If you want to practise your spanish, you can write me when you want.

Muchos saludos desde España.
Hasta pronto.

Juan Torres.

"Jyry Kuukkanen" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Thu, 19 Feb 2004, Juan Torres wrote:
>
> > ¡Hola!
> >
> > Excuse me, but my english is bad :(.
> >
> > My problem is: When I'm writting text in a PDF document, I want to know
the
> > current position, or next position of next text to insert.
> >
> > I want to know when I'm near the finish page.
>
>
> ¡Hola!
>
> There is no need nor a reason to find out current position using PDF
> functions.
>
> If you are outputting lines after lines, you need to keep track of the
> y-position by yourself. The following simple and ugly piece of code should
> demostrate the logic:
>
> define(MAX_Y_POS, 300);
> define(ROW_HEIGHT, 4);
> $y_pos = 0;
> foreach ($many_rows as $row) {
>     if ($y_pos > MAX_Y_POS) {
>         makePageChange();
>         $y_pos = 0;
>     }; // if
>     $y_pos += ROW_HEIGHT;
>
>     printRow($row);
> }; // foreach
>
>
> If you use pdflib, you might want to take a look at sopdf.php - it's
> available from dataxi.sourceforge.net. Get the latest version of
> solib.tar.gz - that includes sopdf.php
>
>
>
> > PD: Do you know Spain or spanish language? ;)
>
> ¡Si! Estudio español - este es segundo año, bastante listo :-)
> Ahora leo un libro de Montalbán, de Pepe Carvalho :-)))
>
> --
> Regards,
> --Jyry
> C|:-(    C|:-/    C|========8-O    C|8-/    C|:-(

--- End Message ---
--- Begin Message ---
Hi

Am Mi, 2004-02-18 um 20.37 schrieb Rostislav Kerey:
> Hi all,
>  How I can to draw ellipse with Ming functions?
>  I have found how to draw circle but not ellipse :(
>  Help me please!!!

Not tested and just pseudo-code (from a mathematical view):

for ($degree = 0; $degree <= 360; $degree++) {
    putPixel(x*cos($degree*pi/180), y*sin($degree*pi/180) );
}

--- End Message ---
--- Begin Message ---
Hi List,

Is there a way to easily install Php with ALL additional modules / options
available on FreeBSD 4.7 (not using ports) ?

The mods I can think of at the moment are

GD2+
ImageMagick
MySql
Zlib
XSLT

And any other ones that will make life easier

I ask as I have searched and search but there is no definitive answer to
this kind of question (unless I have not found it, which is more than
likely) and I bow the greater knowledge of my peers on this list for
guidance and or help / examples.

If I get a complete answer that works then I will make a web page for all of
us to utilize if this is required by others may be called (Install Php 4+
with all the bells and whistles) or something like that.

Thank you in advance for any help

Dave C

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.591 / Virus Database: 374 - Release Date: 17/02/2004
 

--- End Message ---
--- Begin Message ---
Hi List!

Is it possible to Handle logins via NTLM with PHP?
I can't find anything about this at google :(

Greetings, Chris

--- End Message ---
--- Begin Message --- [EMAIL PROTECTED] wrote:
Is it possible to Handle logins via NTLM with PHP?

Yes, but it would be quite involved and not really worth doing.


I can't find anything about this at google :(

Are you using Apache? If yes, a good starting point would be...


http://twiki.org/cgi-bin/view/Codev.WindowsInstallModNTLM

--
Stuart

--- End Message ---
--- Begin Message ---
> [EMAIL PROTECTED] wrote:
> > Is it possible to Handle logins via NTLM with PHP?
> 
> Yes, but it would be quite involved and not really worth doing.
>
> > I can't find anything about this at google :(
> 
> Are you using Apache? If yes, a good starting point would be...
> 
> http://twiki.org/cgi-bin/view/Codev.WindowsInstallModNTLM

Mhm. Thanks i think i'll try this. 
But I doubt only this is enought for me. 

Is there a way of running a script after trying this login procedure?

--- End Message ---
--- Begin Message --- [EMAIL PROTECTED] wrote:
Mhm. Thanks i think i'll try this. But I doubt only this is enought for me.

Is there a way of running a script after trying this login procedure?

mod_ntlm will handle all the authentication for you transparently. By the time Apache gets to executing your script you are assured that the user has authenticated and you can get their username from the $_SERVER['REMOTE_USER'] variable.


--
Stuart

--- End Message ---
--- Begin Message ---
On 18 February 2004 22:13, Alex Hogan wrote:

> Sorry...,
> 
> 
> 
> Line 17 is: print "<tr><td><a
> href=\"$id\">$row2[$rtxt]</a></td></tr>";

I haven't a clue what this is relating to (bit *too* much snippage there!), but I 
think that statement is going to need some curly braces to have a chance of working as 
intended:

   print "<tr><td><a href=\"$id\">{$row2[$rtxt]}</a></td></tr>";


Cheers!

Mike

---------------------------------------------------------------------
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730      Fax:  +44 113 283 3211 

--- End Message ---
--- Begin Message ---
Hi everyone,
I have this situation:
I use some regular expressions to rewrite  the URL of a web site,
in particular:
http://www.mysite.com/lingua-ita/colore-rosso/pagina.html
that becames
http://www.mysite.com/pagina.php?lingua=ita&colore=rosso.

Is all ok until I use some session variables.
It happens that the string  ?PHPSESSID=[valore] is merge to the link and
this will cause a damage in the URL rewriting.

Note that the string comes merged by the browser (Explorer, opera) to
the link I wrote before.
(http://www.mysite.com/lingua-ita/colore-rosso/pagina.html?PHPSESSID=f4s6f5d4fs65df4s65fd4).

Since the links first come in this format, then are rewroted by the rule
in the file htaccess and finally parsed by the webserver (apache , IIS),
How can I avoid it?

I tried with: 
RewriteRule (.*)?PHPSESSID=(.*) /PHPSESSID-$2/$1
as last rule, but it didn't work.

Can you help me?

thanks in advance
Seba

--- End Message ---
--- Begin Message ---
Hi everyone,
I have this situation:
I use some regular expressions to rewrite  the URL of a web site,
in particular:
http://www.mysite.com/lingua-ita/colore-rosso/pagina.html
that becames
http://www.mysite.com/pagina.php?lingua=ita&colore=rosso.

Is all ok until I use some session variables.
It happens that the string  ?PHPSESSID=[valore] is merge to the link and
this will cause a damage in the URL rewriting.

Note that the string comes merged by the browser (Explorer, opera) to
the link I wrote before.
(http://www.mysite.com/lingua-ita/colore-rosso/pagina.html?PHPSESSID=f4s6f5d4fs65df4s65fd4).

Since the links first come in this format, then are rewroted by the rule
in the file htaccess and finally parsed by the webserver (apache , IIS),
How can I avoid it?

I tried with: 
RewriteRule (.*)?PHPSESSID=(.*) /PHPSESSID-$2/$1
as last rule, but it didn't work.

Can you help me?

thanks in advance
Seba

--- End Message ---
--- Begin Message ---
how to generate a image link with php ?

i use this but it returns errors : 

print("<a href="image.htm">");
print("img src="image.jpg");
print("</a>");

Thanks

--- End Message ---
--- Begin Message --- Dominique ANOKRE wrote:
how to generate a image link with php ?

i use this but it returns errors :

print("<a href="image.htm">");
print("img src="image.jpg");
print("</a>");

Try...


print('<a href="image.htm">');
print('<img src="image.jpg">');
print('</a>');

And I'd suggest getting a beginners book from the selection here: http://php.net/books

--
Stuart

--- End Message ---
--- Begin Message ---
I think it should the following:
        print "Create image link\n";
        print("<a href=\"image.htm\">");
        print("<img src=\"image.jpg\">");
        print("</a>");

Nguyen,
-----Original Message-----
From: Dominique ANOKRE [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 19, 2004 6:21 PM
To: Php List
Subject: [PHP] generate a image link with php


how to generate a image link with php ?

i use this but it returns errors : 

print("<a href="image.htm">");
print("img src="image.jpg");
print("</a>");

Thanks

--- End Message ---
--- Begin Message ---
ok
good now - solved !!

thansk you
----- Original Message ----- 
From: "Seba" <[EMAIL PROTECTED]>
To: "Dominique ANOKRE" <[EMAIL PROTECTED]>
Sent: Thursday, February 19, 2004 11:23 AM
Subject: Re: [PHP] generate a image link with php


> It is better:
> 
> print("<a href='image.htm'>");
> print("<img src='image.jpg'>");
> print("</a>");
> 
> Il gio, 2004-02-19 alle 12:20, Dominique ANOKRE ha scritto:
> > how to generate a image link with php ?
> > 
> > i use this but it returns errors : 
> > 
> > print("<a href="image.htm">");
> > print("img src="image.jpg");
> > print("</a>");
> > 
> > Thanks
> 

--- End Message ---

Reply via email to