Search found 36 matches

by leon
Fri Jul 30, 2004 2:11 am
Forum: PHP General
Topic: using curl and fopen
Replies: 3
Views: 1138

I noticed now that fopen was not exactly disabled from my hoster !! For example fopen does NOT work (returns a blank page) to grab a whole internet page (i.e. yahoo) , while I CAN use fopen to grab only the FIRSTEST few lines of an internet page (firstest 150 lines of yahoo home page for example) . ...
by leon
Thu Jul 29, 2004 10:47 pm
Forum: PHP General
Topic: using curl and fopen
Replies: 3
Views: 1138

thank you . I think that ereg and other string formatter doesn't work with curl . Because on this $grabb = eregi("<title(.*)/title>", curl_exec($ch), $printingb); I cannot see errors . $printingb[1] should return only from <title to /title> . Instead when curl execu...
by leon
Thu Jul 29, 2004 12:36 am
Forum: PHP General
Topic: using curl and fopen
Replies: 3
Views: 1138

using curl and fopen

Hello my hosting provider denied the users the usage of fopen so i cannot more use something like this to grab yahoo web page from <title> to </title> (yahoo is only an example.) $fbileb = fopen("http://www.yahoo.com", "r"); $rfb = fread($fbileb, 50000); $grabb = ...
by leon
Tue May 13, 2003 1:24 am
Forum: mySQL & php coding
Topic: table corrupted :(
Replies: 4
Views: 1312

Pejone wrote:i am afraid - but not=(((


my error was because I never optimized the tables ?
by leon
Mon May 12, 2003 11:01 pm
Forum: mySQL & php coding
Topic: table corrupted :(
Replies: 4
Views: 1312

table corrupted :(

One of the tables in my mySQL database appears to have become corrupted. Attempts to access the table return an error "Can't open file: 'Survey_Answer.MYD'. (errno: 145)". Is it possible to restore this table? Anyone can tell me what has happened and possibly if it was something I can prevent ? Than...
by leon
Wed Apr 30, 2003 1:29 am
Forum: PHP General
Topic: How popular is PHP? And a real question...
Replies: 6
Views: 3098

how is popular php ? look m the number of php scripts compared with perl .. 1 years ago php scripts on hotscripts were below 3000 and 2 years below 1000 .. now they surpassed at the speed of light perl scripts ..... which are stable around 3500/4500 scripts in the last 2 years (!) Looking hotscripts...
by leon
Wed Apr 30, 2003 1:24 am
Forum: PHP coding => General
Topic: how to ping
Replies: 4
Views: 1285

unluckly pear link didn't help .It still require root and my php scripts run nobody .Searching a perl script :cry:
by leon
Wed Apr 30, 2003 12:25 am
Forum: PHP coding => General
Topic: how to ping
Replies: 4
Views: 1285

Understand , Thank you for link !!!
by leon
Tue Apr 29, 2003 4:29 am
Forum: PHP coding => General
Topic: how to ping
Replies: 4
Views: 1285

how to ping

Hi ! anyone can tell me why this little script does not work ? ( I receive following error ping: icmp open socket: Operation not permitted ) <? $domain="yahoo.com"; $run = shell_exec("/bin/ping -c5 -n -q -w5 $domain 2>&1"); echo $run; ?> Thanks 1000X!
by leon
Mon Nov 18, 2002 9:56 am
Forum: PHP coding => General
Topic: help managing string
Replies: 1
Views: 1054

Re: help managing string

leon wrote:hi ,

I have this ...

Code: Select all

$url ="/home/test/public_html/asdfasdf"; 


and I need to extract from it only /asdfasdf . Anyone can help me ?


ok I solved using list and split :wink:
by leon
Mon Nov 18, 2002 9:40 am
Forum: PHP coding => General
Topic: help managing string
Replies: 1
Views: 1054

help managing string

hi ,

I have this ...

Code: Select all

$url ="/home/test/public_html/asdfasdf"; 


and I need to extract from it only /asdfasdf . Anyone can help me ?
by leon
Fri Nov 08, 2002 2:01 am
Forum: PHP coding => Mail
Topic: Auto Sender e-mail
Replies: 5
Views: 3168

cron is a linux command , is not related with php .

You have to read linux docs about cron
by leon
Thu Nov 07, 2002 6:23 am
Forum: PHP General
Topic: perl question [OT]
Replies: 3
Views: 2052

T H A N K Y O U !
by leon
Thu Nov 07, 2002 6:21 am
Forum: PHP Installation
Topic: PhpBB Forum
Replies: 1
Views: 1823

Re: PhpBB Forum

Hi I´m newbie in phpBB. I would like to install one but i dont know what to do with Database.. always when i try to install it, appears it: phpBB : Critical Error Could not connect to the database i dont know what db is..i have a site in lycos.co.uk that i can make my database, but i dont know what...
by leon
Thu Nov 07, 2002 6:17 am
Forum: PHP coding => General
Topic: simple beginner question....
Replies: 2
Views: 1954

Re: simple beginner question....

Take a look to this code : <? if($submit) { echo entrou; $db = mysql_connect("localhost", "parxal","sjrlop"); mysql_select_db("maillist",$db); $sql = " INSERT INTO maillist (name,email,morada,url) values ('$nome','$email','$morada','$url') "; echo "Thank you! Information entered.\n"; } else { ?> <f...
by leon
Tue Nov 05, 2002 1:44 pm
Forum: PHP coding => General
Topic: converting to small caps
Replies: 2
Views: 1355

try searching the php-website . there is an online manual wich is searchable and can answer a lot of questions. For now, see this page Greetz Daan thanks a lot Daan :P you helped me a lot . Sorry me for stupid quesiton above but before asking here I always searching on php net . I was not find it o...
by leon
Tue Nov 05, 2002 1:29 pm
Forum: PHP coding => General
Topic: converting to small caps
Replies: 2
Views: 1355

converting to small caps

Hello ,

I have

$text = "AaAaA";

Is it possible to convert it to

$text = "aaaaa";

or to

$text = "AAAAA";

Thanks a lot
by leon
Tue Nov 05, 2002 12:23 pm
Forum: PHP coding => General
Topic: again on ereg and empty spaces
Replies: 2
Views: 1444

$value = str_replace(' ','%20',$value); If you're building an URL and want to prevent problems with special characters when it is clicked you should use the function urlencode , that function will also take other characters into account. Greetz Daan double thanks , yes I need urlencode !
by leon
Tue Nov 05, 2002 11:18 am
Forum: PHP coding => General
Topic: again on ereg and empty spaces
Replies: 2
Views: 1444

again on ereg and empty spaces

Hello

I have a problem ..

if a variable $text contains some empty space " " , I need to replace all this empty spaces with %20 , and the result must gone on $text2 .

How can I do it ? Anyone can help me ?

Thanks
by leon
Tue Nov 05, 2002 11:00 am
Forum: PHP coding => General
Topic: working with ereg to refuse empty spaces
Replies: 2
Views: 1571

Re: working with ereg to refuse empty spaces

Hello , I use this code to check what entered on my $name webform if (strlen ($name) < 1 || strlen ($name) > 20 || !ereg ("[a-z0-9]", $name)) { $error = "Please check name entered"; } else $error = ""; however if in the webform...
by leon
Tue Nov 05, 2002 10:58 am
Forum: PHP coding => General
Topic: working with ereg to refuse empty spaces
Replies: 2
Views: 1571

working with ereg to refuse empty spaces

Hello , I use this code to check what entered on my $name webform if (strlen ($name) < 1 || strlen ($name) > 20 || !ereg ("[a-z0-9]", $name)) { $error = "Please check name entered"; } else $error = ""; however if in the webform ...
by leon
Fri Nov 01, 2002 2:23 pm
Forum: PHP General
Topic: working with a string..
Replies: 2
Views: 1904

Jay wrote:A variety of methods are open to you. If you just want the user name from an email you can use:
list($user,$domain) = explode("@",$email);

$user will now be "test"


:P , Thanks Jay , you are a php guru I am loving php and this forum too !
by leon
Fri Nov 01, 2002 2:12 pm
Forum: PHP General
Topic: working with a string..
Replies: 2
Views: 1904

working with a string..

I have a problem managing a string ..

I have

$email = "test@foo.bar";

and I need to echo only "test" (excluding @foo.bar ) .

Any idea to do that :roll: ? Thank you
by leon
Thu Oct 31, 2002 6:45 am
Forum: PHP General
Topic: perl question [OT]
Replies: 3
Views: 2052

anyone , or at least where can I find a perl forum ?

thanks
by leon
Thu Oct 31, 2002 3:45 am
Forum: PHP General
Topic: perl question [OT]
Replies: 3
Views: 2052

perl question [OT]

sorry a question about perl ..

this line

my ($newhost) = $ENV{'HTTP_HOST'};

returns

http://www.mydomain.com

but on my $newhost i need only mydomain.com without "www."


What can I do , my perl experience is very low , anyone can help me ?

Thanks !!!