Ernest E Vogelsinger wrote:
At 20:48 25.03.2003, Jens Lehmann spoke out and said:
[snip]
To actually check on the HTTP status codes you need to run your own, either
using cURL, or by doing your own stuff using fsockopen().
I tried using fsockopen(), but
David Otton wrote:
On Sun, 23 Mar 2003 21:21:39 +0100, you wrote:
The following short script retrieves a file over HTTP:
$url = 'http://www.example.com/';
implode('',file($url)); // or file_get_contents()
Now I'd like to find out which file was really retrieved, for instance
http://www.example.
The following short script retrieves a file over HTTP:
$url = 'http://www.example.com/';
implode('',file($url)); // or file_get_contents()
Now I'd like to find out which file was really retrieved, for instance
http://www.example.com/index.html. Is this possible and how?
Background:
I need to wr
Jome wrote:
Jens Lehmann wrote:
Hello,
I want to extract the "name"-attribute of all anchors out of an
HTML-source-code which don't have the "href"-attribute. I can use this
code to get the "name"-attribute:
preg_match_all('/]*?)name=[ \'\"](.*
Hello,
I want to extract the "name"-attribute of all anchors out of an
HTML-source-code which don't have the "href"-attribute. I can use this
code to get the "name"-attribute:
preg_match_all('/]*?)name=[ \'\"](.*?)[ \'\"](.*?)>/is',$src,$ar);
The name-attributes are now in $ar[2]. How can I ex
Beau Hartshorne wrote:
Jens,
I would suggest that you try writing a script that keeps track of how
many tags have been opened (look for "<"), versus how many tags have
been closed ("[^>]*/>") on a line-by-line basis. Using that number, you
should be able to indent the code properly.
I need to coun
The following problem seems to be hard to solve:
A PHP-Script reads in an HTML-File and removes linebreaks, tabs and not
needed spaces. After that the script should reconstruct the
table-structure this way (example):
...
James wrote:
LWP is a perl thing. Curl is probably the best thing to use.
Have you tried using googles php api which they provide free?
http://www.google.com/apis/
I had a look at the API, but I'm not sure if it's appropriate and easy
to use with PHP. It's still beta and might change again (or ma
James Holden wrote:
Welcome to a mine field of problems :-)
1. The url you have entered is invalid. Thats a good first check to
make usually. Try /search?q=test to get that bit sorted.
Ok, this was just a typo. :)
2. Google prevents known useragents from accessing it's content as it
believe
For reading in and displaying a file $uri I use this short script:
http://www.google.de?q=test';
echo implode('',file($uri));
?>
Of course this works well for almost every website, but I have problems
reading in the results of google (for instance the URI above). The error
message I get is:
[07
I tested some different things, which didn't work. Any more ideas
are appreciated.
Jens
> untested:
>
> preq_replace('/\[\*\]([^(\[\*\])(<\/ul>)]*)/i','$1',$text);
>
>
>
> Jens Lehmann wrote:
>
> >Hi out there,
> >
> >I enc
>> ... If this is really what the W3C validator tells you you should file a bug
> report, IMHO. Passing GET variables should be valid HTML ;-)
Usually entities start with "&" and end with ";". The "entity" §ion
doesn't end with ";" and is not defined, that's why it's not valid.
Jens
PS: Be awa
Hi out there,
I encountered a lot of problems while trying to convert a list
in Forum-Code (like UBB-Code).
[list]
[*] item 1
[*] item 2
[*] item 3
[/list]
should be converted to
item 1
item 2
item 3
I converted the first one to
[*] item 1
[*] item 2
[*] item 3
Now I need a Regexp for co
Can anyone explain me why the following code causes
the parse error "... unexpected * ... " ?
class test
{
var $a = 2*10;
}
Of course I know why there's a parse error, but I don't
know the reason why PHP doesn't allow this multiplication,
although it allows a statement like e.g. var $a = 20.
> > -Original Message-
> > From: Jens Lehmann [mailto:[EMAIL PROTECTED]]
> > Sent: 27 May 2002 12:48
> >
> > > > -Original Message-
> > > > From: Jens Lehmann [mailto:[EMAIL PROTECTED]]
> > > > Sent: 24 May 2002 20:31
&g
> > -Original Message-
> > From: Jens Lehmann [mailto:[EMAIL PROTECTED]]
> > Sent: 24 May 2002 20:31
> >
> > time() returns the number of seconds since the Unix Epoch to
> > the current
> > local time
> >
> > gmtime() should return
time you get to your ini_set() it is too late. So no, that won't
> work. You need to set it in your php.ini, httpd.conf or .htaccess.
>
> -Rasmus
>
> On Sun, 26 May 2002, Jens Lehmann wrote:
>
> > I tested ini_set('register_globals',0) and
ini_set('
I tested ini_set('register_globals',0) and ini_set('register_globals','Off')
for turning register_globals off. It doesn't work and it doesn't produce any
notice, warning or error.
Here's a quick example:
$test";
?>
This prints out $test, what it shouldn't do with register_globals turned
Maybe Apache and PHP have problems with the 2MHz-CPU. :-)
I can only guess what may be the problem:
1. You didn't write phpinfo.php correctly.
2. phpinfo.php is in the wrong directory.
I suggest this because if the apache-site comes up correctly and
phpinfo.php does not it _might_ be a director
> I don't know what gmtime() is supposed to do. But is gmmktime() similar?
> http://www.php.net/manual/en/function.gmmktime.php
> -Kevin
Sorry, my first answer was incorrect. gmmktime() does not do what I want.
Do you have any other suggestion why we need/don't need gmtime()?
Jens
--
PHP G
> I have a script that switches.
> switch($pid)
> {
> case 1:
> break;
>
> case 2:
> break;
> }
>
> Now I'm doing a check in case 1 and if everything goes well, i want to
> switch directly to case 2 while the script is runny.
>
> How would i do that ???
>
Please don't post the sam
> I have a script that switches.
> switch($pid)
> {
> case 1:
> break;
>
> case 2:
> break;
> }
>
> Now I'm doing a check in case 1 and if everything goes well, i want to
> switch directly to case 2 while the script is runny.
>
> How would i do that ???
>
Don't write "break;" in
> > Just be sure you call session_start() on any page you want to access
> > session variables.
> >
>
> I have to call this function on each page I use session variable or juste
> once ?
The statement is pretty clear. You've to call it once on each page you want
to access session variables.
>
>
> Hi there,
>
> I am pulling out an image out of a mysql blob field. The image is there, I
> can see it in mysqlfront. So I pull it out of the db store it into a
> variable and then do a:
>
> header("Content-type: image/pjpeg");
> echo $picture;
>
> I do get a white screen and the browser is lo
e() does exactly what I want if I don't pass arguments but since
this behaviour is not documented it's probably confusing to a lot of people,
isn't it?
Jens Lehmann
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> Did you see gmdate()?
> http://www.php.net/manual/en/function.gmdate.php
Yes, of course.
I can do time()-date("Z") to have gmtime
(or maybe) something better, but wouldn't it be better to
have gmtime() implemented anyways? Please tell me if I
missed something. Thank y
Any reasons why there's no gmtime()-function in PHP? I'd like to hear your
thoughts.
Jens Lehmann
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
structure. The order in which the columns/fields
are
> defined is their numeric order.
> Second, mysql_fetch_row() will accomplish what he needs.
> Third, we answered this yesterday.
>
> -Original Message-
> From: Jens Lehmann [mailto:[EMAIL PROTECTED]]
> Sent:
> Is there a way to access a column in Mysql just by using a number?
Please refer to the MySQL-Documentation. A database doesn't have
any predefined structure, so you're responsible for doing this. Can you
explain why you need this "feature"?
> Like if you had three columns called "column1", "c
29 matches
Mail list logo