[PHP] Re: question for "translating" fsockopen into CURL

2007-03-14 Thread Chin
Yeni Setiawan wrote:
> dear all.
> 
> I'm currently writing a script that connect to specific IP (server) at a
> specific port (1950).
> then I need to send some parameters and the server will give me a reply.
> 
> too bad, my current webhost no longer accept fsockopen().
> so I need to translate my script into CURL thingie.
> 
> here's my script using fsockopen(), and it run very well:
> 
>  $ptr=fsockopen("xxx.114.105.87",1950);
> if($ptr){
> 
> fputs($ptr,"WQUOTES-EURUSD,USDJPY,USDCHF,GBPUSD,EURCHF,EURJPY,EURGBP,AUDUSD,NZDUSD,USDCAD,GBPCHF,AUDJPY,GBPJPY,CHFJPY,AUDJPY,NZDUSD\n");
> 
>   echo fgets($ptr,500);
>   fclose($ptr);
>  }
> ?>
> 
> then, I tried following script using CURL:
> 
>  $ch = curl_init();
> curl_setopt ($ch, CURLOPT_URL, "xxx.114.105.87");
> curl_setopt ($ch, CURLOPT_PORT, "1950");
> curl_setopt ($ch, CURLOPT_CUSTOMREQUEST,
> "WQUOTES-EURUSD,USDJPY,USDCHF,GBPUSD,EURCHF,EURJPY,EURGBP,AUDUSD,NZDUSD,USDCAD,GBPCHF,AUDJPY,GBPJPY,CHFJPY,AUDJPY,NZDUSD\n");
> 
> echo curl_exec ($ch);
> curl_close ($ch);
> ?>
> 
> but it like looping forever and none the result displayed.
> 
> actually I was confused which one to replace fputs() function.
> any response will be great.
> 
you must specify the protocol, curl currently support the http,
https,ftp, gopher, telnet, dict, file, and ldap protocols(see
documenation for more).

if the protocol you use is not supported by curl,  you have to find
another way :(

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



[PHP] Re: question for "translating" fsockopen into CURL

2007-03-14 Thread Chin
Yeni Setiawan wrote:
> dear all.
> 
> I'm currently writing a script that connect to specific IP (server) at a
> specific port (1950).
> then I need to send some parameters and the server will give me a reply.
> 
> too bad, my current webhost no longer accept fsockopen().
> so I need to translate my script into CURL thingie.
> 
> here's my script using fsockopen(), and it run very well:
> 
>  $ptr=fsockopen("xxx.114.105.87",1950);
> if($ptr){
> 
> fputs($ptr,"WQUOTES-EURUSD,USDJPY,USDCHF,GBPUSD,EURCHF,EURJPY,EURGBP,AUDUSD,NZDUSD,USDCAD,GBPCHF,AUDJPY,GBPJPY,CHFJPY,AUDJPY,NZDUSD\n");
> 
>   echo fgets($ptr,500);
>   fclose($ptr);
>  }
> ?>
> 
> then, I tried following script using CURL:
> 
>  $ch = curl_init();
> curl_setopt ($ch, CURLOPT_URL, "xxx.114.105.87");
> curl_setopt ($ch, CURLOPT_PORT, "1950");
> curl_setopt ($ch, CURLOPT_CUSTOMREQUEST,
> "WQUOTES-EURUSD,USDJPY,USDCHF,GBPUSD,EURCHF,EURJPY,EURGBP,AUDUSD,NZDUSD,USDCAD,GBPCHF,AUDJPY,GBPJPY,CHFJPY,AUDJPY,NZDUSD\n");
> 
> echo curl_exec ($ch);
> curl_close ($ch);
> ?>
> 
> but it like looping forever and none the result displayed.
> 
> actually I was confused which one to replace fputs() function.
> any response will be great.
> 
you must specify the protocol, curl currently support the http,
https,ftp, gopher, telnet, dict, file, and ldap protocols(see
documenation for more).

if the protocol you use is not supported by curl,  you have to find
another way :(

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



[PHP] can't connect to mysql

2003-06-02 Thread Chin Hui
hi,

i'm a newbie in php and mysql.  i've just installed mysql 4.0.13 with a 
.tar.gz file.  PHP 4.2.2 comes along with my redhat 9 installation.
I can't seem to connect to mysql with any php scripts.  I've noticed a 
package named php-mysql.  I've tried to install, but it has a dependency 
on mysql.  It couldn't detect mysql installation that i did because i 
didn't install it with rpm binary package.  Thus, if i try to install 
the php-mysql package, i would need to install mysql 3.23.  Is there a 
way that i could get the functionality of php-mysql package?

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


[PHP] �Թ����ʹ͡����µ��-����Ѻ����ӧҹ��Ш��������Ңͧ�Ԩ������ͼ�������ҡ�����˹���ѵ���ôԵ�����Թ��������Ҵ͡ᾧ

2006-06-30 Thread k. chin
 …..1 »Õ.   2 »Õ.   ….3 »Õ. ….4 
»Õ. ….5 »Õ.
 ..30,000..   ..2,780   .1,530  ..1,120  
..…920  ..…800
 ..75,000..   ..6,920   .3,790  ..2,750 
..2,250 ..1,950
 100,000....9,170   .5,000  ..3,620 
..2,940 ..2,540
 200,000..   .18,250.9,890  .7,140  ..5,780 
..4,980
 300,000..   .27,220   14,690  10,550   
.8,510  ..7,300
 500,000..   .45,130   24,250  17,340  
13,920  11,900
 700,000..   .63,190   33,950  24,270  
19,490  16,660
 1,000,000   .90,260   48,490  34,670  27,840   
   23,790
 1,500,000  135,39072,730  52,000  41,750  
35,690

  ËÁÒÂà赯 : ºÃÔ¡ÒÃà¡çºàÍ¡ÊÒö֧·ÕèºéÒ¹áÅзÕè·Ó§Ò¹ã¹à¢µ¡Ãا෾ 
áÅлÃÔÁ³±Å 
µèÒ§¨Ñ§ËÇÑ´Êè§àÍ¡ÊÒ÷ҧä»ÃɳÕÂì
µÔ´µèÍÊͺ¶ÒÁä´é·Õè k. chin  06-7815050, 03-7797261
[EMAIL PROTECTED]
¢ÍÍÀÑÂà»ç¹ÍÂèÒ§ÊÙ§ ¶éÒËÒ¡àÁÅì¹Õéú¡Ç¹·èÒ¹

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



[PHP] preserving variable values across pages.

2002-02-11 Thread Tehn Yit Chin

Hi all,

If I have the following code,


type="submit" name="submit" value="foobar">

?>


When the user hits the submit button, the value in some_var disappears? Is
there a way of perserving the value in $some_var.

thanks in advance.

cheers,
Tehn Yit


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




Re: [PHP] Mac PHP & MySQL

2006-11-02 Thread Wee Keat Chin

Ed,

Ed Lazor wrote:
I'm trying to configure and compile PHP 5.  The configure is failing to 
find the MySQL UNIX socket.  Any ideas?


I can't tell you why because I have not a clue, but why don't you try 
using MAMP (http://www.living-e.de/en/products/The-MAMP/download.php) 
and you can then switch between PHP4 AND 5?




--
Wee Keat Chin

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



[PHP] session related

2002-01-11 Thread Mark Chin, Apoll Displays

i can't use session, give me an error when use ie 6.
 
Warning: Cannot send session cookie - headers already sent by (output
started at /home/www.apollodisplays.com/public_html/mainpage.php:10) in
/home/www.apollodisplays.com/public_html/mainpage.php on line 29
 
Warning: Cannot send session cache limiter - headers already sent
(output started t
/home/www.apollodisplays.com/public_html/mainpage.php:10) in
/home/www.apollodisplays.com/public_html/mainpage.php on line 29
 
 
my code is very simple. see below >
 
session_start();
session_register("userright"); 
$HTTP_SESSION_VARS["userright"]=$right;
 
anyone have any idea ?  thankx
 
 
 

  _  

Mark Chin <mailto:[EMAIL PROTECTED]>  
Apollo Display Technologies, LLC 
85 Remington Blvd. Ronkonkoma, NY 11779 
Ph. (631) 580-4360 EXT 19 
Fax (631) 580-4370 
http://www.apollodisplays.com