PHP - Need To Open 150 Tabs
Hi,
i need to check 150 pages, i allready have the links in a list. Instand of clicking one, going back to the document click another one etc. I want a faster way to open them all in once. how can i make a page that if i open the page the pages gets opened in tabs? (I also tried a fireflox plug in called snapLinksMod but it's quite a old build and it doesn't seem to work anymore). Similar TutorialsI'm trying to open a URL using fopen() and I keep getting this error: Code: [Select] Failed to open stream: Permission deniedI can not work out what is wrong, it's not a firewall as far as I can tell. Not to say that this occurs in every php software out there, but I far too occasionally notice that the application is written with scattered php open and close tags, for instance
<?php if(true) ?> <?php { ?> Blah blah blah, because it's true <?php } else { ?> because it's not true <?php } ?>To me, it is extremely irritating. Regardless, I see a lot of open source software written this way and I can't help but think that there must be some underlying reason for it. Magento, for example, is written exactly in this manner. The templates are infested with these opened and closed php snippets. Obscurity is not security so I'm ruling security reasons out. Maybe it is more efficient? -- But I couldn't understand why, if so. It seems like that would put more of a drag on the system itself causing php to start and stop parsing continually and excessively, then again, I'm no expert in the field of memory consumption and other operating system complexities. Honestly, in my opinion, it is stupid. i would never write a program that way.. HEREDOCs are much more useful and eye pleasing than that awful <?php { ?> I had the misfortune a few months ago when I purchased an invoicing/customer maintenance system that I didn't know was written for PHP 5.2 or something lower, one that allowed short tags; and thus short tags were used in the same manner as I've described. Is this just plain disorganization or is there some deep-seated inner lining advantage that I'm not aware of? I have a script that pulls data from my dB based on the year selected from 2006 - 2011, and if no year is selected it automatically loads the current year, 2011. I have a css that changes the design of the "tab" based on the year selected, but how do I make it so that the "On" style reflects the current year tab if no year is selected? Confused yet? I created an image of what I mean as well as the php script. if ($_GET['date']) {$year = ($_GET['date']);} else {$year = date("Y");} $query = "select DISTINCT YEAR(sold_date) AS `sold_date` FROM Sold WHERE sold_date ORDER BY sold_date DESC"; $result = mysql_query($query); $numrows = mysql_num_rows($result); while($row = mysql_fetch_array($result)){ $year = $row['sold_date']; if ($_GET['date'] == $year) { $class = "On"; } elseif ($_GET['date'] != $year) { $class = ""; } $miniNav .= '<a class="'.$class.'" href="index.php?date='.$year.'">'.$year.'</a>'; } This topic has been moved to Other Libraries and Frameworks. http://www.phpfreaks.com/forums/index.php?topic=343782.0 I made a little codebox by using a Code: [Select] . Only problem is when I insert a code and need a tab, it does not create any. Now I could just create a [tab] function but it would make long codes very annoying to add in. Inside this codebox I'll be using [color][/color] tags so I can colorize certain words, otherwise I'd just use a pre tag. So how can I get tabs to show up as tabs but only inside of this code box. Code: [Select] function bbcode2html($message) { $bbcode = array( "'\[center\](.*?)\[/center\]'is" => "<center>\\1</center>", "'\[left\](.*?)\[/left\]'is" => "<div style='text-align: left;'>\\1</div>", "'\[right\](.*?)\[/right\]'is" => "<div style='text-align: right;'>\\1</div>", "'\[pre\](.*?)\[/pre\]'is" => "<pre>\\1</pre>", "'\[b\](.*?)\[/b\]'is" => "<b>\\1</b>", "'\[quote\](.*?)\[/quote\]'is" => "<div class='top'><b>Quote:</b><hr>\\1</div>", "'\[i\](.*?)\[/i\]'is" => "<i>\\1</i>", "'\[u\](.*?)\[/u\]'is" => "<u>\\1</u>", "'\[s\](.*?)\[/s\]'is" => "<del>\\1</del>", "'\[url\](.*?)\[/url\]'is" => "<a href='\\1' target='_BLANK'>\\1</a>", "'\[url=(.*?)\](.*?)\[/url\]'is" => "<a href=\"\\1\" target=\"_BLANK\">\\2</a>", "'\[img\](.*?)\[/img\]'is" => "<img border=\"0\" src=\"\\1\">", "'\[img=(.*?)\]'" => "<img border=\"0\" src=\"\\1\">", "'\[email\](.*?)\[/email\]'is" => "<a href='mailto: \\1'>\\1</a>", "'\[size=(.*?)\](.*?)\[/size\]'is" => "<span style='font-size: \\1;'>\\2</span>", "'\[font=(.*?)\](.*?)\[/font\]'is" => "<span style='font-family: \\1;'>\\2</span>", "'\[color=(.*?)\](.*?)\[/color\]'is" => "<span style='color: \\1;'>\\2</span>", "'\n'is" => "<br>", "'\[list=o(.*?)\](.*?)\[/list\]'is" => "<ol>\\2</ol>", "'\[list=u(.*?)\](.*?)\[/list\]'is" => "<ul>\\2</ol>", "'\[li\](.*?)\[/li\]'is" => "<li>\\1</li>", "'\[code\](.*?)\[/code\]'is" => "<div class='code'>\\1</div>", ); $message = preg_replace(array_keys($bbcode), array_values($bbcode), $message); return $message; } This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=307287.0 My website sends me an e-mail when there is an error, and I would like it to look like this... Code: [Select] Date: 2012-03-17 12:36:46pm Results Code: EMAIL_USER_NOT_LOGGED_IN_2127 Error Page: /members/change_email.php Member ID: 0 IP Address: 127.0.0.1 Host Name: localhost However my PHP code isn't giving me that... $body = "A website error has occurred...\n\n"; $body .= "Date: \t\t" . date('Y-m-d g:i:sa', time()) ."\n"; $body .= "Results Code: \t\t" . $resultsCode . "\n"; $body .= "Error Page: \t\t" . $errorPage . "\n"; $body .= "Member ID: \t\t" . $memberID . "\n"; $body .= "IP Address: \t\t" . $ip . "\n"; $body .= "Host Name: \t\t" . $hostName . "\n"; What is wrong? Thanks, Debbie The code is for generated a home page with two div's: 'left_menu' and 'right_menu', where I want to navigate with the links from left_menu should display the content on the right_menu. I have two links (reports and roles) on the left_menu and two tabs (tab1 and tab2) on the right_menu. 1. When I click on reports, it should open the tab1 and clicking on users should open the tab2. 2. When I launch home.php, the first item(reports) should be opened by default and the tab1 accordingly. Here is the my code I tried, when I click the roles on left_menu, it is opening the default one i.e. tab1 and the left_menu isn't opened by default. home.php <html lang="<?php echo _SITE_LANGUAGE ?>"> <head> <script src="../js/jqueryv1.10.2.js"></script> <script type="text/javascript"> //accordion left menu $ (document).ready(function() { $ (".wings").click(function(event) { $(".box").slideUp("slow"); if ($(this).next().is(":hidden") == true) { $(this).next().slideDown("slow"); } }); //(".box").hide("slow"); }); //Tab (rightbox) $(document).ready(function() { $('#tabs li a:not(:first)').addClass('inactive'); $('.contain').hide(); $('.contain:first').show(); $('#tabs li a').click(function() { var t = $(this).attr('id'); if($(this).hasClass('inactive')) { //this is the start of our condition $('#tabs li a').addClass('inactive'); $(this).removeClass('inactive'); $('.contain').hide(); $('#'+ t + 'C').fadeIn('slow'); } }); }); </script> <style> .wings { width:200px; float:left; padding:7px 11px; } .box { width:195px; float:left; display:none; margin:0px 20px; } </style> </head> <body> <?php echo '<div class="left_menu"> <div class="wings"> <div style="float:left;"><img src="images/right_arrow.gif"/></div> <div style="float:left;padding:0px 7px;"><a href="display.php"><a href="report.php">Reports</a></div> <div style="float:right;"><img src="images/downarrow.png" style="width:17px;height:17px;cursor:pointer;"/></div> </div> <div class="box">'; $reports = $reports->get_report(); $reports_count = count($reports); if ($reports_count > 0 ) { foreach ($reports as $ds) { echo '<div style="float:left;margin:5px 14px;width:180px;"> <div style="float:left;"><img src="images/right_arrow.png"></div> <div style="float:left;padding:0px 6px;">'.$ds['dsource_name'].'</img></div> <div style="float:left;"><a href="edit_dsource.php?id='.$ds['id'].'"><img src="images/edit.gif"/></a></div> <div style="float:left;padding:1px 2px;"><img src="images/not-available.png"/></div> </div>'; } } else echo 'No Datasources'; echo '</div> <div class="wings"> <div style="float:left;"><img src="images/right_arrow.gif"/></div> <div style="float:left;padding:0px 7px;"><a href="display.php"><a href="report.php">Roles</a></div> <div style="float:right;"><img src="images/downarrow.png" style="width:17px;height:17px;cursor:pointer;"/></div> </div> <div class="box">'; $roles = $roles->get_report(); $roles_count = count($roles); if ($roles_count > 0 ) { foreach ($roles as $ds) { echo '<div style="float:left;margin:5px 14px;width:180px;"> <div style="float:left;"><img src="images/right_arrow.png"></div> <div style="float:left;padding:0px 6px;">'.$ds['dsource_name'].'</img></div> <div style="float:left;"><a href="edit_dsource.php?id='.$ds['id'].'"><img src="images/edit.gif"/></a></div> <div style="float:left;padding:1px 2px;"><img src="images/not-available.png"/></div> </div>'; } } else echo 'No Datasources'; echo '</div>'; echo '</div> <!--left_menu-->'; echo '<div class="right_menu"> <ul id="tabs"> <li><a id="tab1">Configuration</a></li> <li><a id="tab2">Report Viewer</a></li> </ul> <div class="container" id="tab1C"> <div id="content" style="padding-left:35px;"><h3><font color="brown"> </font><br> ( Report Tab content ) </div> </div> <div class="container" id="tab2C"> <div id="content" style="padding-left:35px;"><h3><font color="brown"> </font><br> ( Report Tab content ) </div> </div>'; echo '</div><!--right_menu-->'; ?> </body> </html> JS Fiddle : http://jsfiddle.net/gansai/s9NvX/1/ This topic has been moved to Other. http://www.phpfreaks.com/forums/index.php?topic=355929.0 Well I have a user profile page with codes written like this: Code: [Select] <?php $filename = "profile"; include("functions/functions.php"); include("functions/functions_users.php"); include("functions/functions_adopts.php"); include("functions/functions_friends.php"); include("inc/lang.php"); include("inc/bbcode.php"); //***************// // START SCRIPT // //***************// // This page handles user profiles and shows the site members... $user = $_GET["user"]; $page = $_GET["page"]; if($user != ""){ // We have specified a specific user who we are showing a profile for... // See if the user exists... $article_title = "{$user}'s Profile"; $query = "SELECT * FROM {$prefix}users, {$prefix}users_contacts, {$prefix}users_options, {$prefix}users_profile, {$prefix}users_status WHERE {$prefix}users.username = '{$user}' AND {$prefix}users_contacts.uid = {$prefix}users.uid AND {$prefix}users_options.uid = {$prefix}users.uid AND {$prefix}users_profile.uid = {$prefix}users.uid AND {$prefix}users_status.uid = {$prefix}users.uid AND {$prefix}users_contacts.username = {$prefix}users.username AND {$prefix}users_options.username = {$prefix}users.username AND {$prefix}users_profile.username = {$prefix}users.username AND {$prefix}users_status.username = {$prefix}users.username"; $result = runquery($query); $row = mysql_fetch_array($result); if($row['username'] == $user){ // First let's initiate tab system! include("inc/tabs.php"); include("css/tabs.css"); $article_content = "<div id='page-wrap'><div id='profile'> <ul class='nav'> <li class='nav0'><a href='#visitormessage'>Visitor Message</a></li> <li class='nav1'><a href='#aboutme' class='current'>About Me</a></li> <li class='nav2'><a href='#adopts'>Adoptables</a></li> <li class='nav3'><a href='#friends'>Friends</a></li> <li class='nav4 last'><a href='#contactinfo' class='last'>Contact Info</a></li> </ul><div class='list-wrap'>"; // Format user profile information... $id = $row['uid']; $ccstat = cancp($row['usergroup']); $website = (empty($row['website']))?"No Website Information Given":"<a href='{$row['website']}' target='_blank'>{$row['website']}</a>"; $facebook = (empty($row['facebook']))?"No Facebook Information Given":"<a href='{$row['facebook']}' target='_blank'>{$row['facebook']}</a>"; $twitter = (empty($row['twitter']))?"No Twitter Information Given":"<a href='{$row['twitter']}' target='_blank'>{$row['twitter']}</a>"; $msn = (empty($row['msn']))?"No MSN Information Given":$row['msn']; $aim = (empty($row['aim']))?"No AIM Information Given":$row['aim']; $yahoo = (empty($row['yahoo']))?"No YIM Information Given":$row['yahoo']; $skype = (empty($row['skype']))?"No YIM Information Given":$row['skype']; $row['username'] = ($ccstat == "yes")?"<img src='templates/icons/star.gif' /> {$row['username']}":$row['username']; $row['favpet'] = ($row['favpet'] == 0)?"None Selected":"<a href='http://www.{$domain}{$scriptpath}/levelup.php?id={$row['favpet']}' target='_blank'><img src='http://www.{$domain}{$scriptpath}/siggy.php?id={$row['favpet']}' border=0></a>"; // Here we go with the first tab content: Visitor Message $article_content .= "<ul id='visitormessage' class='hide'><strong><u>{$user}'s Profile Comments:</u></strong><br /><br /><table>"; $result = runquery("SELECT * FROM {$prefix}visitor_messages WHERE touser = '{$user}' ORDER BY vid DESC LIMIT 0, 10"); while($vmessage = mysql_fetch_array($result)){ $date = substr_replace($vmessage['datesent']," at ",10,1); $query2 = "SELECT * FROM {$prefix}users, {$prefix}users_profile WHERE {$prefix}users.username = '{$vmessage['fromuser']}' AND {$prefix}users_profile.uid = {$prefix}users.uid AND {$prefix}users_profile.username = {$prefix}users.username"; $result2 = runquery($query2); $sender = mysql_fetch_array($result2); $article_content .= "<tr> <td><img src='{$sender['avatar']}' width='40' height='40'></br></td> <td><a href='profile.php?user={$sender['username']}'>{$vmessage['fromuser']}</a> ({$date}) <a href='vmessage.php?act=view&user1={$user}&user2={$vmessage['fromuser']}'> <img src='templates/icons/status.gif'> </a> </br>{$vmessage['vmtext']} </br></td> <td><a href='vmessage.php?act=edit&vid={$vmessage['vid']}'> <img src='templates/icons/cog.gif'> </a> <a href='vmessage.php?act=delete&vid={$vmessage['vid']}'> <img src='templates/icons/delete.gif'> </a></br></td></tr>"; } if($isloggedin == "yes"){ if(isbanned($loggedinname) == 1){ $article_content .= "</table>It seems that you have been banned from this site and thus cannot send profile comment."; } else{ $article_content .= "</table> To Post a profile comment, please write your message in the text area below: <form action='profile.php?user={$user}' method='post'> <textarea rows='10' cols='50' name='vmtext' wrap='physical' ></textarea><br> <input type='submit' name='Submit' value='Submit'></form>"; $vmcontent = $_POST["vmtext"]; // Now check if the two users are friends... if($vmcontent != ""){ $datesent = date("Y-m-d H:i:s"); // $date = "2010-23-03 21:02:35"; $fromuser = $loggedinname; $touser = $user; runquery("INSERT INTO {$prefix}visitor_messages (vid, fromuser, touser, datesent, vmtext) VALUES ('', '$fromuser', '$touser' , '$datesent', '$vmcontent')"); $article_content .= "<p>Your comment for user has been posted. You may now view your conversation with {$user} from <a href='vmessage.php?act=view&user1={$fromuser}&user2={$touser}'>here</a>.</p>"; } } } else{ $article_content .= "</table>Guests cannot post profile comment, sorry..."; } // Now the second tab: About me... $article_content .= "</ul><ul id='aboutme'><li><strong><u>{$lang_basic_info} {$user}</u></strong><br /><br /> <img src='{$row['avatar']}' border=0 width='100' height=100 /><br /> <strong>Member Since:</strong> {$row['membersince']}<br /><br /> Gender: {$row['gender']}<br /> Favorite Color: {$row['color']}<br /> Nickname: {$row['nickname']}<br /> Bio: <br /> {$row['bio']}<br /></li>"; // The third tab: Adopts... $article_content .= "</ul><ul id='adopts' class='hide'><h2>.:AdoptSpotlight:.</h2><br /> {$row['favpet']}<br />{$row['about']}<br /><br /> <strong><u>{$user}'s Pets:</u></strong><br /><br />"; $query = "SELECT COUNT(*) AS pets FROM {$prefix}owned_adoptables WHERE owner = '{$user}'"; $result = runquery($query); $total = mysql_fetch_array($result); if($total['pets'] > 0){ $rowsperpage = 15; $totalpages = ceil($total['pets'] / $rowsperpage); if(is_numeric($page)) $currentpage = $page; else $currentpage = 1; if($currentpage > $totalpages) $currentpage = $totalpages; if($currentpage < 1) $currentpage = 1; $offset = ($currentpage - 1) * $rowsperpage; $query = "SELECT * FROM {$prefix}owned_adoptables WHERE owner = '{$user}' LIMIT {$offset}, {$rowsperpage}"; $result = runquery($query); while($row = mysql_fetch_array($result)){ $image = getcurrentimage($row['aid']); $article_content .= "<a href='levelup.php?id={$row['aid']}'><img src='{$image}' border='0' /></a>"; } $article_content .= "<br />"; if($currentpage > 1){ $newpage = $currentpage - 1; $article_content .= "<strong><a href='profile.php?user={$user}&page={$newpage}'><img src='templates/icons/prev.gif' border=0> Previous Page</a></strong> "; } else $article_content .= "<strong><img src='templates/icons/prev.gif' border=0> Previous Page</strong> "; if($currentpage < $totalpages){ $newpage = $currentpage + 1; $article_content .= " :: <strong><a href='profile.php?user={$user}&page={$newpage}'>Next Page <img src='templates/icons/next.gif' border=0></a></strong> "; } else $article_content .= " :: <strong>Next Page <img src='templates/icons/next.gif' border=0></strong>"; } else{ $article_content .= "This user currently does not have any pets."; } // The fourth tab: Friends... $friendlist = getfriendid($user); $friendnum = getfriendnum($user); $article_content .= "</ul><ul id='friends' class='hide'>{$user} currently have {$friendnum} friends.<br /><table>"; if($friendnum != 0){ foreach($friendlist as $friendid){ $query = "SELECT * FROM {$prefix}users, {$prefix}users_profile WHERE {$prefix}users.uid = '{$friendid}' AND {$prefix}users_profile.uid = {$prefix}users.uid AND {$prefix}users_profile.username = {$prefix}users.username"; $result = runquery($query) ; $friendinfo = mysql_fetch_array($result); $uid = $friendinfo['uid']; $username = $friendinfo['username']; $friendgender = getfriendgender($username); $onlinestatus = getonlinestatus($username); $article_content .= "<tr><td style='text-align: left'><img src='{$friendinfo['avatar']}' border=0 width='60' height =60></td> <td><strong><a href='profile.php?user={$username}'>{$username}</a></strong> {$friendgender}<br />{$friendinfo['nickname']}<br />{$onlinestatus} <a href='{$friendinfo['website']}' target='_blank'><img src='templates/icons/web.gif'></a> <a href='messages.php?act=newpm&user={$username}'><img src='templates/icons/title.gif'></a></td>"; $article_content .= ($user == $loggedinname)?"<td style='text-align: right'><br /><br /><br /><a href='friends.php?act=delete&uid={$uid}'>Break Friendship </td></tr>":"</tr>"; } } $article_content .= "</table>"; // The last tab: Contact Info! $article_content .= "</ul><ul id='contactinfo' class='hide'><img src='templates/icons/web.gif' /> {$website}<br /> <img src='templates/icons/facebook.gif' /> {$facebook}<br /> <img src='templates/icons/twitter.gif' /> {$twitter}<br /> <img src='templates/icons/aim.gif' /> {$aim}<br /> <img src='templates/icons/msn.gif' /> {$msn}<br /> <img src='templates/icons/yahoo.gif' /> {$yahoo}<br /> <img src='templates/icons/skype.gif' /> {$skype}<br /> <img src='templates/icons/title.gif' /> <a href='messages.php?act=newpm&user={$user}'>Send {$user} a Private Message</a><br /> <img src='templates/icons/fr.gif' /><a href='friends.php?act=request&uid={$id}'>Send {$user} a Friend Request</a><br /> <br /></div></div>"; } else{ $article_content .= "Sorry, but we could not find a user in the system with the name {$user}. Please make sure you have the username right. The user's account may also have been deleted by the system admin."; } } else{ // We did not specify a user, so show the memberlist $article_title = "Memberlist"; $article_content = "Here are all of the members of this site, sorted by registration date.<br /><br />"; include("classes/class_pagination.php"); include("css/pagination.css"); $query = "SELECT * FROM {$prefix}users ORDER BY uid ASC"; $result = runquery($query); $rowsperpage = 15; $pagination = new Pagination($query, $rowsperpage, "http://www.{$domain}{$scriptpath}/profile.php"); $pagination->setPage($_GET[page]); $query = "SELECT * FROM {$prefix}users ORDER BY uid ASC LIMIT {$pagination->getLimit()},{$rowsperpage}"; $result = runquery($query); while ($row = mysql_fetch_array($result)){ $status = cancp($row['usergroup']); $star = ($status == "yes")?"<img src='templates/icons/star.gif' border=0' /> ":""; $article_content .= "<strong><a href='profile.php?user={$row['username']}'>{$star}{$row['username']}</a></strong><br />"; } $article_content .= "<br />{$pagination->showPage()}"; } //***************// // OUTPUT PAGE // //***************// echo showpage($article_title, $article_content, $date); ?> In order to improve re-usability of the tabs, I attempted to create a file called class_tabs.php to make it object oriented. It did not work however, as the css is seriously messed up, and I have absolutely no idea why it did not. Here is the class file: Code: [Select] <?php class Tab{ private $t_num; private $t_name = array(); private $t_alias = array(); private $t_content; private $t_default; private $t_hide; private $t_index = array(); private $t_last = array(); public function __construct($num, $tabs, $default=1){ $this->t_num = $num; $this->t_default = $default; $i = 0; foreach ($tabs as $key => $val){ $this->t_name[$i] = $key; $this->t_alias[$i] = $val; $this->t_index[$i] = ($i == $default-1)?" class='current":""; $this->t_index[$i] = ($i == $num-1)?" class='last":$this->t_index[$i]; $this->t_last[$i] = ($i == $num-1)?" last":""; $i++; } } public function createtab(){ if($this->t_num < 2 or $this->t_num > 5) throw new Exception("The number of tabs must be restricted between 2 to 5!",272); $this->t_content = "<div id='page-wrap'><div id='tab'><ul class='nav'>"; for($i=0; $i<$this->t_num; $i++){ $this->t_content .= " <li class='nav{$i}{$this->t_last[$i]}'><a href='#{$this->t_alias[$i]}{$this->t_index[$i]}'>{$this->t_name[$i]}</a></li>"; } $this->t_content .= "</ul><div class='list-wrap'>"; return $this->t_content; } public function starttab($index){ $this->t_hide = ($index == $this->t_default)?"":" class='hide'"; $this->t_content .= "<ul id='{$this->t_alias}'{$this->t_hide}>"; return $this->t_content; } public function endtab($index){ $this->t_content .= "</ul>"; if($index == $this->t_num) $this->t_content .= "</div></div>"; return $this->t_content; } } ?> And this is the modified profile codes with OOP: Code: [Select] <?php $filename = "profile"; include("functions/functions.php"); include("functions/functions_users.php"); include("functions/functions_adopts.php"); include("functions/functions_friends.php"); include("inc/lang.php"); include("inc/bbcode.php"); //***************// // START SCRIPT // //***************// // This page handles user profiles and shows the site members... $user = $_GET["user"]; $page = $_GET["page"]; if($user != ""){ // We have specified a specific user who we are showing a profile for... // See if the user exists... $article_title = "{$user}'s Profile"; $query = "SELECT * FROM {$prefix}users, {$prefix}users_contacts, {$prefix}users_options, {$prefix}users_profile, {$prefix}users_status WHERE {$prefix}users.username = '{$user}' AND {$prefix}users_contacts.uid = {$prefix}users.uid AND {$prefix}users_options.uid = {$prefix}users.uid AND {$prefix}users_profile.uid = {$prefix}users.uid AND {$prefix}users_status.uid = {$prefix}users.uid AND {$prefix}users_contacts.username = {$prefix}users.username AND {$prefix}users_options.username = {$prefix}users.username AND {$prefix}users_profile.username = {$prefix}users.username AND {$prefix}users_status.username = {$prefix}users.username"; $result = runquery($query); $row = mysql_fetch_array($result); if($row['username'] == $user){ // First let's initiate tab system! include("inc/tabs.php"); include("css/tabs.css"); include("classes/class_tabs.css"); $profile_tabs = new Tabs(5, array("Visitor Message" => "visitormessage", "About Me" => "aboutme", "Adoptables" => "adopts", "Friends" => "friends", "Contact Info" => "contactinfo"), 2); $article_content = $profile_tabs -> createtab(); // Format user profile information... $id = $row['uid']; $ccstat = cancp($row['usergroup']); $website = (empty($row['website']))?"No Website Information Given":"<a href='{$row['website']}' target='_blank'>{$row['website']}</a>"; $facebook = (empty($row['facebook']))?"No Facebook Information Given":"<a href='{$row['facebook']}' target='_blank'>{$row['facebook']}</a>"; $twitter = (empty($row['twitter']))?"No Twitter Information Given":"<a href='{$row['twitter']}' target='_blank'>{$row['twitter']}</a>"; $msn = (empty($row['msn']))?"No MSN Information Given":$row['msn']; $aim = (empty($row['aim']))?"No AIM Information Given":$row['aim']; $yahoo = (empty($row['yahoo']))?"No YIM Information Given":$row['yahoo']; $skype = (empty($row['skype']))?"No YIM Information Given":$row['skype']; $row['username'] = ($ccstat == "yes")?"<img src='templates/icons/star.gif' /> {$row['username']}":$row['username']; $row['favpet'] = ($row['favpet'] == 0)?"None Selected":"<a href='http://www.{$domain}{$scriptpath}/levelup.php?id={$row['favpet']}' target='_blank'><img src='http://www.{$domain}{$scriptpath}/siggy.php?id={$row['favpet']}' border=0></a>"; // Here we go with the first tab content: Visitor Message $article_content .= "{$profile_tabs -> starttab(0)}<strong><u>{$user}'s Profile Comments:</u></strong><br /><br /><table>"; $result = runquery("SELECT * FROM {$prefix}visitor_messages WHERE touser = '{$user}' ORDER BY vid DESC LIMIT 0, 10"); while($vmessage = mysql_fetch_array($result)){ $date = substr_replace($vmessage['datesent']," at ",10,1); $query2 = "SELECT * FROM {$prefix}users, {$prefix}users_profile WHERE {$prefix}users.username = '{$vmessage['fromuser']}' AND {$prefix}users_profile.uid = {$prefix}users.uid AND {$prefix}users_profile.username = {$prefix}users.username"; $result2 = runquery($query2); $sender = mysql_fetch_array($result2); $article_content .= "<tr> <td><img src='{$sender['avatar']}' width='40' height='40'></br></td> <td><a href='profile.php?user={$sender['username']}'>{$vmessage['fromuser']}</a> ({$date}) <a href='vmessage.php?act=view&user1={$user}&user2={$vmessage['fromuser']}'> <img src='templates/icons/status.gif'> </a> </br>{$vmessage['vmtext']} </br></td> <td><a href='vmessage.php?act=edit&vid={$vmessage['vid']}'> <img src='templates/icons/cog.gif'> </a> <a href='vmessage.php?act=delete&vid={$vmessage['vid']}'> <img src='templates/icons/delete.gif'> </a></br></td></tr>"; } if($isloggedin == "yes"){ if(isbanned($loggedinname) == 1){ $article_content .= "</table>It seems that you have been banned from this site and thus cannot send profile comment."; } else{ $article_content .= "</table> To Post a profile comment, please write your message in the text area below: <form action='profile.php?user={$user}' method='post'> <textarea rows='10' cols='50' name='vmtext' wrap='physical' ></textarea><br> <input type='submit' name='Submit' value='Submit'></form>"; $vmcontent = $_POST["vmtext"]; // Now check if the two users are friends... if($vmcontent != ""){ $datesent = date("Y-m-d H:i:s"); // $date = "2010-23-03 21:02:35"; $fromuser = $loggedinname; $touser = $user; runquery("INSERT INTO {$prefix}visitor_messages (vid, fromuser, touser, datesent, vmtext) VALUES ('', '$fromuser', '$touser' , '$datesent', '$vmcontent')"); $article_content .= "<p>Your comment for user has been posted. You may now view your conversation with {$user} from <a href='vmessage.php?act=view&user1={$fromuser}&user2={$touser}'>here</a>.</p>"; } } } else{ $article_content .= "</table>Guests cannot post profile comment, sorry..."; } // Now the second tab: About me... $article_content .= "{$profile_tabs -> endtab(0)}{$profile_tabs -> starttab(1)} <li><strong><u>{$lang_basic_info} {$user}</u></strong><br /><br /> <img src='{$row['avatar']}' border=0 width='100' height=100 /><br /> <strong>Member Since:</strong> {$row['membersince']}<br /><br /> Gender: {$row['gender']}<br /> Favorite Color: {$row['color']}<br /> Nickname: {$row['nickname']}<br /> Bio: <br /> {$row['bio']}<br /></li>"; // The third tab: Adopts... $article_content .= {$profile_tabs -> endtab(1)}{$profile_tabs -> starttab(2)}<h2>.:AdoptSpotlight:.</h2><br /> {$row['favpet']}<br />{$row['about']}<br /><br /> <strong><u>{$user}'s Pets:</u></strong><br /><br />"; $query = "SELECT COUNT(*) AS pets FROM {$prefix}owned_adoptables WHERE owner = '{$user}'"; $result = runquery($query); $total = mysql_fetch_array($result); if($total['pets'] > 0){ $rowsperpage = 15; $totalpages = ceil($total['pets'] / $rowsperpage); if(is_numeric($page)) $currentpage = $page; else $currentpage = 1; if($currentpage > $totalpages) $currentpage = $totalpages; if($currentpage < 1) $currentpage = 1; $offset = ($currentpage - 1) * $rowsperpage; $query = "SELECT * FROM {$prefix}owned_adoptables WHERE owner = '{$user}' LIMIT {$offset}, {$rowsperpage}"; $result = runquery($query); while($row = mysql_fetch_array($result)){ $image = getcurrentimage($row['aid']); $article_content .= "<a href='levelup.php?id={$row['aid']}'><img src='{$image}' border='0' /></a>"; } $article_content .= "<br />"; if($currentpage > 1){ $newpage = $currentpage - 1; $article_content .= "<strong><a href='profile.php?user={$user}&page={$newpage}'><img src='templates/icons/prev.gif' border=0> Previous Page</a></strong> "; } else $article_content .= "<strong><img src='templates/icons/prev.gif' border=0> Previous Page</strong> "; if($currentpage < $totalpages){ $newpage = $currentpage + 1; $article_content .= " :: <strong><a href='profile.php?user={$user}&page={$newpage}'>Next Page <img src='templates/icons/next.gif' border=0></a></strong> "; } else $article_content .= " :: <strong>Next Page <img src='templates/icons/next.gif' border=0></strong>"; } else{ $article_content .= "This user currently does not have any pets."; } // The fourth tab: Friends... $friendlist = getfriendid($user); $friendnum = getfriendnum($user); $article_content .= "{$profile_tabs -> endtab(2)}{$profile_tabs -> starttab(3)}{$user} currently have {$friendnum} friends.<br /><table>"; if($friendnum != 0){ foreach($friendlist as $friendid){ $query = "SELECT * FROM {$prefix}users, {$prefix}users_profile WHERE {$prefix}users.uid = '{$friendid}' AND {$prefix}users_profile.uid = {$prefix}users.uid AND {$prefix}users_profile.username = {$prefix}users.username"; $result = runquery($query) ; $friendinfo = mysql_fetch_array($result); $uid = $friendinfo['uid']; $username = $friendinfo['username']; $friendgender = getfriendgender($username); $onlinestatus = getonlinestatus($username); $article_content .= "<tr><td style='text-align: left'><img src='{$friendinfo['avatar']}' border=0 width='60' height =60></td> <td><strong><a href='profile.php?user={$username}'>{$username}</a></strong> {$friendgender}<br />{$friendinfo['nickname']}<br />{$onlinestatus} <a href='{$friendinfo['website']}' target='_blank'><img src='templates/icons/web.gif'></a> <a href='messages.php?act=newpm&user={$username}'><img src='templates/icons/title.gif'></a></td>"; $article_content .= ($user == $loggedinname)?"<td style='text-align: right'><br /><br /><br /><a href='friends.php?act=delete&uid={$uid}'>Break Friendship </td></tr>":"</tr>"; } } $article_content .= "</table>"; // The last tab: Contact Info! $article_content .= "{$profile_tabs -> endtab(3)}{$profile_tabs -> starttab(4)}<img src='templates/icons/web.gif' /> {$website}<br /> <img src='templates/icons/facebook.gif' /> {$facebook}<br /> <img src='templates/icons/twitter.gif' /> {$twitter}<br /> <img src='templates/icons/aim.gif' /> {$aim}<br /> <img src='templates/icons/msn.gif' /> {$msn}<br /> <img src='templates/icons/yahoo.gif' /> {$yahoo}<br /> <img src='templates/icons/skype.gif' /> {$skype}<br /> <img src='templates/icons/title.gif' /> <a href='messages.php?act=newpm&user={$user}'>Send {$user} a Private Message</a><br /> <img src='templates/icons/fr.gif' /><a href='friends.php?act=request&uid={$id}'>Send {$user} a Friend Request</a><br /> <br />{$profile_tabs -> endtab(4)}"; } else{ $article_content .= "Sorry, but we could not find a user in the system with the name {$user}. Please make sure you have the username right. The user's account may also have been deleted by the system admin."; } } else{ // We did not specify a user, so show the memberlist $article_title = "Memberlist"; $article_content = "Here are all of the members of this site, sorted by registration date.<br /><br />"; include("classes/class_pagination.php"); include("css/pagination.css"); $query = "SELECT * FROM {$prefix}users ORDER BY uid ASC"; $result = runquery($query); $rowsperpage = 15; $pagination = new Pagination($query, $rowsperpage, "http://www.{$domain}{$scriptpath}/profile.php"); $pagination->setPage($_GET[page]); $query = "SELECT * FROM {$prefix}users ORDER BY uid ASC LIMIT {$pagination->getLimit()},{$rowsperpage}"; $result = runquery($query); while ($row = mysql_fetch_array($result)){ $status = cancp($row['usergroup']); $star = ($status == "yes")?"<img src='templates/icons/star.gif' border=0' /> ":""; $article_content .= "<strong><a href='profile.php?user={$row['username']}'>{$star}{$row['username']}</a></strong><br />"; } $article_content .= "<br />{$pagination->showPage()}"; } //***************// // OUTPUT PAGE // //***************// echo showpage($article_title, $article_content, $date); ?> Incase you find it necessary, the css/tabs.css and inc/tabs.php files are provided below. They should be irrelevant to this problem though, but just incase.. css/tabs.css Code: [Select] <style type="text/css"> * body { font: 12px Georgia, serif; } html { overflow-y: scroll; } a { text-decoration: none; } a:focus { outline: 0; } p { font-size: 15px; margin: 0 0 20px 0; } #page-wrap { width: 640px; margin: 30px;} h1 { font: bold 40px Sans-Serif; margin: 0 0 20px 0; } /* Generic Utility */ .hide { position: absolute; top: -9999px; left: -9999px; } /* Specific to example one */ #profile { background: #eee; padding: 10px; margin: 0 0 20px 0; -moz-box-shadow: 0 0 5px #666; -webkit-box-shadow: 0 0 5px #666; } #profile .nav { overflow: hidden; margin: 0 0 10px 0; } #profile .nav li { width: 97px; float: left; margin: 0 10px 0 0; } #profile .nav li.last { margin-right: 0; } #profile .nav li a { display: block; padding: 5px; background: #959290; color: white; font-size: 10px; text-align: center; border: 0; } #profile .nav li a:hover { background-color: #111; } #profile ul { list-style: none; } #profile ul li a { display: block; border-bottom: 1px solid #666; padding: 4px; color: #666; } #profile ul li a:hover { background: #fe4902; color: white; } #profile ul li:last-child a { border: none; } #profile ul li.nav0 a.current, #profile ul.visitormessage li a:hover { background-color: #0575f4; color: white; } #profile ul li.nav1 a.current, #profile ul.aboutme li a:hover { background-color: #d30000; color: white; } #profile ul li.nav2 a.current, #profile ul.adopts li a:hover { background-color: #8d01b0; color: white; } #profile ul li.nav3 a.current, #profile ul.friends li a:hover { background-color: #FE4902; color: white; } #profile ul li.nav4 a.current, #profile ul.contactinfo li a:hover { background-color: #Eac117; color: white; } </style> Code: [Select] <?php if($filename == "profile"){ ?> <script src='http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js'></script> <script src="js/tabs.js"></script> <script> $(function() { $("#profile").organicTabs(); }); </script> <? } ?> Please help... I am new to website development. I can't figure out how to open a new tab for the following javasript. I went through related questions but nothing worked for me. I want the browser to open a new tab when someone clicks on the link (example.com) below. The code target="_blank doesn't work here... What code should I add and where should I place that code?
Hi, I need to open an RTF File on client side. When user submit form, the system will write some data in database and at the end, it has to open an rtf file in order to user be able to print it. Any ideas? Thanks Hugo It might be a funny question, but I hope the pro can help me. I want to use ?id= to display the other page/url instead of showing the full address due to certain reasons. What do I mean is like there are 2 different static page e.g. main.php and subpage.php I would like to use id to display as the url for subpage.php i.e. main.php?id=1 actually is displaying subpage.php Any idea?? Help!! Thanks! Hi i have been working on a cow management program PHP based. it works beautifull but now i'm stuck , and i hope i post it in the right forum. On demand php has to generate an export.txt file with basic cow information (tag#, transponder#, Bdate) this will be read by the parlour computer an Eprom based computer serial connected. I finished the script and it creates a beautifull TXt file exxept it's php http://localhost/tmp/test.php if i open that URL in notepad, it prints the txt file: Quote DH9900010090000624000900002080 VH990001 Dairy Comp 305 20100203 DN99000200312008080003000020800030000303000300035 08000300357080003001940800030003308000300036020 VN99000200001034000014010052009112620100922201102 042001111706 VN99000200001061000009420032010032820100906????????2007120101 VN99000200001083000067850032010061720100927????????2002030706 VN99000200001104000055440052009062720100817201101 032002080605 VN99000200001116000078540042010083120110207????????2002082205 VN990002000011470000816800220101226????????????????2003010806 VN99000200001153000070120032010030420100906????????2003020305 but when i enter that URL in the sync.BAT nothing happends.. my question is, doe anyone know if there is a way to fool DOS for accepting a PHP url?. OR is there a way for Apache to treat one TXT file as an PHP file? my script: Code: [Select] <?php //request sql cow info $db_host = 'localhost'; $db_user = ''; $db_pwd = ''; $database = 'cowdbase'; $table = 'cows'; if (!mysql_connect($db_host, $db_user, $db_pwd)) die("Can't connect to database"); if (!mysql_select_db($database)) die("Can't select database"); // sending query $result = mysql_query("SELECT * FROM {$table}"); if (!$result) { die("Query to show fields from table failed"); } //quiery alle info $query="SELECT * FROM {$table}"; $result=mysql_query($query); // hoeveel rijen zijn er? $num=mysql_numrows($result); //Type the header from the text file echo "DH9900010090000624000900002080" . PHP_EOL ; echo "VH990001 Dairy Comp 305 20100203" . PHP_EOL ; echo "DN9900020031200808000300002080003000030300030003508000300357080003001940800030003308000300036020" . PHP_EOL ; mysql_close(); $i=0; while ($i < $num) { $cowtag=mysql_result($result,$i,"cowTag"); $bdate=mysql_result($result,$i,"Bdate"); $group=mysql_result($result,$i,"group"); $alpro=mysql_result($result,$i,"Alpro_trans"); // LIST ALLE KOEIEN KOE VOOR KOE /// unknown cowtag unknown-0000 #### Alpro tag 00 Group 20 Fresh dateyymmdd 20 Heatdate yymmdd, Drydate YYYYMMDD, Birthdate YYYYMMDD Lactation number ## echo "VN9900020000" . str_pad($cowtag, 4, "0", STR_PAD_LEFT) . "0000" . str_pad($alpro, 4, "0", STR_PAD_LEFT) . "00" . "$group" . "20" . "0000" . "????????????????" . "00000000" . "01" . PHP_EOL ; $i++; } echo "EN" . PHP_EOL ; echo "ZN" . PHP_EOL ; ?> Hi there again all I am making a site that has a popout music player. My question is since the player is opened by javascript is there a way to let the original page know that the popout is open? Hi Guys, I have a question, is it possible to leave an ELSE statement open within an Include file and end the ELSE statement later in the main page? For example: <?php include 'PHP/db.php'; //include database info include 'PHP/login-top.php'; //include PHP code for Login functions info ?> <!doctype html> <html> <head> <meta charset="utf-8"> <title>Untitled Document</title> <!-- Latest compiled and minified CSS --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> <!-- Optional theme --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css"> <link rel="stylesheet" href="CSS/login.css"> <!-- Latest compiled and minified JavaScript --> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> </head> <body> <form class="form-signin" method="POST"> <?php if(isset($fmsg)){ ?> <div class="alert alert-danger" role="alert"> <?php echo $fmsg; ?> </div> <?php } ?> <h2 class="form-signin-heading">Please Login</h2> <div class="input-group"> <span class="input-group-addon" id="basic-addon1">@</span> <input type="text" name="Email" class="form-control" placeholder="Email" required> </div> <label for="inputPassword" class="sr-only">Password</label> <input type="password" name="Password" id="inputPassword" class="form-control" placeholder="Password" required> <button class="btn btn-lg btn-primary btn-block" type="submit">Login</button> <a class="btn btn-lg btn-primary btn-block" href="register.php">Register</a> </form> </body> </html> <?php } ?> At the moment I'm getting the following error: QuoteParse error: syntax error, unexpected '}', expecting end of file in C:\xampp\htdocs\BETA\login.php on line 46 But the } on line 46 is the closing of the ELSE { part within login-top.php include file. If i take all the code out of the include file (login-top.php) and place it in the same file as login.php it all works fine. But my aim to try and make the pages less cluttered and more easy to edit the design/HTML side of things which is why im placing the important PHP code in seperate files and including them when they need to be included. Any help would be great, and thank you! Hi I am trying to get the structure of some folders/files on my server to create an xml "Feed" which then goes to a flash file. I keep getting the error message that I can't open the folder (it is set to 755) ERROR: Could not open folder: http://www.name/templates/bluezoo/mp3s What am I doing wrong please. Many thanks in advance Edward Here's some php: Code: [Select] $directoryLocation="http://www.name/templates/bluezoo/mp3s"; // XML Doctype $xml = new DomDocument('1.0', 'UTF-8'); $xml->xmlStandalone = false; // XML Root element $root = $xml->createElement('mp3s'); $root = $xml->appendChild($root); // Grab a list of folders from the specified directory if ($dir = @opendir($directoryLocation)) { while (false !== ($file = readdir($dir))) { if (is_dir($directoryLocation . DIRECTORY_SEPARATOR . $file) && $file != '.' && $file != '..') { // If it is a folder, put it in the folders array $folders[] = $file; } } I had some errors in my script but I solved the most of them except two: Warning: require_once(/home/a3443899/smarty/libs/Smarty.class.php) [function.require-once]: failed to open stream: No such file or directory in /home/a3443899/public_html/include/config.php on line 32 Fatal error: require_once() [function.require]: Failed opening required '/home/a3443899/smarty/libs/Smarty.class.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/a3443899/public_html/include/config.php on line 32 And I checked the map what he couldn't open the map names are just good Here is the config.php script: Code: [Select] <? $config = array(); // Begin Configuration // This Template was Downloaded From GrabTemplates.com $config['basedir'] = 'something'; $config['baseurl'] = 'something'; $DBTYPE = 'mysql'; $DBHOST = 'my host'; $DBUSER = 'my username'; $DBPASSWORD = 'my pass'; $DBNAME = 'my dbname'; // End Configuration ini_set('session.save_path', $config['basedir']. '/temporary/sessions'); session_start; $config['adminurl'] = $config[baseurl].'/administrator'; $config['cssurl'] = $config[baseurl].'/css'; $config['imagedir'] = $config[basedir].'/images'; $config['imageurl'] = $config[baseurl].'/images'; $config['picdir'] = $config[basedir].'/pics'; $config['picurl'] = $config[baseurl].'/pics'; $config['tpicdir'] = $config[basedir].'/pics/thumbs'; $config['tpicurl'] = $config[baseurl].'/pics/thumbs'; $config['membersprofilepicdir'] = $config[imagedir].'/membersprofilepic'; $config['membersprofilepicurl'] = $config[imageurl].'/membersprofilepic'; $config['mbgdir'] = $config[imagedir].'/mbg'; $config['mbgurl'] = $config[imageurl].'/mbg'; require_once($config[basedir].'/smarty/libs/Smarty.class.php'); require_once($config[basedir].'/libraries/mysmarty.class.php'); require_once($config[basedir].'/libraries/SConfig.php'); require_once($config[basedir].'/libraries/SError.php'); require_once($config[basedir].'/libraries/adodb/adodb.inc.php'); require_once($config[basedir].'/libraries/phpmailer/class.phpmailer.php'); require_once($config[basedir].'/libraries/SEmail.php'); function strip_mq_gpc($arg) { if (get_magic_quotes_gpc()) { $arg = str_replace('"',"'",$arg); $arg = stripslashes($arg); return $arg; } else { $arg = str_replace('"',"'",$arg); return $arg; } } $conn = &ADONewConnection($DBTYPE); $conn->PConnect($DBHOST, $DBUSER, $DBPASSWORD, $DBNAME); @mysql_query("SET NAMES 'UTF8'"); $sql = "SELECT * from config"; $rsc = $conn->Execute($sql); if($rsc){while(!$rsc->EOF) { $field = $rsc->fields['setting']; $config[$field] = $rsc->fields['value']; STemplate::assign($field, strip_mq_gpc($config[$field])); @$rsc->MoveNext(); }} if ($_REQUEST['language'] != "") { if ($_REQUEST['language'] == "english") { SESSION_REGISTER("language"); $_SESSION[language] = "english"; } elseif ($_REQUEST['language'] == "spanish") { SESSION_REGISTER("language"); $_SESSION[language] = "spanish"; } elseif ($_REQUEST['language'] == "french") { SESSION_REGISTER("language"); $_SESSION[language] = "french"; } } if ($_SESSION['language'] == "") { SESSION_REGISTER("language"); $_SESSION[language] = "english"; } if ($_SESSION['language'] == "english") { include("lang/english.php"); } elseif ($_SESSION['language'] == "spanish") { include("lang/spanish.php"); } elseif ($_SESSION['language'] == "french") { include("lang/french.php"); } else { include("lang/english.php"); } for ($i=0; $i<count($lang)+1; $i++) { STemplate::assign('lang'.$i, $lang[$i]); } STemplate::assign('baseurl', $config['baseurl']); STemplate::assign('basedir', $config['basedir']); STemplate::assign('adminurl', $config['adminurl']); STemplate::assign('cssurl', $config['cssurl']); STemplate::assign('imagedir', $config['imagedir']); STemplate::assign('imageurl', $config['imageurl']); STemplate::assign('picdir', $config['picdir']); STemplate::assign('picurl', $config['picurl']); STemplate::assign('tpicdir', $config['tpicdir']); STemplate::assign('tpicurl', $config['tpicurl']); STemplate::assign('membersprofilepicdir', $config['membersprofilepicdir']); STemplate::assign('membersprofilepicurl', $config['membersprofilepicurl']); STemplate::assign('mbgdir', $config['mbgdir']); STemplate::assign('mbgurl', $config['mbgurl']); STemplate::setCompileDir($config['basedir']."/temporary"); STemplate::setTplDir($config['basedir']."/themes"); ?> I have this code: $shell = new COM('WScript.Shell'); $shell->Run("C:\WINDOWS\system32\cmd.exe /K ".$ini['indexer']['command'], 0, false); When it runs, it opens the command line, but then when it is done, it leaves the process open. How can I close it when the process is complete? I have a url like http://www.northplanet.co.uk/blog.php?empty_cache= and i want to use curl to run the url, when the url is accessed in the browser it clears the cache how can i make php access and run the url in the background? |