[PHP] Snyc Outlook Calendar with Website

2004-12-05 Thread Steve Vernon
Hiya,

Any help or advice would be great.

At the moment I sync my mobile with my computer (Microsoft Outlook), with
all my tasks and calendar entries.

I have made a PHP website with my own coded calendar system. The entries in
the calendar are stored in a MySQL database.

At the moment every day I go to my website and updated the calendar, so the
information on my website is the same as in Outlook.

This takes time so I would like to be able to automate this!

What I would like to be able to do is automatically say once a day is send
all my calendar entries to my website. Has anyone done anything like this?

What I was thinking of was:

On my localhost having PHP link to Outlook and get the next weeks 
Sending them as POST data from my computer to my website, this is
received by a PHP script on my website
The PHP script then adds the new entries to the database (the
database will automatically ignore duplicates)

Guess this will work but I haven't tried anything like this, especially the
PHP talking to Outlook. Can a PHP script send POST data to another one
simply? 

Am I in the right direction? Is there anything I should know or think about?
Is there a good example already made?

Don't mind making this, or even trying parts of it, if I know this will
work!

Thanks!

Steve

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



[PHP] File Handing Windows / Linux

2004-11-14 Thread Steve Vernon
Hiya!

I am trying to make some code which gets a handle to a directory, but has
different code for my localhost (Windows) and for online (Linux server). 

Basically, I want either of the below lines. Say if the first fails, it must
be on Linux and then it uses the line below. 

The two example lines are:

  @ $handle =
opendir(c:/websites/mywebsite/extra/photos/.$_GET['page']./);
  @ $handle =
opendir(/home/mywebsite/public_html/extra/photos/.$_GET['page']./);

Had a search on google, but not really sure what to look for!

Love,

Steve
XxX

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



[PHP] Max Upload FIle Size

2003-12-05 Thread Steve Vernon
Hello,

I have search google, and PHP but I cannot find properly how to set the
maximum post upload size as 200Kb?

Do I use 200K or 200KB for post_max_size?

THANKS

Steve

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



[PHP] COM and PHP.ini

2003-11-07 Thread Steve Vernon
(PHP 4.3.0, Windows XP Pro, Office 2000 Pro)

Hello,

Just playing around with COM, and I got the error below.

Searching on google it mentions something about a DLL error.

Iv'e enabled dcom in php.ini.

What have I missed!

Line 2 says $excel = new COM(Excel.Application) or die(Excel could not be
started);

THANK!


Warning: (null)(): Unable to obtain IDispatch interface for CLSID
{00024500---C000-0046}: Server execution failed in
c:\websites\excel.php on line 2

Fatal error: Maximum execution time of 30 seconds exceeded in
c:\websites\excel.php on line 2

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



[PHP] Color / Colour on the command line

2003-10-29 Thread Steve Vernon
Hiya,

I have quite a few maitenence php scripts I run on the command line in
windows. I realise there are ways to alter the look of the DOS command
prompt in windows. But if I reinstall windows, or use the script on another
machine they will be lost.

I'm thinking of letting users download it as well.

So basically, I can't find anything about how to change colours using a
command line script.

Just getting very boored of white text on a black background- very booring!

THANKS!

Steve

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



[PHP] MP3 Ripping

2003-10-27 Thread Steve Vernon
(Windows 2k, Apache, PHP, MySQL, Large Computer with Raid Array and Big
Drives!!!)
(Appology if this is been asked before, but I couldnt see it)

Hello,

First of all I had better say I don't think I am doing anything illegal. I
have over a thousand origional CD's, and would basically like not having to
swap the CD's etc. It's amazing some of the tracks I love but never play. I
end up playing the albums, and not the singles etc. What I basically would
like is to have a form of automatic jukebox on my computer.

So what I have done is made a MySQL database with all the Artist, Genre,
CD's and Tracks (including mixes). I have typed in all the information into
this, and checked it as much as possible.

What I would like is to put the music track in a blob field, rather than a
file. Is there someway that PHP can read the CD and rip the files??? Or
would I need to rip the tracks in a program, and then basically upload them
in a form? (The second option would take longer for me of course)

Now I could write some sort of C++ or Java program that uses this data and
plays the CDs with some fancy choosing of artists and genre etc. But can
anyone think of a way to do it from PHP? Someone said WinAmp had a command
line interface, perhaps send it tracks from a PHP file. Not sure if it
returns informaiton to PHP.

One thing I did think was learning the PHP-GTK, with this project as a goal.
But I know I can do what I want to do in Java, just not sure if there are
any good mp3 modules etc for PHP.

Any help would be appreciated!

Steve

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



Re: [PHP] MP3 Ripping

2003-10-27 Thread Steve Vernon
erythros and Burhan,

Thanks for the reply.

Basically I started putting my music into a program , and the program I did
it on didn't like the amount of tracks (kept crashing), and didn't give me
as many options as I would like. I'm not worried about a fancy interface and
graphical displays of the music.

What I could do is make a folder inside a folder with the artist name and
the CD, and then the MP3 files inside with the name (and possibly mix) as
part of the name. But what if the CD has music from different artists? What
if the program does not like a high number of files? What if the file name
gets to be more than 255 characters? What if I want to do something bit more
advanced with a catelouged set of data.

The last sentence relates to a project I did at Uni, to do with automatic
mixing between tracks. I realise the code I did then is copyright, but I
have a few ideas I want to try out. I sometimes do a bit of DJing at a local
bar/club, but for the first couple of hours we just play a couple of mix
CD's, before I get up and DJ. What I was thinking was letting the computer
DJ itself, and letting people using a simple interface select some songs.
But I would want to limit the type of songs, because some songs don't work
at certain times of the night. Just would be nice to have it all using
MySQL, so people can see pics of the artists etc. There are some quiet
nights where basically either mix cd's or the radio is used all night.

A database is there to hold your data, and basically display it in a format
when asked, that you asked for. (Ok not a dictionary definition). Basically
a file system is a simple database, but just to hold files. I know the load
on the server would be crazy, but I'm not worried about that. All I plan to
do at the moment is to output to a tempoary file, and then feed it into a
program such as WinAmp to play the file. I don't want to do any Streaming-
well perhaps some screaming!

Ideally there would be a software product out there to do all this, but I
don't think so, not with some of the ideas I have which I haven't even
listed!!! So is there ANY way from PHP to read a CD, rip the tracks and
place them in BLOB fields in MySQL? Or do I have to write something in C++
or Java? Just would be nice if there was something in PHP.

Thanks,

Steve

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



[PHP] German Date - GMDATE Function

2003-10-22 Thread Steve Vernon
Hello,

When I use the gmdate function, I get the English date, e.g. October. Is it
possible to get the date in German or another language? I really need the
server setting up so that it can handle different languages.

I suppose I could get the month as a number, and then convert the number,
but this seems a bit tacky!

Any help would be much appreciated!

I have tried to look at the German mannual, but I think they use the same
calls to gmdate, and that PHP is different. Is this so? How would I get
around this?

I don't know much, if any, German, so would need to use the English PHP.

THANKS!

Steve

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



[PHP] Converting HMLT to Text in PHP

2003-03-13 Thread Steve Vernon
Hiya,
I'm working on an email part of a site, normally I just send in text,
but for this site I need to send HTML and text.

Now I have made the HTML ones, that work fine. Is there a PHP way to
convert this to a normal text file for the text emails?

It dosent need to be that preety or layed out nice, but id prefer it to
be better than just removing the tags.

Thanks,

Steve


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



Re: [PHP] Threading

2003-02-22 Thread Steve Vernon
Hiya Greg or anyone else!
I realise that PHP does not have inherent thread support as yet. But is
it possible to simulate threads?

What I would like is for the user in a web site in a rare condition to
cause a long script to be completed. Now as far as I can make out you can
make it not time out, but the user will sit there being boored.

Is it possible to call a URL from PHP? And just ignore it? I mean call
another PHP script that takes ages, but wont affect he initial script
ending?

Steve
- Original Message -
From: Greg Donald [EMAIL PROTECTED]
To: Bruce Miller [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, February 18, 2003 8:03 PM
Subject: Re: [PHP] Threading


 On Tue, 18 Feb 2003, Bruce Miller wrote:

 Will PHP allow multiple-thread execution?

 PHP4 does not have thread support.


 --
 Greg Donald
 http://destiney.com


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



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



[PHP] Threads in PHP? URL call from PHp?

2003-02-14 Thread Steve Vernon
Hiya,
Perhaps I don't mean threads!

Basically I have a PHP script which is in a website, and runs when a
certain input is recieved and it is quite complicated, and may take quite a
time to finish, as it will be sending quite a few emails. The emails do not
have to be sent straight away, and the emails are all customised with date
from the database.

What I could do I suppose is to call set_time_limit(0) to stop the
script timing out, but I don't want to have the user waiting for the script
to finish before he/she sees the next page.

What are the options? I was thinking I could:

1- Run another script using the command line version, system call.
But it is going live on Linux, but tested on Windows. And don't want to have
to alter the code for the live version. Think you have to call PHP
differently on the two platforms.
2- Do some sort of URL call from the PHP code? Is this possible. I
mean like call a script, and pass arguements in the URL. And just ignore it,
it can take as long as it wants, sort of do it in a seperate thread.
3- Somehow ask for some specific PHP code to work in a seperate
thread.

Is this possible? Any other ideas? Which is the best way? What is the
PHP way!

If I was doing something like this in Java, probably set a class running
in another thread.

Many thanks,

Steve




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




[PHP] Newsletter using PHP and MySQL

2003-01-31 Thread Steve Vernon
Hiya,
I have nearly finished a project I am working on, and completely forgot about 
having a newsletter service! Basically its a website, and on the registration page 
people opt in or out of the newsletter, and this is a field in the database.

So either once a week, or randomly I want to be able to send a newsletter to about 
a million people (hopefully if all goes to plan). 

What I did envisage was running a PHP script through the command line, which got 
the first 100 or so which wanted the newsletter, then the next 100 etc, till all the 
users who wanted the newsletter got it. Now my Linux is a bit hazy, but I think I can 
run this low priority, because Iam not bothered if it will take a day or so to send 
them all.

Sommat like this:

1- Read the first 100 emails that want the newsletter

2- Email them

3- If read 100, then go to 1 (but start from 100), if not quit

So basically my questions are:

1- Is this the best way? Or should I use some mailing list software? I do want 
them to subsribe/unsubsribe through the website

2- Is there a point when the script would time out? I know in Apache, u can 
set a time limit for a script, but would a command line PHP script have the same 
problem? Ihave never run PHP through the command line. 

 Thanks a lot, any advive or links would be great...

Oh yeh nearly forgot, although it will be hosted on Linux, it will be tested on 
Windows 2k, so hopefully the mehtod would work for Win 2k but this is not necessary...

Steve

PS I have looked at a few archives, and searched the net but not seen anything that 
helpful... 


[PHP] Images not stored in Databases

2002-12-24 Thread Steve Vernon
Hiya,
I have had help from a very useful person on storing images in
databases, and basically now I don't want to do this. But I may end up
storing a lot of pictures, and don't want to mess around.

Is there a script or class, that is as simple as storing in a database,
that will handle possibly millions of pictures, and given a picture will
return the URL where it is stored? I suppose I could build one myself, but I
can see it being quite difficult, with problems such as maximum number of
files in directories etc.

 I have had a look at a few PHP pages, but cannot find anything
suitable.

Any help would be great.

Have a great Christmas.

Love,

Steve
XX


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




Re: [PHP] Images not stored in Databases

2002-12-24 Thread Steve Vernon
Hiya.

Yeh sorry I should of mentioned, using an upload script. And then I
shrink them (or grow) using GD.

I understand I could give everyone a directory, but everyone would only
have one picture, so a waste of time.

What would make more sense, and to ignore the limit on number of items
in a directory, is to have directories like a-z and directories inside them
of a-z till there can be over a million stored. And then create a random
combination and try and place it in one of the root directories. Is there a
sctript that organises huge numbers of pictures in directories?

Also everyone logs in using there email address, not a username, so I
would prefer not to have to give them usernames!

THanks,

Steve


 How will the picture make it into the db?  Will they be uploaded by users?
 I had to create an upload script for a sight that puts the picture in the
 users directory on the webserver and then stored the path to the picture
in
 the db so when the web page is displayed, the tag is something like this
 img src=? print myrow[picture1]; ? .  Picture1 just holds the
 physical address such as /users/eddie/myhouse.jpg.  That way, the db isn't
 huge.

 Is that what you mean?

 Eddie

 -Original Message-
 From: Steve Vernon [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, December 24, 2002 8:57 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Images not stored in Databases


 Hiya,
 I have had help from a very useful person on storing images in
 databases, and basically now I don't want to do this. But I may end up
 storing a lot of pictures, and don't want to mess around.

 Is there a script or class, that is as simple as storing in a
database,
 that will handle possibly millions of pictures, and given a picture will
 return the URL where it is stored? I suppose I could build one myself, but
I
 can see it being quite difficult, with problems such as maximum number of
 files in directories etc.

  I have had a look at a few PHP pages, but cannot find anything
 suitable.

 Any help would be great.

 Have a great Christmas.

 Love,

 Steve
 XX


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


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



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




[PHP] JavaScript or browser detection

2002-12-19 Thread Steve Vernon
Hiya,
I know it is probably out there somewhere, but I cannot find out a
script to detect the browser. I have seen it, and I sorta remember how to do
it, but I just can't find it!

I have a script that adds nice features to my webpage, but if JavaScript
is off the site still can be used. Basically the script does not work in
Netscape 4.08 but works above that, so either I could bracket out and check
the code, but in this case I cannot as it is code I am not allowed to alter,
and I include it, it is not in my HTML file.

So I need a way to say in PHP this is a bad web browser for JavaScript,
so ignore this bit of the file.

Thanks,

Steve


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




[PHP] Image resize with database

2002-12-16 Thread Steve Vernon
(PHP 4.23, GD 1.6.2 or higher)

Hiya,
I have code to place the picture in a database, and I normally shrink it
when the user requests a picture. What I would like it to change to is that
it should shrink or expand the picture to be 300 pixels wide and then place
it into the database. I thought the function below would work to do to
return a text resized version.

It does sort of works, but makes a picture where only part of it is the
picture (top part), the rest is blank.

Any help would be gr8!

THanks,

Steve


 function shrink_picture($tmp_name,$size,$name)
 {
  $result = ereg(.gif$,strtolower($name));

  if($result)
  {
   $img = imagecreatefromgif($tmp_name);

  }
  else
  {
   $img = imagecreatefromjpeg($tmp_name);
  }

  $width = imagesx($img);
  $height = imagesy($img);
  $new_height = abs(300.0 * ($height/$width));

  $new_img = imagecreate(300, $new_height );


imagecopyresized($new_img,$img,0,0,0,0,300,$new_height,imagesx($img),imagesy
($img));

  imagejpeg($new_img,$tmp_name.a,70);

  imagedestroy($new_img);
  imagedestroy($img);

  $data = addslashes(fread(fopen($tmp_name.a,r),$size));

  return $data;
 }


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




[PHP] Looping through Form Elements in a form

2002-12-11 Thread Steve Vernon
Hiya,
I am working on a generic JavaScript form checked, that takes the names
of the elements, with the first two letters being the type of element, so
its checks that it is right, if not gives a generic error message e.g. YOu
Need To Fill this in and selects it, or Sorry only numbers are allowed in
this box or Email addresses only, so reemail could mean a field which is
required and an email address. .

   JavaScript as long as you have a link to the object of the form, gives
the elements in an array. Is there a way to do this in PHP? Have a form with
the action something like
register.php?action=updatemembers with members being a table name. The
elements would be checked like JavaScripts checks them. Ok I would need to
then set the order and manually do the call to the database, but it would be
nice not to have to do the manuual checks on the elements.

So a function to check all the elements in a form in PHP would be nice,
then if it fails it would return an array with the wrong fields, and the
error, this could then be used to make a page where they correct there
mistakes.

Thanks!

Love,

Steve




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




[PHP] Cookies help please

2002-12-06 Thread Steve Vernon
Hiya,
Ive got a few websites that use sessions and I thought id upgrade them
now to use cookies. In the main file it calls the session start function,
and then this function is called, but it does not seem to work. I open a new
window and the cookie does not seem to auto log me on.

Sorry if I have not explained it right, I want a feature like amazon
where you go back to a site and you are still logged in.

The test member has rememberpassword as y.

The code below keeps my sessions but the cookie bit dosent work.

Thanks,

Steve
XX

 /* Check a session is valid
  */
 function session_check($db_link)
 {
  //Ok so either want to log on, or have a session or cookie allready
  if(isset($_SESSION['ssun']) || isset($_COKKIE[ssun]) ||
isset($_POST['ssname']))
  {
   //Attempt to logon. Set the logon form variables to the session
variables.
   if(isset($_POST['sspass'])isset($_POST['ssname']))
   {
$_SESSION['sspw'] =$_POST['sspass'];
$_SESSION['ssun'] =$_POST['ssname'];

if(isset($_COOKIE[ssun]))
   {
$_COOKIE['ssun']=;
$_COOKIE[ssun]=;
}
   }

   if(isset($_COOKIE[ssun]))
   {
$result = mysql_query(SELECT rememberpassword, memberid, title,
lastname, lastnamenow, md5(memberpassword), email FROM members WHERE
md5(memberpassword)='.$_COOKIE['sspw'].' AND
email='.$_COOKIE['ssun'].', $db_link);
   }
   else
   {
//Check if the session username and password are correct
$result = mysql_query(SELECT rememberpassword, memberid, title,
lastname, lastnamenow, md5(memberpassword), email FROM members WHERE
memberpassword='.$_SESSION['sspw'].' AND email='.$_SESSION['ssun'].',
$db_link);
   }

   if(mysql_num_rows($result)==1)
   {
$loggedin=yes;
$userdata = mysql_fetch_row($result);

if($userdata[0]==y)
{ //Set up the cookies, store the md5 version of the password
 setcookie (ssun, $userdata[6],time()+604800);
 setcookie (sspw, $userdata[5],time()+604800);
}

if($userdata[4]==) //If no last name now
{
 $_SESSION['title']=$userdata[2];
 $_SESSION['lastname']=$userdata[3];
}
else //Use the last name now
{
 $_SESSION['title']=$userdata[2];
 $_SESSION['lastname']=$userdata[4];
}
   }
   else
   {
$loggedin=no;
   }

   if(isset($_GET['logoff']))
   {
if($_GET['logoff']==true)
{
 //Remove the session and cookies
 $loggedin=no;
 $_SESSION['ssun']=;
 $_SESSION['sspw']=;
 $_SESSION['title']=;
 $_SESSION['lastname']=;
 setcookie (ssun, ,time()-3600);
 setcookie (sspw, ,time()-3600);
}
   }
   return $loggedin;
  }
  else
  {
   return no;
  }
 }


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




Re: [PHP] Cookies help please

2002-12-06 Thread Steve Vernon
Thanks a million, must of had something else on my mind ;-)

Love,

Steve
XX



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




Re: [PHP] catching a robot or spider - asking too

2002-11-19 Thread Steve Vernon
From what I think I heard on another group was that it dosent matter what
stylesheet you use, it will just read the file, getting words and following
links. Cant remember where I read this, think it was a forum, and they were
argueing about robots and whether they follow links specified in JavaScript.

One person said he was going to do a link to a page which only robots will
follow, say do it on a 1*1 pixel so no chance of a user to follow it. And on
that page do list of keywords as most robots ignore to many keywords in meta
tags. This would mean doing the limit robot meta tags to only the home page
and the robot page.

So you could do a page with your links on, that is linked from the home page
but hard to click on! And do the meta tags on other pages to stop robots.

Could work?!

Love,

Steve
XX





  does anybody know a way to make a distinction
  between robots and users?
  should I use the user agent? Or is this not a safe method.
  If the visitor is a spider/robot I want to include some script
  containing extra URL's for the robot.

 I am very interested too in this, as I received visits from a site with a
 rather strange user agent (well, at least, that I did not expect) on a web
 site of mine. The user agent was something like

 SurveyBot/2.2 a href=\'http://www.whois.sc\'Whois Source/a

 I really don't know how I should generate my pages in this case, what kind
 of stylesheet I should include to make the page correct (if I even have
to).

 Anyway, the real question behind is :

 Is there a good way to handle the user agent info?


 Vincent Vandemeulebrouck
 http://www.leguerriersorde.com/


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



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




[PHP] Session 3

2002-10-08 Thread Steve Vernon

Sessions problems in 4.2.3, with register globals off

Ok I got an email that gave me where some code was wrong, I said thanks and never 
tested it!

Fixing the code it still dont work. SO I thought id make a simple code to test 
sessions, and that don't work. What am I doing wrong??!! The following code refuses to 
work. Always outputs Had to set it manually:

?php
 session_start();
 
 if( isset( $_SESSION['sspw'] ))
 {

  echo The session variable is .$_SESSION['sspw'];
 }
 else
 {
  echo Had to set it manually;
  $_SESSION['sspw'] = test;
 }

?

Thanks,

Steve


Re: [PHP] Session 3

2002-10-08 Thread Steve Vernon

Solved it!

Didn't add a temp directory for sessions!

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




[PHP] Sessions

2002-10-05 Thread Steve Vernon

Hiya,
Just upgraded to 4.2.3 and I am using the attatched PHP.ini file. I use
sessions on my website, and they dont seem to work now after the upgrade.
Just wondering which lines do I need to alter please? After I logon, they
loose the session after choosing another page. Every page runs the following
code to check the session passwords etc are valid..

Thanks,

Steve
XX



?php
 session_register(ssun);
 session_register(sspw);

 if(!isset($ssun)) $ssun=;
 if(!isset($sspw)) $sspw=;

 //Attempt to logon. Set the logon form variables to the session variables.
 if(isset($sspass))
 {
  $sspw=$sspass;
 }

 if(isset($ssname))
 {
  $ssun=$ssname;
 }

 //Make sure no one breaks in, if in the param loggedin was set, unset it.
 if(isset($loggedin))
 {
  unset($loggedin);
 }

 //Link and select the correct database
HIDDEN FOR MY SECURITY


 //Check if the ssun and sspw are correct
 $result = mysql_query(SELECT userid FROM users WHERE
userpassword=PASSWORD('$sspw') AND userid='$ssun', $db_link);
 $norows = mysql_num_rows($result);

 if($norows==1)
 {
  $loggedin=yes;
 }
 else
 {
  $loggedin=no;
 }

 if(isset($logoff))
 {
  if($logoff==true)
  {
   $loggedin=no;
   $ssun=;
   $sspw=;
  }
 }



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


[PHP] Picture Cache

2002-07-04 Thread Steve Vernon

Hello,
At the moment I have a PHP script which accesses a database, to
get the data to return a picture. So the follwing url is actually a
picture of type image/jpeg:

getdata.php?id=6

So I can use:

img src=getdata.php?id=6

Thats great and it works fine, but I feel that it does not cache
the picture in the web browser? I don't know how the cache works but my
friend says it asks the server for the data the file was generated and
the size, so I suppose with this is dosent?

Help!

Thanks,

Steve


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




[PHP] FW: Help please!

2002-07-02 Thread Steve Vernon

Hello,
I have a PHP script which gets data from a MySQL database and
returns an image. So img src=getdata.php?id=3 returns the image of
id 3 from the database. What I really want is to state width is 100 and
height is 100 for example so I do not have to downlaod the entire
picture and specify the width and height as part of the image:

Do not want 
img src=getdata.php?id=3 width=100 height=100

WHat I want
img src=getdata.php?id=3width=100height=100

WHich will be a lot quicker on the client side.

I cannot make a permanent file to use when I get the information
from the PHP database due to server security, only a tmpfile which the
data can then be placed. But to use the image functions you need to
specify a filename. THere does not seem to be a way to get the filename
of a file pointer so how do I do it please?

I have asked the ISP to give me permissions to create files int
he server directory but they will not let me. 

Thanks you!

Steve


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




RE: [PHP] FW: Help please!

2002-07-02 Thread Steve Vernon

No, 
I did think of it, but the page may end up with quite a few
pics, and I download of a modem...

Prefer if server has the load...

Steve

|-Original Message-
|From: Lazor, Ed [mailto:[EMAIL PROTECTED]] 
|Sent: 02 July 2002 21:34
|To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
|Subject: RE: [PHP] FW: Help please!
|
|
|Why would it be quicker on the client-side?  I would think 
|you'd go with the first option.  That way the layout of your 
|web page is maintained while the image downloads.
|
|-Original Message-
|Do not want
|img src=getdata.php?id=3 width=100 height=100
|
|WHat I want
|img src=getdata.php?id=3width=100height=100
|
|WHich will be a lot quicker on the client side.
|
|   I cannot make a permanent file to use when I get the 
|information from the PHP database due to server security, only 
|a tmpfile which the data can then be placed. But to use the 
|image functions you need to specify a filename. THere does not 
|seem to be a way to get the filename of a file pointer so how 
|do I do it please?
|
|   I have asked the ISP to give me permissions to create 
|files int he server directory but they will not let me. 
|
|   Thanks you!
|
|   Steve
|
|
|-- 
|PHP General Mailing List (http://www.php.net/)
|To unsubscribe, visit: http://www.php.net/unsub.php
| 
|***
|*
|This message is intended for the sole use of the individual 
|and entity to whom it is addressed, and may contain 
|information that is privileged, confidential and exempt from 
|disclosure under applicable law.  If you are not the intended 
|addressee, nor authorized to receive for the intended 
|addressee, you are hereby notified that you may not use, copy, 
|disclose or distribute to anyone the message or any 
|information contained in the message.  If you have received 
|this message in error, please immediately advise the sender by 
|reply email and delete the message.  Thank you very
|much.  
| 
|
|-- 
|PHP General Mailing List (http://www.php.net/)
|To unsubscribe, visit: http://www.php.net/unsub.php
|


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