Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    PHP




Make Links Active


Im just wondering if there is anyway to automatically make any urls in my page content, into clickable links. Basically I have a small forum I built, and I want to make any URL the user enters, into a clickable link. So if I had www.google.com as plain text, then it would make it into a clickable link.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
How To Automatically Make URLs Posted In A Forum Active Links?
I've been working on modifying a forum script for some time now and its almost ready to go. You can test it at http://www.designlaunchpad.com/forum if you like. The one additional feature I want to implement is the automatic creation of a link when someone posts a URL in their message. Most forums have this, is it that tough to add in? I'm pretty comfortable editing PHP and understanding what is happening where but I suck at authoring it. I checked the manual at php.net and tried searching this forum and google but keep running into dead ends. So can someone offer me some suggestions or point me toward some help?

Active Persistent Links And Active Links Both 0
I just installed Apache/MySQL/PHP

I'm trying to test if the connection to MySQL is there

I know the database works on its own, I checked that

when I run phpinfo() I get mysql listed, I'm just wondering if when it says "Active Persistent Links" and "Active Links" both 0 (zero) under "enabled" column, is that fine, meaning configured properly?

Make An Active Users Script In PHP
I'm trying to make an active users script in PHP, not because I need one, because I want to know if i can. I made one that worked with PHP sessions but then it failed to work with people who had cookies turned off. So, now the script i'm using stored the time and users IP in a flat file. Needless to say it doesn't work for a seemingly unknown reason.

It's a pretty small script that I heavily commented so I wouldn't get lost. If one of you more experienced PHP gurus can take a look through it real fast and tell me what's wrong and what I could do to fix it that'd be great. Code:

How Do You Make Links Like: Something?id=3
Does anyone know where i can find a tutorial about how to make dynamic pages wtih id links.

How To Make Data Pulled Into Links?
i seem to be having trouble trying  to make the hacks that are pulled down into a link for exammple when you select a category it loads all the hacks that are associated with that category, now i need those hacks linkable so that they have there own page for example this will be the link hacks.php?hacksid=hacksid (hacksid being what ever that hack id is) Code:

How To Make Display Links From Mysql Database?
i have the following problem and i am breaking my mind on it:
I have a mysql database with (id,title,topic,body) in the database i have
stored some documents.
How can i display a link with only the title of the document stored?(easy
one) but...
I want to view the whole document in the same page!
Let me explain in code:

<?php
$ip = "localhost";
$user = "kostas";
$password = "kostas";
$basename = "test";
$table ="docs";
$db = mysql_connect($ip, $user, $password);
mysql_select_db($basename,$db);
$result1= mysql_query("SELECT * FROM $table ORDER BY id DESC LIMIT 5 ");
$myrow = mysql_fetch_array($result1);
$title = $myrow["title"];
$intro = $myrow["intro"];
$body = $myrow["body"];
?>

List Contents Of A Folder, Make List Of Links
Does anyone know how I can write a script that:

- reads in all the files in a particular directory
- displays the file names in a html list and makes a link of them:
<ul>
<li><a href="filelocation1">filename 1</li>
<li><a href="filelocation2">filename 1</li>
<li><a href="filelocation3">filename 1</li>
</ul>

etc.?

So basically it creates a list of links with the contents in that directory,
so you can download them from there.

Active Directory / Exchange / Active Directory.
I'm creating an Intranet module for a client (Forum, files upload...etc...etc). This client already has a huge server running on WIN2000 + IIS 4 + Exchange + Microsoft Active directory + proxy and finally PHP 4.03 + MySql.

Problem #1 :
All passwords are changed every weeks, so I want to be able to import users/pass from Microsoft exchange .... Does anyone have an idea to do such thing with PHP ?

Problem #2:
I would like that the user logged from the firm's network do not have to log. again when connecting the module. So, is it possible to do such thing ?

No Libphp4.so File Created In Make Intstall Or Make.
I have done a make, and a make install on the 4.3.6 version, using
/usr/local/etc/php as the directory I make from. However, no matter what
I do, I do not see a php4lib.so that has been created. The documentation
I recieved (an IBM source) says that the following has to be added to the
httpd.conf file :

LoadModule php4_modulelib/apache/libphp4.so
..
..
..
AddModule mod_php4.c

here is the output from my make install :

[root@mail php]# make install
Installing PHP SAPI module: cgi
Installing PHP CGI into: /usr/local/bin/
Installing PEAR environment: /usr/local/lib/php/
[PEAR] Archive_Tar - already installed: 1.1
[PEAR] Console_Getopt - already installed: 1.2
[PEAR] PEAR - already installed: 1.3.1
Wrote PEAR system config file at: /usr/local/etc/pear.conf
You may want to add: /usr/local/lib/php to your php.ini include_path
[PEAR] DB - already installed: 1.6.2
[PEAR] HTTP - already installed: 1.2.2
[PEAR] Mail - already installed: 1.1.3
[PEAR] Net_SMTP - already installed: 1.2.3
[PEAR] Net_Socket - already installed: 1.0.1
[PEAR] XML_Parser - already installed: 1.0.1
[PEAR] XML_RPC - already installed: 1.1.0
Installing build environment: /usr/local/lib/php/build/
Installing header files: /usr/local/include/php/
Installing helper programs: /usr/local/bin/
program: phpize
program: php-config
program: phpextdist

How To Count Links To External Links?
I get results of the query diplayed on my find.php page with links to different web sites. I want to store count of clicks on each of those links that are displayed on my find.php page. How can I do that?

Active Row?
I have an sql table with various fields in, one of which is "Active" which is an enum 'y' or 'n'. Basically This table holds different events, of which only 1 may be active at one time. So my question is, is their an easier/better way of doing this kind of thing. At the moment I have to check all rows in the table to find which one has active set to 'y', then if i want to change it, set it to 'n' and set the new row i want active to 'y'.

Active Directoroy With PHP
I have an active directory up and running, i can query against it from the box its on, but when i try and use php to query against it, i dont get anything. It seems to be able to connect, but unable to read the information that is there. Any idea or know where a good tutorial on active directory is? I know that is Microsoft's version of LDAP, but i wondering if there was a special way you had to do things since it is AD.

Active Time
I am wondering if their is a way to have the time update itself without refreshing the page?

PHP And Active Directory
Via a PHP script (running on a LAMP configuration - PHP with LDAP
support), I run queries on the LDAP server of our office (users and
arguments). Now, I want to put the result of this query (user
information) in a Windows 2003 AD.
I use PHP-ldap functions to connect with the domain controller: making
connection is no problem, but binding (authenticated, I even tried
Domain Administrator credentials) doesn't work...
Does anyone has experience with this matter (PHP and AD
connection/communucation)?

Active Sessions
How do I know how many active conecctions are in my server (with PHP)? I've done it with ASP, and it's WAY too easy, so I guess it should be in PHP.

PHP And Active Directory 2K3
Note: I'm cross-posting the below to nyphp.org as well.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~
I've been struggling with an issue for a few months. I am attempting to
search Active Directory 2003 via PHP, but am running into an issue
searching
from the base DN (i.e. 'cn=company,cn=com'). This seems to be somewhat
of a
known issue with AD2K3. A search at this level always returns:

Warning: ldap_search() [function.ldap-search]: Search: Partial results
and
referral received

If I change my base DN to 'ou=someOU,dc=company,dc=com', searches work
properly. I was curious to see what would happen at the command line,
so I
used openldap's ldapsearch function against AD and sure enough I got a
bunch
of results that were truncated with

ldap_result: Can't contact LDAP server

Of note: I have a base php class that sets the following options
whenever a
bind is created (seems to be necessary for searching AD2K3 at all):

ldap_set_option($this->_ldap, LDAP_OPT_REFERRALS, 0);
ldap_set_option($this->_ldap, LDAP_OPT_PROTOCOL_VERSION, 3);

Anyone have any feedback about how to search the base dn of AD2K3?

Last Active Field
If i was to make a last active field in a members table in my database and had it update the field every page they went on, would this effect anything like speed?

I was just thinking if say 100 people are using it at the same time and it's updating the database EVERYTIME someone clicks on a different part of the site, it may get a bit slow or something? Will this happen or is it fine to do this?

Active Sessions
Can you set up something in sessions that shows who is currently logged in?  The forum does it, is that in php?

Active Directory And PHP
Is there anyway to work PHP with Active directory? My intention
consist in developing an application that authenticates automatically
PHP on W2k3 server.

Active Directory Authentication Via Php.
I'm in a bit of a pickle.. at the company where I recently started
work, I discovered that the knowledge base we use sucks, and sucks bad
(oh Lotus Notes, how I loathe thee, let me count the ways)

So for kicks and giggles, I found a nice "personal notebook" solution
on the net called: http://www.tiddlywiki.com/

When this had ballooned into a big, nice knowledge base, I discovered
that there's a server-side version of it called cctiddly :

So as a test I found a free apache/php/sql solution:
- copied the cctiddly into
it, and the thing worked!

As you can see, up until now, no real programming has been undertaken
by me, at this point, I've just been at most playing around with
installing plugins into my tiddlywiki.

Of course, also, now I'm faced with the ultimate question... what's
the best way to authenticate people who want access to the wiki?

I've researched a bit, and discovered that you can enable LDAP access
via php, so theoretically you can authenticate people through AD...
which is excellent! People can just use their usual username and
password, no need to remember yet another user/pass, and no need for
admin to have to control yet another admin control thingum.

So I've been testing this out, browsing through information, and as a
test I created this:

------
echo "<h3>LDAP query test #1</h3>";
echo "Connecting ...";
$ldap_host = "localhost";
$ldap_user = "user@domain.is";
$ldap_pass = "password";
$connect = ldap_connect($ldap_host) or die ("No Connection to LDAP
server"); // must be a valid LDAP server!
echo "connect result is " . $connect . "<br />";

if (ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3)) {
echo "Using LDAPv3 <br />";
} else {
echo "Failed to set protocol version to 3 <br />";
}

if ($connect) {
echo "Binding to server...";
$bind=ldap_bind($connect, $ldap_user, $ldap_pass);
echo "Bind result is " . $bind . "<br />";
}
----
- Now this works.. if I remove the $ldap_pass in the
"$bind=ldap_bind($connect, $ldap_user, $ldap_pass); " line, because
then I'm connecting anonymously to the LDAP server...

But when I try to authenticate to the server with the password I get
this error:

"Warning: ldap_bind() [function.ldap-bind]: Unable to bind to server:
Strong(er) authentication required in C:Program Filesxampphtdocs
wikiadtest.php on line 21"

- which made me go, whu?

Now I can't change the settings on the domain controller, as I'm not
the sysadmin.. so I need to somehow create a stronger authentication
to the server.. now how the hell do I do that?

I can't install an SSL certificate, because there isn't one on the
server, is there some way for me to make the password meet the bare
minimum requirements for a stronger authentication without having to
use SSL?

An administratoir I know recommended to try to figure out how to use
either NTLM or KERBEROS... which is at least perhaps something.

Hightlight Active Link.....
I have this table for links (below), how can I set it up so that whichever section is active then that link is highlighted? PHP Code:

Testing To See If A Page Is Active?
I have a Shoutcast station that is on and off pretty regularly. I'd like to make a "power light" on my website to detect whether the station is on or off.

I'm not quite sure what the best language to handle this would be, but I think PHP should be able to do it...

The station is basically outputted as a link, like this:
http://www.myurl.com:8000/listen.pls

If it's on, it pops open the app and goes to town.. If it's off, it gives a "page cannot be displayed error" (I'd like to do something about that, but that's a different story).

So basically, I want to query the link, and if it comes back active (or true or 1 or whatever), then it includes a certain graphic; if it's not active (or false or 0 etc.) then it'd include another. I'm thinking it'd be use simple if/else statement, something like this:

$radiostatus = *radiostationquery*
if ($radiostatus == true) {
echo "poweron.gif";
} else {
echo "poweroff.gif";
}

But I'm not sure what *radiosationquery* would be. Seems like it'd be a pretty simple command. Someone (familiar with coding, but not php) suggested the Get() command might be a way to do it.

Cell Active On The Date
I have a database that has a date such as 2007-12-01 with a inactive colum, what is the best way to have it make that cell active on the date that is in the date cell? So on 2007-12-01 that site would be active.

Active Directory And LDAP
I have a php Intranet, and what I would like to do is hit the Active Directory and bring back the Username, FirstName and Lastname from Active Directory and set them to variables, so I can either display them or insert them into a database.

A few things to consider, php is installed on the server, but I don't have access to the server to change any settings.  This is just a side project and we are blowing up the existing intranet and going with a Content Management System, so the easier the better.

Active Directory Token
My environment is setup like this:

Windows Server 2003
Active Directory 2003
IIS 6.0
PHP 5.1.6

When a user tries to hit my system they are prompted for an Active Directory username / password combination. If their information is correct they get to the application. I need to modify the application code to check if the users password is about to expire.

IIS can  be configured to pass a token to the application. How would I use PHP to read the contents of this token so I can query AD?

Active Users Online
I am trying to keep track of the active users who are online. How would I implement a system of this nature?

Number Of Current Active Session
anybody knows how to count the number of currently active session? using the current session_save_handler (/tmp and not using any db).

Ldap And Php4 With W2k Active Directory
I am trying to get ldap info from a W2K active directory. I have the authentication down, but I want to search on the aa0000000 to get the name associated with the login. Basically I am making a request form that will be used once a year, but need to be sure of the people signing up, use resources already setup, and have one login/pass. Code:

Creating Active Directory User
does anyone already tried to create a user into active directory through
php_ldap ?

i tried something like this but still don't work :-/

$adduserAD["cn"][0] = "phpldapuser";
$adduserAD["samaccountname"][0] = "guguseli";

$adduserAD["objectclass"][0] = "top";
$adduserAD["objectclass"][1] = "person";
$adduserAD["objectclass"][2] = "organizationalPerson";

$adduserAD["givenname"][0] = "thomas";
$adduserAD["name"][0] = "tester";
$adduserAD["sn"][0] = "btester";
$adduserAD["description"][0] = "TEST-Account ldap";
$adduserAD["title"][0] = "Programm Manager";

ldap_add($ad, "ou=test, dc=my,dc=domain", $adduserAD) or die("error!");

Please Help With This Error: Warning: Unknown(): A Session Is Active.
I've searched high and low for this on the net but stil haven't found an
answer.

I'm trying to install both postnuke and xoops on a win2k server with php
4.3.3. and mysql installed.

Both applications are loading terribly slow. When the page finally has been
rendered I got the following error:

Warning: Unknown(): A session is active. You cannot change the session
module's ini settings at this time. in Unknown on line 0

Is it a bug in PHP? Has it something to do with the fact that I'm running it
at win2k?

Since I think it has something to do with sessions, I attach a snapshot of
the results for phpinfo()

Directive Local Value Master Value
session.auto_start Off Off
session.bug_compat_42 On On
session.bug_compat_warn On On
session.cache_expire 180 180
session.cache_limiter nocache nocache
session.cookie_domain no value no value
session.cookie_lifetime 0 0
session.cookie_path / /
session.cookie_secure Off Off
session.entropy_file no value no value
session.entropy_length 0 0
session.gc_divisor 100 100
session.gc_maxlifetime 1440 1440
session.gc_probability 1 1
session.name PHPSESSID PHPSESSID
session.referer_check no value no value
session.save_handler files files
session.save_path D:programfilesphpsessiondata
D:programfilesphpsessiondata
session.serialize_handler php php
session.use_cookies On On
session.use_only_cookies Off Off
session.use_trans_sid Off Off

Adding Fields To Active Tables In MySQL
I have a working PHP script using MySQL tables.  I want to expand on an existing table.  Is there any reason why I can't create a new field at the bottom of a table that is in use?  Since each field is being called by its name it would seem that creating a new field with a unique name wouldn't cause any problems, however, I wanted to be sure before I mess with a live site.  I'm still very new to PHP and MySQL so I tend to second guess myself a lot.

User Disabled(inactive) When I Add It To Active Directory Using Ldap_add
I succeeded in adding a new user to the Active Directory using
ldap_add, but by default, the new user is disabled(inactive). Is there
any php-command to run or flag that I have to set to enable the user I
previously created.

Authenticating Users From Windows Active Directory From PHP Code
I want to authenticate users (defined in an Active Directory Service
running on a Windows 2000 Server machine) from PHP Code running under
Linux (Fedora Core 3 with Kerberos 5 installed). I just want to find
out whether a particular user (with a given username, password
combination) exists or not. Then I will login that user into my
intranet application (developed on PHP under Linux).

Ajax Chat System - Active HTTP Connection?
I am trying to build an ajax chat system. Currently I have it so that
when you chat, you upload your message to the database, and each client
is polling that database to see if he/she has any new messages. The
problem with this is that I poll at 2 second intervals (since
connection is not active), and so its not as responsive as I'd like it
to be.

My question is, is an active HTTP connection possible? How did Meebo or
Gmail implement their ajax chat? Can someone point me to a better tool
for implementing an active-connection chat, rather than a poll-based
one?

Monitor Total User Active Time On Your Website
Any scripts that can be easily modified for this type of facility? I need a script that stores user session time and then adds them to display the total time a user has been active on my website.

Sorting Active Directory/LDAP Output (Lastname, Firstname)
My company has asked me to put a company directory on our intranet site
and I'm trying to use php to extract the users from our active
directory server. I've got everything working, however, when the list
of users is shown in the output, it seems to display the users in the
order their accounts were created, with Administrator obviously being
first. What do you think would be the best way to get the list to be
sorted by lastname (sn), based on the coding below. usort? ldap_sort?
Not really too familiar with using php and ldap or active directory.

<?php

$ldap_server = "ldap://ourldap";
$auth_user = "user";
$auth_pass = "pass";

// Set the base dn to search the entire directory.

$base_dn = "ou=staff, dc=ourldap, dc=com";

// Show People
$filter = "(&(objectClass=user)(objectCategory=person)(cn=*))";

// connect to server

if (!($connect=@ldap_connect($ldap_server))) {
die("Could not connect to ldap server");
}

// bind to server

if (!($bind=@ldap_bind($connect, $auth_user, $auth_pass))) {
die("Unable to bind to server");
}

Internet Explorer 6 Vs 7 : COM Object That Uses ADSI To Reset Active Directory Domain Accounts
Setup: IIS 6 with PHP 5.2.0

We are trying to make a COM object that uses ADSI to reset Active
Directory domain accounts. We can get the script to work great in
IE7, but anyone stilll using IE6 has problems. We are using
authentication (IWA and IIS configured not to allow anonymous) via the
browser.

I also have the same problem with a simple example script off of php's
site (http://us3.php.net/com)

<?php
$domainObject = new COM("WinNT://Domain");
foreach ($domainObject as $obj) {
echo $obj->Name . "<br />";
}
?>

In Internet Explorer 6 I just get "Schema". With IE7, I get the full
list of objects...

Links
I want to use jpg.pictures from another website.
Before I want to check if the file exist

I tried (file_exist("http://www.xx.yy/path/file.jpg"))
but that is not allowed

Also tried linkinfo("http://www.xx.yy/path/file.jpg")
but, however some files do not exist all the results are True (-1)
Thate could be correct because the path exists, the file doesn't.

Links
Is there a way I can add a link from the front page of my forum out to my php photo gallery.  I would like to make it so instead of clicking on the forum name on the first page which then takes you to a sub forum which then takes you to a thread with the link, To just click on the forum name which takes you to my photo gallery. 

Next best would be on the front page in the description of the new photo gallery be able to add a link.  Which file would I edit to change or add these links?  I know I can add a link in the overall_header.tpl but I do not see a way to change the forum name link that takes you from the first forum page to the next. 

Links
so i want to be able to have certain things in my links like so:

woods.php?area=1

not i dont want them to be able to change the 1, i have seen sites that when you hover over a link and the description and location of the link comes up in the bottom of the page it has all these ?step=1&blah=2 etc etc but when you click the link it doesnt have anything in the url bar except doc.php.

Sym Links
i have been creating sym links, for my little project and im now having problems accessing them?

You don't have permission to access /test/phpdb/mp3 on this server.
Apache/2.2.4 (Unix) DAV/2 mod_ssl/2.2.4 OpenSSL/0.9.8d PHP/5.2.1 mod_apreq2-20051231/2.5.7 mod_perl/2.0.2 Perl/v5.8.7 Server at clark.ee. Port 80

user nobody has permission to all directories in htdocs, the symlinks are stored ion /opt/lampp/htdocs/mp3

Dynamic Links???
I’ve looked at several tutorials and searched the archives of this site. I found a few pointers, but I feel entirely daft and can’t seem to quite get it.

The “ultimate” goal is to display members profiles, and not have to hard code all the bl**dy records, as I’ve done so far. (Current version http://www.internetbonsaiclub.org/c...y/profiles.html)

So, now I have the records in one table in my database. The profiles.php3 page takes all the records in that table, and displays the names in alphabetical order. So far, so good.

Now, I have viewprofile.php3, which should display only one record at a time, based on which name the visitor clicked on.

Links From Txt File
I have this code:

<?
$links = file("mylinks.txt");
$antal = sizeof($links);
for($vis=0; $vis<$antal; $vis++) {

echo"<a href='" . $links[$vis] . "'>" . $links[$vis] . "</a><br>";
}
?>

It works fine, but:
When I view the source, there's a linebreak (as in the txt file) after each $links[$vis]

And I don't like it!
How can I prevent the linebreak?

Function Links
I have seen on some sites (evilwalrus.com for one) where they not only highlight the PHP code in the scripts they display but they also link any native PHP functions from within the code to there explanations like in the example below and I was wanting to if anyone knew how I might accomplish something like this. Code:

Previous And Next Links
How would I make automated Previous/Next buttons on my web-site (using php and mysql). I have read many different articles on the web, but none of those have helped me. What I need is the Previous/Next links show up depending on the number of rows, and the row that the user is currently on. Basically, the number of rows is undetermined, and it should only show one row per page.

PHPSESSID And Links
My host compiled the feature into the php build that auto appends the PHPSESSID to links when sessions are on. Now, a lot of my links have the PHPSESSID value inserted in the middle of the link, after the '?'. For example: http://www.utorials.com/browse.php?...2c6d5f72e7f81=0 should be http://www.utorials.com/browse.php?cid=9&sid=0

the =0 is after the id for some strange reason. The problem is very consitant in that it appears on the same links in the same way each time. Some links are fine.
Any ideas?

UTF-8 Email With Links
I have an email in utf-8 encoding. In the content of the email, I need
to send a link in which the filename is in utf-8 string...just like
this..

$content = "<a href="http://xxxxxx/".$filename.""">Link to file</a>";

however, the link can not be correctly passsed and it automatically
encodes it into %xx format. How to solve the problem?

I've tried urlencode($filename) and urldecode($filename) but cannot fix
the problem...

In Need Of Ebook Links
im new to this group and im desperating seeking ebooks on PHP-MYSQL, so
any one plz suggest me the same one....

Links By Sql Command.
What I am trying to do is that I would like to know how to make links to take out my datas from my database. Let's say I will make 3 links. One is Name, Second is Country. Third is age. Whenever a user click one of them, it comes out my datas order by that(A-Z) like sql command---> order by name, ****ry, or age. I would like to make three links so that users can choose from these options.


Copyright © 2005-08 www.BigResource.com, All rights reserved