pzuurveen 90 Posting Whiz in Training

The header gets sent before the first output. In your case
at line 1

<a href='?goto=register'>register</a>

you cant do a header call after that as you do at line 28

pzuurveen 90 Posting Whiz in Training

Thank that helpt a lot

ure code was fare les buggy then my first test about it
sorry for that

think it works now

FYI

- wasn't that sure about lynx -dump option so now using curl
- didn't get awk to read $PID_GREP so had to put it all in one line
- awk don't like . (dot)

#!/bin/bash
PID_COUNT=`ps aux |grep curl |grep -v grep |awk '/layer/tweetserver { n++ }; END {print n+0}'`
if [ $PID_COUNT == 0 ]
then
curl http://www.openeindhoven.nl/layer/tweetsever.php
fi]
pzuurveen 90 Posting Whiz in Training

are your comment text?
The u can't store them in a longint. Just use TEXT as ur column type
If there are numerical i don't see the problem with new lines

pzuurveen 90 Posting Whiz in Training

Filetype is't what u want.
check for gif file

if (exif_imagetype($dirArray[$index]) == IMAGETYPE_GIF)
                     $NumberOfGif++;

to check for other image types see
http://nl.php.net/manual/en/function.exif-imagetype.php
This look inside the file and is therefor slow but gifs u the true type of the image
a .png renamed .gif wil be recognised as png

to simply check the exstenion or check for non images (faster!)
use

$path_parts = pathinfo($dirArray[$index]);
if ( $path_parts['extension']=='gif')
               $NumberOfGif++;
pzuurveen 90 Posting Whiz in Training

Thanks f
But it doesn't work
if i do ps aux i get alot of apache 4365 0.0 0.7 386096 45168 ? S JAN25 1:26 /usr/sbin/httpd but no referens to what website they serves

pzuurveen 90 Posting Whiz in Training

you can use something like to find out whats wrong

$related_query = mysql_query(' your query here' )or die( mysql_error());
pzuurveen 90 Posting Whiz in Training

Hi
I've writen a server is PHP that i want to run every min.
so i can do something like in cron

*/1 * * * * lynx -dump http://www.somedomain.com/myserver.php

But i want to make sure there only 1 running.
The web tells met to check for an prosesid but i running PHP as an apache module so ther is no prosesid.
Does any one have any idears?

Thanks

p.s runing redhat el5

pzuurveen 90 Posting Whiz in Training

The width is part of the image tag

echo "<td><img width = '75' src='http://". $row['url'] . "' /></td>";
Kniggles commented: works a treet thanks +1
pzuurveen 90 Posting Whiz in Training

You have an error in your select statmend on line 5

echo "DB_Backup <select name='DB_Backup'>";
pzuurveen 90 Posting Whiz in Training

You didn't seleclect your db

mysql_select_db('yourDB', $plod) or die('db not found: ' . mysql_error());
pzuurveen 90 Posting Whiz in Training

can you post youre code?

pzuurveen 90 Posting Whiz in Training

Your reverens to $_POST should be quoted like this

$_POST['topic_owner']
pzuurveen 90 Posting Whiz in Training
virtual('/Connections/conexion.php');

alsso sent the headers
can't you use include or require ?

pzuurveen 90 Posting Whiz in Training

If you check the value befor youre query, and ,if empty, just not include in your insert, mysql shout use the default NULL

pzuurveen 90 Posting Whiz in Training

all i can think of is to set the dafault to NULL
what's not the same as zero (=numerical value where NULL means doesn't exist)

pzuurveen 90 Posting Whiz in Training

Are you sure your $_SESSION get gast to the next page and is not recreated by your loginscript?
to test change

#
/* Quick self-redirect to avoid resending data on refresh */
#
echo "<meta http-equiv=\"Refresh\" content=\"0;url=".$HTTP_SERVER_VARS[PHP_SELF]."?".htmlspecialchars(SID).">";
#
return;
pzuurveen 90 Posting Whiz in Training

this might shed some light

/**
 * Define MyClass
 */
class MyClass
{
    public $public = 'Public';
    protected $protected = 'Protected';
    private $private = 'Private';

    function printHello()
    {
        echo $this->public;
        echo $this->protected;
        echo $this->private;
    }
}

$obj = new MyClass();
echo $obj->public; // Works
echo $obj->protected; // Fatal Error
echo $obj->private; // Fatal Error
$obj->printHello(); // Shows Public, Protected and Private

(copyed it form php.net)

pzuurveen 90 Posting Whiz in Training

goto
http://php.opensourcecms.com/

and trie wath the best is for what you want

pzuurveen 90 Posting Whiz in Training

an input image returns an x an y coordinate from wher you pressed on the image
http://htmlhelp.com/reference/html40/forms/input.html

You get a $_POST and a $_POST back

pzuurveen 90 Posting Whiz in Training

You missed the closing ' on your $_POST

<?php if (isset($_POST['submit'])){echo "clicked";}
pzuurveen 90 Posting Whiz in Training

to prevent uploading to big a file you can also limit it in your form

<INPUT TYPE='hidden' NAME='MAX_FILE_SIZE' VALUE='51200' />
Upload this file: <INPUT NAME='userfile' TYPE='file' ID='file'/>

recoment after this still use vaultdwellers script

pzuurveen 90 Posting Whiz in Training

haeders are send when ou output something.
so put the sesion stuf before anything else.

also make sure that there are no empty lines before your

no empty line here
<?php 

no echo here

sesion_stuff()
?>
pzuurveen 90 Posting Whiz in Training

The first time yo see the form you $_POST doesn't exist
so

<form name="frmSearch" id="frmSearch" method="POST" action="http://localhost/CSV/<?php echo $_POST['keyword']; ?>">

becomes

<form name="frmSearch" id="frmSearch" method="POST" action="http://localhost/CSV/">

not using you url rewrite but just going to index.php
the second time $_POST exits and

<form name="frmSearch" id="frmSearch" method="POST" action="http://localhost/CSV/<?php echo $_POST['keyword']; ?>">

will become

<form name="frmSearch" id="frmSearch" method="POST" action="http://localhost/CSV/foobar">

this whil triger your url rewrite

just use

<form name="frmSearch" id="frmSearch" method="POST" action="http://localhost/CSV/index.php">

and $_POST for the rest of your script

pzuurveen 90 Posting Whiz in Training

You can mak this->title an array

class Entry
   {
   private $title = array();

change the constuctor:

$result=mysql_query($query);
while($row=mysql_fetch_array($result))
   {
   $this->title[]=$row['TITLE'];
   }
pzuurveen 90 Posting Whiz in Training

i would use the the primery-key as reverns
sometin like:

tabel user:
user_id (primery key)
name
...

table contact
contact-id (primeyy key)
user_id (foren- key form tabel user)
tel
mobile
email
...

pzuurveen 90 Posting Whiz in Training

you have to pass along the session id for it to work
see:
http://nl.php.net/manual/en/session.idpassing.php

pzuurveen 90 Posting Whiz in Training

You google funtion is in javascript that runs in the brouwser,
all php is done and over (serverside) by that time.
so you have to call an external scipt or do a refrech with the the latlng as a hidden form element

pzuurveen 90 Posting Whiz in Training

On this websit you can playaround with most cms, blogs etc to find the one you like
http://php.opensourcecms.com/

pzuurveen 90 Posting Whiz in Training
pzuurveen 90 Posting Whiz in Training

What do you have as your form action?
if you call the same scrip the form rest it self.
The seleced value is in your $_POST
do

<?
var_dump($_POST);
?>
pzuurveen 90 Posting Whiz in Training

you can refrece your page after 5 sec

<META HTTP-EQUIV="refresh" CONTENT="5;URL=homegage.html

">

display the gif as any picture, you can't resize it because gif is een bitmap

pzuurveen 90 Posting Whiz in Training

you can reset the pointer with mysql-data-seek

pzuurveen 90 Posting Whiz in Training

but you run a while-loop at line 35 till its empty

pzuurveen 90 Posting Whiz in Training

$fileName_database will not be an array if mysql_fetch_array has no result ==> it returns FALSE

pzuurveen 90 Posting Whiz in Training

@ardav
i'm just say he should check the routine that put the data into the db (he didn't list it)

pzuurveen 90 Posting Whiz in Training

you said that you used Implode("/r", The Field) to create the Db

you should have used Implode("\r", The Field)

pzuurveen 90 Posting Whiz in Training
pzuurveen 90 Posting Whiz in Training

Just add

$find=$_POST['find'];

at the start of search-exec.php

pzuurveen 90 Posting Whiz in Training

use mysql_real_escape_string to make our $name

pzuurveen 90 Posting Whiz in Training

someting like this:

$query = sprintf("SELECT Personal_tutor FROM Student WHERE student_ref='%s' ",
    mysql_real_escape_string( $username));

$tutorname = @mysql_query($query); 
if (!$tutorname) {
exit ('<p> Error performaing query: ' . mysql_error() . '</p>');
}
pzuurveen 90 Posting Whiz in Training

you have a typ at the start

function confirm_query($result_set) {
if (!Sresult_set) {

must be

function confirm_query($result_set) {
if (!$result_set) {

not sure that will anser your queston

pzuurveen 90 Posting Whiz in Training

Your switch problem is fixed.
You just have a bug online 29
trie

if(strpos('*image/gif image/jpg', $Files[' file1']['type']))  {
pzuurveen 90 Posting Whiz in Training

By copying the directory you might have chanched the owner or the permisions ?

pzuurveen 90 Posting Whiz in Training

You used " in a string . This is't
nessarray. Just remove them

echo "<center><br><br><a href=http://novatrader.net/index.php?option=com_puarcade&Itemid=51>&lt;&lt;&nbsp;Choose Another Game</a></center>";
pzuurveen 90 Posting Whiz in Training

Thanks for the replay

I've discided to download the pictures. Turns out that downloading the image doesn't get blocked at all. :) :o
I put in

echo "image = <img src={$this->imageUrl} />";

to get a visual feedback during development. This does get blocked.

pzuurveen 90 Posting Whiz in Training

Hi all

I'm writing a code to search image on google and parse the urls to a flash aplication. More and more I don't get the image but a picture that tells me not to hotlink. I want to detect this so I can look for another image. I've written a funtion that checks the heather so filter bad urls but it don't detect hotlink prevention. I don't want to load the image end check it size, it will slow down my code to much.
Anyone an idear?

my funtion:

function goodUrl($urlString)
        { 
        if (strpos($urlString,'http://')===0)
                { 
                $pf = curl_init($urlString);
                curl_setopt($pf, CURLOPT_HEADER,True);
                curl_setopt($pf, CURLOPT_FOLLOWLOCATION,False);
                curl_setopt($pf, CURLOPT_RETURNTRANSFER,True);
                curl_setopt($pf, CURLOPT_NOBODY, True);
                curl_setopt($pf, CURLOPT_TIMEOUT,30);
                $ret = curl_exec($pf);
                $heathers =  curl_getinfo($pf);      
                if ((empty($ret)) || ($heathers["http_code"] <> 200)  ||                             //  bad connection
                                          (strpos($heathers["content_type"],"image/") === false))  // not an image
                    {
                    curl_close($pf); // close cURL handler
                    return False;
                    } 
                else
                    {
                    curl_close($pf); // close cURL handler   
                    return True;
                    } 
                } 
        else 
                {
                return False;
                }
       }
pzuurveen 90 Posting Whiz in Training

do you notice the de color of the code chanched after

<?region-start id="lines" type="repeat" ?>

the ?> tag closes the php sesion despate it being commened out by //

use of /* */ comment will solve this