[PHP] Re: Freetype and JPEG disabled
did you configured php with these option? --with-freetype-dir=/path/to/freetype --with-jpeg-dir=/path/to/jpeg On 10/9/05, Feris Thia C. <[EMAIL PROTECTED]> wrote: > Hi All, > > I've tried to compile and install PHP with gd and freetype library enabled, > and all PNG and GIF library are loaded. But somehow, JPEG and Freetype > still > not recognized. I installed Freetype 2.0. > > Anyone facing these problems before ??? How can I resolved these ? > > Regards, > > Feris > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] per user php.ini
Nothing special on my configure line and the setting:- Configuration File (php.ini) Path looks like /home/USERNAME/public_html Only just noticed it's been switched over to CGI recently, It's also possible to have one php.ini per directory and the above mentioned setting always reflects the php.ini setting for that directory so must be something concerning httpd. JB Rory Browne wrote: why not upload a phpinfo() file and see? I'm personally not quite sure how this would work, and I'm interested in finding out. On 10/8/05, James Benson <[EMAIL PROTECTED]> wrote: Hey everyone, probably missed the bit in the manual but my current webhost allows uploading of my own php.ini to my home dir, my question is how to do this? My guess would be to set the ./configure line to something like --with-config-file-path=/home/*/public_html but I dont wanna re-compile if im wrong, can anyone tell me? Using apache-1.3.33, php-4.4.0 Many thanks, James Benson. -- 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
Re: [PHP] per user php.ini
they probably use something along the lines of mapping PHP to php -c $HOME/php.ini In Linux this would generally be done using binfmt_misc. On 10/9/05, James Benson <[EMAIL PROTECTED]> wrote: > Nothing special on my configure line and the setting:- > Configuration File (php.ini) Path looks like /home/USERNAME/public_html > > Only just noticed it's been switched over to CGI recently, It's also > possible to have one php.ini per directory and the above mentioned > setting always reflects the php.ini setting for that directory so must > be something concerning httpd. > > > > JB > > > > > > > Rory Browne wrote: > > why not upload a phpinfo() file and see? > > > > I'm personally not quite sure how this would work, and I'm interested > > in finding out. > > > > On 10/8/05, James Benson <[EMAIL PROTECTED]> wrote: > > > >>Hey everyone, probably missed the bit in the manual but my current > >>webhost allows uploading of my own php.ini to my home dir, my question > >>is how to do this? > >> > >>My guess would be to set the ./configure line to something like > >>--with-config-file-path=/home/*/public_html > >> > >>but I dont wanna re-compile if im wrong, can anyone tell me? > >> > >>Using apache-1.3.33, php-4.4.0 > >> > >>Many thanks, > >>James Benson. > >> > >>-- > >>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] Get Mac Address
I have a local intranet server, running apache1.3+php4. Is it possible to get the mac address of computes which access on of my php pages? Ben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] ID from lines?
Hi there! How do I get ID number from these lines? Do I have to use regular expressions? Line #3 : NH01<><>LiteOn DVD±RW 16<>725<>http://www.varupiraten.se/web/spec_product.php?ID=1711<>PC-CD-DVD-LDW-1653S-09C<>1<> Line #4 : NH01<><>LITEON 8x<>725<>http://www.varupiraten.se/web/spec_product.php?ID=2250<>CD-DVD-LDW-811S<>1<> /G http://www.varupiraten.se/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ID from lines?
- Original Message - From: "Al Hafoudh" <[EMAIL PROTECTED]> To: "Gustav Wiberg" <[EMAIL PROTECTED]> Sent: Sunday, October 09, 2005 4:38 PM Subject: Re: [PHP] ID from lines? /ID=([0-9]*)\ Thanx! /G @varupiraten.se Gustav Wiberg wrote: Hi there! How do I get ID number from these lines? Do I have to use regular expressions? Line #3 : NH01<><>LiteOn DVD±RW 16<>725<>http://www.varupiraten.se/web/spec_product.php?ID=1711<>PC-CD-DVD-LDW-1653S-09C<>1<> Line #4 : NH01<><>LITEON 8x<>725<>http://www.varupiraten.se/web/spec_product.php?ID=2250<>CD-DVD-LDW-811S<>1<> /G http://www.varupiraten.se/ -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.344 / Virus Database: 267.11.13/124 - Release Date: 2005-10-07 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ID from lines?
Hi Yes, it would work in these cases... But if there would be two or three =, then you couldn't generalize it in that matter... /G @varupiraten.se - Original Message - From: "Kevin Waterson" <[EMAIL PROTECTED]> To: "Gustav Wiberg" <[EMAIL PROTECTED]> Sent: Sunday, October 09, 2005 4:37 PM Subject: Re: [PHP] ID from lines? This one time, at band camp, "Gustav Wiberg" <[EMAIL PROTECTED]> wrote: Line #3 : NH01<><>LiteOn DVD±RW 16<>725<>http://www.varupiraten.se/web/spec_product.php?ID=1711<>PC-CD-DVD-LDW-1653S-09C<>1<> Line #4 : NH01<><>LITEON 8x<>725<>http://www.varupiraten.se/web/spec_product.php?ID=2250<>CD-DVD-LDW-811S<>1<> explode on "=" Kevin -- "Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote." -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.344 / Virus Database: 267.11.13/124 - Release Date: 2005-10-07 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Regular expressions
Hi there! I'm no good at reg exp... Yes, I confess.. Here's my code // Loop through our array, show HTML source as HTML source; and line numbers too. foreach ($lines as $line_num => $line) { echo "Line #{$line_num} : " . htmlspecialchars($line) . "\n"; if ($line_num > 0 ) { $getName = explode('<>', $line); $pattern = "/ID=([0-9]*)\"; } //require("phpfunctions/opendb.php"); //$sql = "UPDATE beskrivandeVarunamn=" . safeQuote($bNamn) . " WHERER" //mysql_close(); } ?> Output of this code is something like this: Line #0 : Varupiraten<>http://www.varupiraten.se/ NH01<><>Liteon DVD±RW<>1225<>http://www.varupiraten.se/web/spec_product.php?ID=2252<>PC-CD-DVD-LDW-SOHW-852SX<>0<> Line #1 : NH01<><>LiteOn DVD±RW 16 x<>655<>http://www.varupiraten.se/web/spec_product.php?ID=2251<>PC-CD-DVD-LDW-1653S-01C<>1<> NAME = LiteOn DVD±RW 16 x has ID number=NH01<><>LiteOn DVD±RW 16 x<>655<>http://www.varupiraten.se/web/spec_product.php? Line #2 : NH01<><>LiteOn DVD±RW 8x<>599<>http://www.varupiraten.se/web/spec_product.php?ID=1708<>PC-CD-DVD-LDW-832S-11C<>1<> NAME = LiteOn DVD±RW 8x has ID number=NH01<><>LiteOn DVD±RW 8x<>599<>http://www.varupiraten.se/web/spec_product.php? Line #3 : NH01<><>LiteOn DVD±RW 16<>725<>http://www.varupiraten.se/web/spec_product.php?ID=1711<>PC-CD-DVD-LDW-1653S-09C<>1<> NAME = LiteOn DVD±RW 16 has ID number=NH01<><>LiteOn DVD±RW 16<>725<>http://www.varupiraten.se/web/spec_product.php? Line #4 : NH01<><>LITEON 8x<>725<>http://www.varupiraten.se/web/spec_product.php?ID=2250<>CD-DVD-LDW-811S<>1<> NAME = LITEON 8x has ID number=NH01<><>LITEON 8x<>725<>http://www.varupiraten.se/web/spec_product.php? Just focus on $idNumber[0] in the code above... In the last row I get an output of LITEON 8x<>725<>http://www.varupiraten.se/web/spec_product.php? I want to get an output of 2250. I do I achieve that? /G http://www.varupiraten.se/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] per user php.ini
Thanks for the replies. Rory Browne wrote: they probably use something along the lines of mapping PHP to php -c $HOME/php.ini In Linux this would generally be done using binfmt_misc. On 10/9/05, James Benson <[EMAIL PROTECTED]> wrote: Nothing special on my configure line and the setting:- Configuration File (php.ini) Path looks like /home/USERNAME/public_html Only just noticed it's been switched over to CGI recently, It's also possible to have one php.ini per directory and the above mentioned setting always reflects the php.ini setting for that directory so must be something concerning httpd. JB Rory Browne wrote: why not upload a phpinfo() file and see? I'm personally not quite sure how this would work, and I'm interested in finding out. On 10/8/05, James Benson <[EMAIL PROTECTED]> wrote: Hey everyone, probably missed the bit in the manual but my current webhost allows uploading of my own php.ini to my home dir, my question is how to do this? My guess would be to set the ./configure line to something like --with-config-file-path=/home/*/public_html but I dont wanna re-compile if im wrong, can anyone tell me? Using apache-1.3.33, php-4.4.0 Many thanks, James Benson. -- 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
Re: [PHP] Regular expressions
Gustav Wiberg wrote: // Loop through our array, show HTML source as HTML source; and line numbers too. foreach ($lines as $line_num => $line) { echo "Line #{$line_num} : " . htmlspecialchars($line) . "\n"; if ($line_num > 0 ) { $getName = explode('<>', $line); $pattern = "/ID=([0-9]*)\ // instead of preg_split, use preg_match $idNumber = preg_match($pattern, $subject, $matches); // your ID number is now in $matches[1] echo "NAME = " . $getName[2] . " has ID number=$idNumber[0]"; } //require("phpfunctions/opendb.php"); //$sql = "UPDATE beskrivandeVarunamn=" . safeQuote($bNamn) . " WHERER" //mysql_close(); } ?> -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Mystery about chmod and permissions
I've got a script that checks a directory's permissions for 757 and if they are not correct, chmods them with a cgi script. That part works just fine. Can alternately switch the permissions from 755 to 757 and back. I can use a ftp utility to check the permissions and they are correct. The mystery is that I have a permissions check following the chmod and it reports the permissions that existed before the change. snippets: include "http://$server/cgi-bin/chg_perms.cgi?name=$fp_name&perms=$fperms";; //e.g., $fperms= 0757; [I've tried sleep(10) here; doesn't help] echo "Directory permissions for $dirname: ". substr(sprintf('%o', fileperms($dirname)), -3). " //reports 0755; If I run the script again with the same permissions, the report shows the correct permissions. It's as if permissions check code is executed before the chmod; but it isn't. I've tried echoed the times for the chmod code and the permissions check and the chmod code is definitely before the permissions check. Anyone have an explanation.? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Mystery about chmod and permissions
To save on computing time, the results of the fileperms command are cached... I assume when you run a new instance of the program, it uses a new cache / old one is deleted when the first instance ends. Either way, you should clear the cache first: clearstatcache(); echo "Directory permissions for $dirname: ". substr(sprintf('%o', fileperms($dirname)), -3). " //reports 0755; Give that a try - Jeff -Original Message- From: Al [mailto:[EMAIL PROTECTED] Sent: Sunday, October 09, 2005 3:50 PM To: php-general@lists.php.net Subject: [PHP] Mystery about chmod and permissions I've got a script that checks a directory's permissions for 757 and if they are not correct, chmods them with a cgi script. That part works just fine. Can alternately switch the permissions from 755 to 757 and back. I can use a ftp utility to check the permissions and they are correct. The mystery is that I have a permissions check following the chmod and it reports the permissions that existed before the change. snippets: include "http://$server/cgi-bin/chg_perms.cgi?name=$fp_name&perms=$fperms";; //e.g., $fperms= 0757; [I've tried sleep(10) here; doesn't help] echo "Directory permissions for $dirname: ". substr(sprintf('%o', fileperms($dirname)), -3). " //reports 0755; If I run the script again with the same permissions, the report shows the correct permissions. It's as if permissions check code is executed before the chmod; but it isn't. I've tried echoed the times for the chmod code and the permissions check and the chmod code is definitely before the permissions check. Anyone have an explanation.? -- 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
Re: [PHP] Regular expressions
- Original Message - From: "Jasper Bryant-Greene" <[EMAIL PROTECTED]> To: "PHP General" Sent: Sunday, October 09, 2005 8:06 PM Subject: Re: [PHP] Regular expressions Gustav Wiberg wrote: // Loop through our array, show HTML source as HTML source; and line numbers too. foreach ($lines as $line_num => $line) { echo "Line #{$line_num} : " . htmlspecialchars($line) . "/>\n"; if ($line_num > 0 ) { $getName = explode('<>', $line); $pattern = "/ID=([0-9]*)\ // instead of preg_split, use preg_match $idNumber = preg_match($pattern, $subject, $matches); // your ID number is now in $matches[1] echo "NAME = " . $getName[2] . " has ID number=$idNumber[0]"; } //require("phpfunctions/opendb.php"); //$sql = "UPDATE beskrivandeVarunamn=" . safeQuote($bNamn) . " WHERER" //mysql_close(); } ?> -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.344 / Virus Database: 267.11.13/124 - Release Date: 2005-10-07 Hi there! Thanx, I'll try that! :-) /G http://www.varupiraten.se/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Get Mac Address
On unix man arp on windows arp/h arp/help arp/? sorry for short and sweet resp, but I'm falling asleep. On 10/9/05, Ben Sagal <[EMAIL PROTECTED]> wrote: > I have a local intranet server, running apache1.3+php4. Is it > possible to get the mac address of computes which access on of my php > pages? > > Ben > > -- > 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
Re: [PHP] Get Mac Address
That will give you the *local* mac address, not that of the user visiting your page. The problem is the fact that the mac address is not sent as part of the REQUEST. As such it's not possible for PHP to find out what it is. So, unfortunately, no. (Though it's a very common question on this list) - tul Rory Browne wrote: On unix man arp on windows arp/h arp/help arp/? sorry for short and sweet resp, but I'm falling asleep. On 10/9/05, Ben Sagal <[EMAIL PROTECTED]> wrote: I have a local intranet server, running apache1.3+php4. Is it possible to get the mac address of computes which access on of my php pages? Ben -- 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
Re: [PHP] Get Mac Address
M. Sokolewicz have you ever typed arp at a command line? It may give you a local mac address, but it is normally used to show your arp cache. Now if you are on the same physical segment as the requester than you can obtain to mac address from parsing the output and matching it to the requesting IP. For example my machine is IP 192.168.0.10, and a client on my network (192.168.0.188) just hit my webserver. Shelling out "arp -a" shows me this (under windows): Interface: 192.168.0.10 --- 0x2 Internet Address Physical Address Type 192.168.0.1 00-02-78-71-53-a8 dynamic 192.168.0.188 00-50-8d-e7-5d-6b dynamic Now the trick is to match up _SERVER["REMOTE_ADDR"] with the correct line from the output, and voila this gives me the mac address of the client requesting from my server. The problem you face is when the remote client is on a different physical segment, as such its impossible (or extremely difficult without additional technologies) to obtain their MAC address. As Ben said he was using a local intranet server I'm sure Rory Browne's post is completely valid, for request from his LAN. Andrew - Original Message - From: "M. Sokolewicz" <[EMAIL PROTECTED]> To: "Rory Browne" <[EMAIL PROTECTED]> Cc: "Ben Sagal" <[EMAIL PROTECTED]>; Sent: Sunday, October 09, 2005 11:52 PM Subject: Re: [PHP] Get Mac Address That will give you the *local* mac address, not that of the user visiting your page. The problem is the fact that the mac address is not sent as part of the REQUEST. As such it's not possible for PHP to find out what it is. So, unfortunately, no. (Though it's a very common question on this list) - tul Rory Browne wrote: On unix man arp on windows arp/h arp/help arp/? sorry for short and sweet resp, but I'm falling asleep. On 10/9/05, Ben Sagal <[EMAIL PROTECTED]> wrote: I have a local intranet server, running apache1.3+php4. Is it possible to get the mac address of computes which access on of my php pages? Ben -- 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
Re: [PHP] Mystery about chmod and permissions
Jeffrey Santos wrote: To save on computing time, the results of the fileperms command are cached... I assume when you run a new instance of the program, it uses a new cache / old one is deleted when the first instance ends. Either way, you should clear the cache first: clearstatcache(); echo "Directory permissions for $dirname: ". substr(sprintf('%o', fileperms($dirname)), -3). " //reports 0755; Give that a try - Jeff -Original Message- From: Al [mailto:[EMAIL PROTECTED] Sent: Sunday, October 09, 2005 3:50 PM To: php-general@lists.php.net Subject: [PHP] Mystery about chmod and permissions I've got a script that checks a directory's permissions for 757 and if they are not correct, chmods them with a cgi script. That part works just fine. Can alternately switch the permissions from 755 to 757 and back. I can use a ftp utility to check the permissions and they are correct. The mystery is that I have a permissions check following the chmod and it reports the permissions that existed before the change. snippets: include "http://$server/cgi-bin/chg_perms.cgi?name=$fp_name&perms=$fperms";; //e.g., $fperms= 0757; [I've tried sleep(10) here; doesn't help] echo "Directory permissions for $dirname: ". substr(sprintf('%o', fileperms($dirname)), -3). " //reports 0755; If I run the script again with the same permissions, the report shows the correct permissions. It's as if permissions check code is executed before the chmod; but it isn't. I've tried echoed the times for the chmod code and the permissions check and the chmod code is definitely before the permissions check. Anyone have an explanation.? That did it. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mambo question..??
hi... i'm going through the mambo app, trying to figure out where in the code the app starts to generate the actual menus for the Admin functions. i've tracked the actual code that gets generated "mod_fullmenu.php" but i can't seem to tell exactly how this code in the jscript gets generated... it appears that the "mod_fullmenu" page is somehow included, but i can't find out where this happens. and yeah, i've tried to ask/send emails to people on the mambo list with no luck. so i figured i'd ask here, if anybody has experience with playing with the code of mambo... thanks bruce [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mambo question..??
Bruce, I'm not sure what exactly you need to know, but I'll try to clarify a few thing for you at best that I can. bruce wrote: > i'm going through the mambo app, trying to figure out where in the code the > app starts to generate the actual menus for the Admin functions. i've > tracked the actual code that gets generated "mod_fullmenu.php" but i can't > seem to tell exactly how this code in the jscript gets generated... it The full menu utilizes JSCookmenu class, where the menu items are hardcoded in the mod_fullmenu.php, from around line: 60 - 320+ > appears that the "mod_fullmenu" page is somehow included, but i can't find > out where this happens. Here's what I don't quite understand what you mean by "where this happens". Did you mean how the mod_fullmenu.php is eval'd? The way Mambo works is by 'including' the scripts into different sections by using the mosLoadAdminModule('position_name') function call. The funcion just regurgitates the PHP code so that it is interpreted. > and yeah, i've tried to ask/send emails to people on the mambo list with no > luck. so i figured i'd ask here, if anybody has experience with playing with > the code of mambo... I have quite a few years of experience in dealing with Mambo, but I'm definitely no expert. Hope that helps anyway. -- Wee Keat Chin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Send postcard link
On server-1 I have my photogallery working. On another box, server-2, I have my postcard script also working great. Users can send postcards using ready inhouse designs or upload their own (max 100K). Both have been serving our community for the past 2 years or so. Current requirement: When I browsed my photogallery, I would like to have a button that says 'Send this picture as postcard'. Behind the scenes, how do I send that picture to server-2 postcard script? Please advise. -- Roger --- Sign Up for free Email at http://ureg.home.net.my/ --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Get Mac Address
On 10/10/05, M. Sokolewicz <[EMAIL PROTECTED]> wrote: > That will give you the *local* mac address, not that of the user > visiting your page. The problem is the fact that the mac address is not > sent as part of the REQUEST. As such it's not possible for PHP to find > out what it is. So, unfortunately, no. (Though it's a very common > question on this list) > Normally I would agree, but he said he was running a local intranet server. arp will work, if you're on the same network as the computer you are querying, but if not, then arp will give you the mac address of the router. arp can be used to get the mac of a certain machine as well(identified by its IP), as well as listing out the cache of machines that have recently connected. > - tul > > Rory Browne wrote: > > On unix > > man arp > > > > on windows > > arp/h > > arp/help > > arp/? > > > > sorry for short and sweet resp, but I'm falling asleep. > > > > On 10/9/05, Ben Sagal <[EMAIL PROTECTED]> wrote: > > > >>I have a local intranet server, running apache1.3+php4. Is it > >>possible to get the mac address of computes which access on of my php > >>pages? > >> > >>Ben > >> > >>-- > >>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] I want to know if some link is online
I would like to know if a web is online, a have this code: enlace.php In other page I hve this: page.php http://www.cfg.jovenclub.cu";> Somebody can tell me what it's wrong, because the image did not show, of course that the pages and bouth image are in the same dorectory. Please any suggestion -- Este mensaje ha sido analizado por MailScanner en busca de virus y otros contenidos peligrosos, y se considera que está limpio. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] I want to know if some link is online
Jesús Alain Rodríguez Santos wrote: I would like to know if a web is online, a have this code: enlace.php Why not use file_exists()? Also, you probably want to use $_GET['enlance'] rather than $enlance. if (!$enlinea){ header("Location: $muerto"); } You need to specify an absolute URI here (http://www.example.com/myimage.gif for example). -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Send postcard link
Roger Thomas wrote: >On server-1 I have my photogallery working. On another box, server-2, I have >my postcard script also working great. Users can send postcards using ready >inhouse designs or upload their own (max 100K). Both have been serving our >community for the past 2 years or so. > >Current requirement: > >When I browsed my photogallery, I would like to have a button that says 'Send >this picture as postcard'. Behind the scenes, how do I send that picture to >server-2 postcard script? > > > The easiest way would probably be to use file_get_contents, which is binary safe. The file_get_contents function supports opening remote files if allow_url_fopen is activated. An example: $handle = fopen("ftp://user:[EMAIL PROTECTED]/somefile.txt", "r"); Regards, Torgny -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] GET variables and mySQL functions inside an Image header.
I am currently in Afghanistan and don't have much access to look these questions up. I consider them basic and regret having to post them here. When passing variables using GET as in: index.php?first=value?second=value My script is reading the first value, however through an included file and another function, it can't read the second. What scope do these variables have? Or what other reasons for not being able to read the variables might there be? Second: When dynamcially creating an image: I am drawing an image based on data retreived from a mySQL resource. However, my DB code is in the same file as the php image file and I get the non-descriptive error of "Error in the image 'url'" Are you allowed to do any other functions inside an image header other than image functions? (Functions being; open a connection to mySQL and do queries) Thank you for your help, -Kristopher Kane
Re: [PHP] GET variables and mySQL functions inside an Image header.
On Mon, 2005-10-10 at 02:33, Kristopher Kane wrote: > I am currently in Afghanistan and don't have much access to look these > questions up. I consider them basic and regret having to post them here. > When passing variables using GET as in: > index.php?first=value?second=value > My script is reading the first value, however through an included file and > another function, it can't read the second. What scope do these variables > have? Or what other reasons for not being able to read the variables might > there be? Register globals is set to OFF, which is good unless your script previously relied on it being set to ON. To access the values use the super global $_GET: $first = isset( $_GET['first'] ) ? $_GET['first'] : ''; $second = isset( $_GET['second'] ) ? $_GET['second'] : ''; > Second: > When dynamcially creating an image: > I am drawing an image based on data retreived from a mySQL resource. > However, my DB code is in the same file as the php image file and I get the > non-descriptive error of "Error in the image 'url'" Are you allowed to do > any other functions inside an image header other than image functions? > (Functions being; open a connection to mySQL and do queries) Is the error a PHP error or a browser error? You can do any PHP code you want in an image generating page. Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php