the session.
Yes, your Honey Pots idea intrigues me, and I'll be stealing it, thanks!
cake is a metaphor. let's imagine it means 'girls' for instance ...
you with me now? ;-)
Um... nope, no idea what you mean (nodding!).
[She's about to come over and demand her coffee, must fetch ;) ]
--
Ross
/Series/CodeSOD.aspx
Then, don't do it like that!
But seriously, you might want to check out this page on Wikipedia, and
follow some of its references:
http://en.wikipedia.org/wiki/Programming_style
--
Ross McKay, Toronto, NSW Australia
Let the laddie play wi the knife - he'll learn
- The Wee Book
: $flavour/p\n;
$size = $_POST['options']['size'];
echo psize: $size/p\n;
}
?
NB: no quotes around array key!
I found this very handy for having variable product options on a simple
shopping cart.
--
Ross McKay, Toronto, NSW Australia
The lawn could stand another mowing; funny, I
pinput type=submit//p
/form
?php
foreach($_POST['options']['colour'] as $colour)
echo pcolour: $colour/p\n;
?
--
Ross McKay, Toronto, NSW Australia
If ye cannae see the bottom, dinnae complain if ye droon
- The Wee Book of Calvin
--
PHP General Mailing List (http
On Thu, 14 Aug 2008 23:46:05 -0400, Michael S. Dunsavage wrote:
I use geany and Quantum
+2 for geany (SWMBO uses it too). It's a good general-purpose text
editor and simplified IDE. Build it from SVN, as it has been moving
fairly quickly and distro packages often haven't kept up.
--
Ross McKay
of Australia, or
IOW somewhat to the left of Kalifornia and down a bit)
--
Ross McKay, Toronto, NSW Australia
Under the big bright yellow sun - Fat Boy Slim
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Wed, 13 Aug 2008 15:46:47 + (UTC), Jonesy wrote:
I'd've thought with Aussie, Southern Cross-oriented globes, it would be
to the _right_ of Kalifornia and _up_ a bit.
Yes, but I was translating from Strine to Wronglish for the North
Americans ;)
--
Ross McKay, Toronto, NSW Australia
I
://example.com//a
in the HTML body. You'll need to catch the heredoc as a string, and
replace any URLs with the anchored URL as above.
--
Ross McKay, Toronto, NSW Australia
Before enlightenment: chop wood, carry water;
After enlightenment: chop wood, carry water - Wu Li
--
PHP General Mailing List (http
may try the
ini_set('magic_quotes_gpc',0);
That won't work:
http://au.php.net/manual/en/function.get-magic-quotes-gpc.php
Keep in mind that the setting magic_quotes_gpc will not work at
runtime.
--
Ross McKay, Toronto, NSW Australia
Let the laddie play wi the knife - he'll learn
- The Wee Book
.
Or perhaps you think that good IT professionals do hack their production
environments without backups as a matter of course? And on low-service
hosting environments. :)
--
Ross McKay, Toronto, NSW Australia
Words can only hurt if you try to read them. Don't play their game - Zoolander
--
PHP
further
developing them for newer sites.
http://subversion.tigris.org/
http://tortoisesvn.tigris.org/
http://rapidsvn.tigris.org/
http://meld.sourceforge.net/
Of course, a good IT professional would probably tell you to use git,
with its 132-odd shell commands... ;)
--
Ross McKay, Toronto, NSW
:)
Having said that, I'm about to commit yesterday's changes to Subversion
and run another backup whilst touching wood!
Checking Google's cache should give you an idea of what you had up
there, and the rebuild is always better than the original anyway...
--
Ross McKay, Toronto, NSW Australia
Let
When I do the following it grabs the response (And using a packet sniffer I
can see the server responds quick). If I only call fread one time it will
read and return the page to the server. If I read a second batch after the
eof it hangs for 30 seconds.
All I want to do is send a raw POST
back the changes (e.g. via FTP).
--
Ross McKay, Toronto, NSW Australia
Let the laddie play wi the knife - he'll learn
- The Wee Book of Calvin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
$data = simplexml_load_string(file_get_contents($url));
Is there a php4 version of this or does this only work in 5? How can I get
around it?
R.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I have this postcode selector working on my localhost but remotely it gives
a parse error. It should only call the function when the postcode is
submitted. Any ideas?
The error is:
Parse error: parse error, unexpected T_NEW in
/homepages/3/d154908384/htdocs/legalsuk/consultants/nearest.php
I am using the code to send an html email (phpmailer class) now I need to
somehow determine if the recipient uses text only email and change email to
plain. Is this possible?
include( 'html_emails/html2.php' );
$mail_body = ob_get_contents();
ob_end_clean();
I am using postcode anywhere for a 'where's my nearest' function.
All the geographical info is contained in an array, which when dumped looks
like this
var_dump ($result);
array(1) { [0]= array(13) { [origin_postcode]= string(7) EH2 2BE
[destination_postcode]= string(6) EH2 2BE [distance]=
Hi,
I need a secure form. I have one here
http://www.edinburghnights.co.uk/pay/php/curl_https.html but it has no
algorithm check on the CC number. Also I need to make the form secure. Can
someone point me to an example or tutorial.
Many thanks,
R.
--
PHP General Mailing List
a
good solid understanding of PHP security?
Thanks,
Ross
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi All,
Worldpay is far too expensive.I am looking for a good gateway that.
-has a good php/linux sdk
-easy to integrate
-does not open new windows with the gateways logo all over the place but is
contained on my site
- has good rates
- does not take ages to get the cash from your account to
how do apache filepaths match the directories?
This is my document root acording to $_SERVER
/usr/local/apache/htdocs/
but I also sometimes see this
/home/mysitename/public_html/
public_html is where I put my files via ftp so can someone explain where the
'home' folder is in relation to the
Here is my script. The file is not uploading. In my orignal script it is
$_FILES['userfile']['tmp_name'][$i]; that gets uploaded as I have an array
of images and it loops through. It must be something to do with this line
$tmpName = imagecopyresampled($image_resized, $image, 0, 0, 0, 0,
Nothing happens no errors or anything I tried to debug using
include('display_image.php?img_url=$image_url') I got a parse error.
I would rather use buffers if this is possible?
- Original Message -
From: Zoltán Németh [EMAIL PROTECTED]
To: Ross [EMAIL PROTECTED]
Cc: php-general
I have a display_image.php page
?php
$image = imagecreatefromjpeg($img_url);
if ($image === false) { exit; }
// Get original width and height
echo $width = imagesx($image);
echo $height = imagesy($image);
// New width and height
$new_width = 200;
$new_height = 150;
// Resample
I have manually put in the url my display_image.php page to debug as
sugested and all I get is the URL of the display_image.php page output on
the screen.
This is what I see
http://xxx.co.uk/common/display_image.php
this is the display_image.php file:
I have manually put in the url my display_image.php page to debug as
sugested and all I get is the URL of the display_image.php page output on
the screen.
This is what I see
http://xxx.co.uk/common/display_image.php
this is the display_image.php file:
Thanks Stut we are getting somewhere.
Removing the header gives the full binary output of the file in IE and FF. I
also removes the echos and have the resized image showing in the browser. So
far so good. I know it works.
Now back to sending the URL.
I have this
I am taking your advice.
I am going to rezize any image greater than 400px wide prior to upload. I
have to combine my upload script
for ($i=0; $i $total; $i++) {
$fileName = $_FILES['userfile']['name'][$i];
$tmpName = $_FILES['userfile']['tmp_name'][$i];
$fileSize =
I have done this before with a paid service in the uk
www.postcodeanywhere.co.uk but is there a free service where I can
automatically genereate this from the postcode? At present I am using
multimap to get the 'lat' and 'lon' information I want. This is too
slowww.
Ta,
R.
--
I usually use a phpmailer class but am creating something from scratch.
when I use the most basic example I can find:
$to = '[EMAIL PROTECTED]';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: [EMAIL PROTECTED]' . \r\n .
'Reply-To: [EMAIL PROTECTED]' . \r\n .
I wasn't keen to do this anyway. A deposit it is.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Never really used the GD much before very straightforward but how do I
output the image on a page. This is fine on a php page on its own but what
about one where the headers are already sent?
I take it I can do something like this img
scr=get_image.php?url=$img_url/a. Anyone got a better
I have a page of functions that I include in my page head. In this I have a
function to connect. I can then just call this on each page when i need it.
Does doing it this way cause any potential security risks?
function connect() {
$host=localhost;
$user=x;
$password=xx;
$dbname=x;
I have a paypal account setup and am going to upgrade to the virtual
terminal, however the client would like to collect the credit card details
as security (he is a hotelier)
Is it possible to securely send these details via the internet or should I
suggest he just gets them to phone them
Hi,
I have a clinet with a small hotel. I want to send a link to customers
requesting cash similar to paypal. If there total booking is £320 I want to
send them a link to pay £32 online. Is there an alternative non-paypal way
to do this? Other gateways with good PHP based API.
thanks,
R.
Hi,
I can make the files now after setting the permission to my images folder
but I cannot delete the folder or images in it. I have tried unlink and
rmdir with no success. Even with filezilla cannot delete it
The problem seems to be the images that are set to chmod of 600 and cannot
be
Hi,
I can make the files now after setting the permission to my images folder
but I cannot delete the folder or images in it. I have tried unlink and
rmdir with no success. Even with filezilla cannot delete it
The problem seems to be the images that are set to chmod of 600 and cannot
be
://www.itoctopus.com
Ross [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hi,
I can make the files now after setting the permission to my images folder
but I cannot delete the folder or images in it. I have tried unlink and
rmdir with no success. Even with filezilla cannot delete
, 'ross');
with this I get a
Warning: chown() [function.chown]: Operation not permitted
R.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
I am looking to create a transparent text gif that allows me to set a colour
for the matte. I have it working as a PNG but this is no good in IE.
Does anyone have an exampe of this?
This is my code so far.
?php
header(Content-type: image/gif);
$im = imagecreate (800, 30);
$black =
This script work on it's own but fails when emeded in another php file. All
I want to do is create a function and call it passing a text parameter. Also
is it possbile to output the image to a file insert the url into a img
tag?
?php
header(Content-type: image/png);
$im = imagecreate (800,
left, which you decide not to care
about, in production notices should be turned off then
greets
Zoltán Németh
2007. 04. 21, szombat keltezéssel 10.01-kor Ross ezt írta:
A quick one this morning.
When coding should I be trying to code so there are no notices or is it
ok
to turn them off
header('Location: edit_property.php?property_id=.'$property_id'.');
t: 0131 553 3935 | m:07816 996 930 | [EMAIL PROTECTED] |
http://www:blue-fly.co.uk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I have an old laptop and would like to either run linux on it or have it
running window and emulate a lixux environment. Is this possible?
What is the easiest way to get linux to run on a windows machine? Is it any
easier to do this on a mac?
Ross
--
PHP General Mailing List (http
Thanks all I manged to fix it.
The headers were already sent by a validation class I was using and needed a
bit of output buffering to get it working.
R.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Right,
Have tried the full url for the header and it still doesn't work. I may have
to resort to...javacript redirects unless someone can suggest a way around
it.
Here is the phpinfo();
http://s202801613.websitehome.co.uk/info.php
Is is 1and1 hosting if anyone had had any experience of
any reason why this should be?
R.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ok I have a page that calls my my functions, basically a 6 step signup. All
the steps look like this
function step_one() {
$_SESSION['property_id'] =$_POST['property_id'];
$property_id = $_POST['property_id'];
$postcode= $_POST['postcode'];
$query = INSERT INTO properties (property_id,
I am creating a single user secure login based on this:
http://www.phpnoise.com/tutorials/26/1
Can anyone see any potential security issues with this method? Where should
I store the password/username can I just have it located in the pagehead?
R.
--
PHP General Mailing List
tthe image does not display although it exists in the table 'images'
This calls the download script
?
$property_id = $_SESSION['property_id'] ;
$query = SELECT * FROM images WHERE property_id='$property_id';
$result = mysql_query($query);
while($row = mysql_fetch_array($result, MYSQL_ASSOC))
yes it is image/jpeg
Roberto Mansfield [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Verify that your $type is a correct mime type.
Ross wrote:
tthe image does not display although it exists in the table 'images'
This calls the download script
?
$property_id = $_SESSION
I have made a very messy function for this that splits the string up does
all kinds of stuff but I was wondering if anyone has a 1 or 2 line function
for gettting a uk date
dd/mm/ (it is a string)to mysql version -MM-DD
and then back again.
ta,
R.
--
PHP General Mailing List
Thanks all.
Was not aware of the array_reverse() function.
Ross
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I am wondering how you store and recall your functions.
I have an external file - functions.php, this includes all the functions for
the site. It is included in the pages head and then I just use the functions
when I need them.
Does anyone have a better way to store/recall functions?
R.
I have 3 'action' buttons and I am trying to send the $id from the radio
button and the action to the same page so I can either, Add Edit or Remove
the property from the database.
Any ideas how I can get this to work? I can either POST the id's or GET the
action but I can't seem to return both
Can I put post values directly into insert statements?
$query = INSERT INTO categories (category_name) VALUES
('$_POST['cat_name']);
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
thanks.
Ross [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Can I put post values directly into insert statements?
$query = INSERT INTO categories (category_name) VALUES
('$_POST['cat_name']);
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http
I want to trim any whitepace and check if it is empty in the same line this
is not working.
if (empty(trim($_POST['_createcategory']))) {
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I am using a script to generate a sitemap. It displays the page names
(mypage.php) but I want it to display the titles. The page heads and title
are generated dynamically so the line below does not work
if(preg_match('title(.+)/title'i, $f, $matches)){
However all the paged titles are stored
In answer to my own question
if(preg_match('pageTitle=\(.+)\'i, $f, $matches)){
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I have a readonly textbox that gets mailed as a newsletter. The text is a
standard covering letter. The problem is when I try and convert it to html
it doesn't work It is inserted into a variable via a form textarea
$mail_text.
available on the web site a
Hi,
I am looking for a php search engine that provides a suggested words
(soundex?) when items are misspelt, the way google does.
I have used http://www.site-search-pro.com/ i n the past which is great but
as far as I know this feature is not included.
Ross
--
PHP General Mailing List
Can someone recommend one please?
R.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
?php
include ('../phpscripts/connect.php');
$id = $_GET['id'];
$query = SELECT * FROM mypdfs WHERE id =$id;
$result= mysql_query($query) or die('Error, query failed');
if (!mysql_num_rows($result))
{
die(No matching records were found in the database.);
}
while ($row =
Can someone explain to me why this used to work but then stopped
header(Content-length: $size);
header(Content-type: $type);
header(Content-Disposition: attachment; filename=$name);
and this now works
header(Content-length: .$size);
header(Content-type: .$type);
header('Content-Disposition:
= SELECT * FROM mypdfs WHERE id =$id;
Change it to :
$query = SELECT * FROM mypdfs WHERE id =.$id;
-Message d'origine-
De : Ross [mailto:[EMAIL PROTECTED]
Envoyé : jeudi 8 mars 2007 09:39
À : php-general@lists.php.net
Objet : [PHP] server error or script error
?php
include ('../phpscripts
Hi,
I am trying to create a file with php. I want to enter the value of a string
into it and then browse (if possible) and save to a specified folder with
the filename/extension (.php/.txt) entered in the dialog box.
R.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
I am looking for a template class that will take a basic 2 column template I
have made and let the user
-change the page title
-add an header image
- enter the main body text
-save the file to a folder of their choice
Is there already a class out there that does this or similar. Smarty is far
Hi,
I have created a basic HTML emailer with PHP where the body is created and
text is inserted via a text area.
Now I would like to expand this so the client can put in live URL and mailto
links. I can use htmlentities() to do this but I would also like a button
that allow them to enter it
I have my RG's switched off in my local .ini but I am tinkering about with
oscommerce.
php_value register_globals on
I tried to change add this line to the .htaccess file in the catalog folder
but still gives the error
Server Requirement Error: register_globals is disabled in your PHP
it as it is a great script. Does the script
add any div tags or anything?
Here is my navigation that is inserted.
div class=middle
div class=top
div class=bottom
ul id=contact_side
lia href=one.phpone/a/li
lia href=two.phptwo/a/li
lia href=three.phpthree/a/li
/ul
/div
/div
/div
thanks,
Ross
--
PHP
Nice work Rob!
You were totally correct as I needed to write the header, mail body and
footer before I dumped the whole thing using OB contents.
Ross
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Does anyone know of a form validation class available that gives
(i) feedback in a graphical way like this (the ticks and crosses)
http://forums.oscommerce.com/index.php?act=Regcoppa_user=0termsread=1coppa_pass=1
(ii) Is dynamic..for example I have a checkbox
do you own a car?. If I tick 'no'
I am using this to connect remotely but I get a no database selected error.
The table is contacts but there is not a parameter for database name
according to the documentation. How do I delect my database when conencting
this way?
$link = mysql_connect('.org:3306', 'my_username',
Just installed apache and am looking at an error
Warning: session_start() [function.session-start]:
open(C:\DOCUME~1\Ross\LOCALS~1\Temp\php\upload\sess_ob822kp9sqlndjvu089r845e50,
O_RDWR) failed: No such file or directory (2) in
C:\Apache\Apache2\htdocs\ssn\editor.php on line 4
Should I set
I want to output the file contents of a folder to a php page and provide a
link for them to be downloaded.
This is what I have so far but I cannot get a filename or get it to iterate
through all the files in a folder.
?php
$dir = mydirectory;
// Open a known directory, and proceed to read
did the following...
-installed apache
-installed php (C:\PHP) with the windows installer
-moved my websites to the htdocs folder..so far so good can access pages
- downlaoded php my admin to htdocs
-downloaded the FULL php version
-copied the extensions folder (C:\PHP\ext)
-changd the line in
be the problem? Mysql runs fine I can connect with
phpmyadmin.
Ross
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
cracked it. think the libmysql was an old one!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
If I protect folders via cpanel (HTTP auth) is this more secure than using
php code?
R.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thanks Colin.
Think I will do both. I can timeout the session with PHP.
Does adding mysql_real_escape_string make this secure to injection or should
I be doing something else?
if ($_POST['submitted']){
$username = mysql_real_escape_string( $_POST['username'] );
$pass =
I recently installed php5 with apache (replacing php4and IIS).
I am moving all my folders to the htdocs folder and but when I run a page
the include does not work
?php include ('menu.php'); ?
Nothing had change the directory stucture is the same. there are no warnings
or errors jsut a big
In a very old site of mine and not knowing any better I never used $_POST.
The server it has on has now decided to turn change it;s config...fair
enough but I am having problems with an attahcment in form. I have change
all the other varible to $_POST but the attachment is causing me trouble.
I am trying to install 5.2 via the installer but the when I try and open a
page IIS asks for a password and the page is not found.
Any ideas?
R.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Anyone got a script so I can count clicks on adverts. Doesn't have tosve to
myqsl or anything just a text file will do.
Ta
Ross
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
independently but when I use one the other switches off.
any ideas how I can combine them?
Ross
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
a undefined index error as it does not
exist but is there a way of wrapping in in a switch statement or funtion so
the variable is only used when $_REQUEST['text_size']; actually exists.
Ross
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
independently but when I use one the other switches off.
any ideas how I can combine them?
Ross
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I have a database and it needs to get backed up on a daily basis. Is there a
class that allows me to create a backup and then save it as a .sql or excel
or both to a folder of her choice?
R.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Hi,
What is the best way to take a one off payent (non-paypal). I have used
oscommece but never attempted a one payment like a subscription charge.
I would probalby be looking to use a trusted gateway like worldpay.
R.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
.
Ross
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Looked on google and not found a satisfactory answer. Doies anyone have a
funtion to do this?
R.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
I want to randomise a string
$myrandom = rand(ross, andrea);
echo $myrandom;
I know this doesn't work but is there a built in function to do this?
R.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
I want to randomise a string
$myrandom = rand(ross, andrea);
echo $myrandom;
I know this doesn't work but is there a built in function to do this?
R.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hello,
Having used php for a while now and am fairly competent I was persuaded by a
collegue to look into asp.net. I decided to download the free trial of
VS2005 and start with a few tutorials.
I am very suprised how easy things like user auhtentication and form
validation is. Literally in
Why does this send multiple times. I want it to loop through and send it
once.
-
?php
session_start();
include check_login.php;
global $PHP_SELF, $mail_text, $search_string;
sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:
[EMAIL PROTECTED]
Ross
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
What I need is a quick way to assign variable names to the same value of the
row name.
example..
$query= SELECT * from $table_name WHERE sname=='hulford';
$result = mysql_query($query) or die('Error, query failed');
while ($row=mysql_fetch_array($result)) {
$email = $row['email'];
-
Counselling Psychotherapy in Scotland and Neighbourhood Networks ?
I can use stripslashes(string); to remove the backslashes but what about the
blocks. I assume they are spaces.
Ross
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
101 - 200 of 467 matches
Mail list logo