Jump to content

atlanta

Members
  • Posts

    172
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

atlanta's Achievements

Member

Member (2/5)

0

Reputation

  1. atlanta

    Regex Help

    thanks nrg_alpha but i need the whole regex to do it becuase i will be using this for mod rewrite not php
  2. atlanta

    Regex Help

    Hi guys i need a little help i need to retrieve different parts of a url for use in my .htaccess file all help appreciated .. ok heres my example.. http://domain.com/firstpart/secondpart/ ok i need to retrieve firstpart in one group and secondpart in the second group.. i tried ^/(.*?)/(.*?)/$ but the first group selects everything!
  3. OK cool thats what i was thinking i was gonna have to do which is going to be a pain thanks my man
  4. Hi all , I have a question is there a way to grab a variable from another php file without including it? I ask this because when i include it into the page another variable within the system is the same and they cancel each other out.
  5. Hi all i need a little help my regex skills aren't too great so .. what i need is to retrieve is http://b1.ac-images.myspacecdn.com/00841/12/32/841492321_m.gif from <table id="mainLayout"> <tr> <td id="1a" width="304" height="300"> <div id="profile_info" class="section"> <h4 class="heading">SykoRadio</h4><br /> <div id="profile_info_image"> <a id="ctl00_cpMain_ctl01_ctl01_hlDefaultImage" rel="searchMonkey-photo" href="http://viewmorepics.myspace.com/index.cfm?fuseaction=user.viewAlbums&friendID=11"><img src="http://b1.ac-images.myspacecdn.com/00841/12/32/841492321_m.gif" alt="SykoRadio"/></a> <center>View My: <a id="ctl00_cpMain_ctl01_ctl01_ctrlViewMorePics" rel="searchMonkey-viewPictures" href="http://viewmorepics.myspace.com/index.cfm?fuseaction=user.viewAlbums&friendID=11">Pics</a> | <a href="http://vids.myspace.com/index.cfm?fuseaction=vids.showvids&friendID=11&n=11&MyToken=5ee0978c-1539-4a01-9db5-e0268888aa3d">Videos</a> </center> </div> <div id="profile_info_content" class="text"> <span id="profile_info_headline">"Sykoradio.org - Music for the Kultured"</span><br /><br /> Male<br /> 30 years old<br /><br /> Columbus, OHIO<br /> United States<br /> <br /> Last Login: <span class="searchMonkey-lastLogin">07/23/08</span> </div> <div class="clear"></div> </div> <div id="profile_contact" class="section"> <h5 class="heading">Contacting SykoRadio</h5> <a href="http://messaging.myspace.com/index.cfm?fuseaction=mail.message&friendID=11&MyToken=5ee0978c-1539-4a01-9db5-e0268888aa3d" id="ctl00_cpMain_ctl01_ctl02_MailLink" rel="searchMonkey-sendMessage"><img id="mailLinkImg" src='http://x.myspacecdn.com/modules/profiles/static/img/contact_sendmailicon.gif' alt="" />Send Message</a> <a href="http://messaging.myspace.com/index.cfm?fuseaction=mail.forward&friendID=11&f=forwardprofile" id="ctl00_cpMain_ctl01_ctl02_ForwardLink"><img id="forwardLinkImg" src='http://x.myspacecdn.com/modules/profiles/static/img/contact_forwardmailicon.gif' alt="" />Forward to Friend</a> <a href="http://friends.myspace.com/index.cfm?fuseaction=invite.addfriend_verify&friendID=11" id="ctl00_cpMain_ctl01_ctl02_AddFriendLink" rel="searchMonkey-addToFriends"><img id="addFriendLinkImg" src='http://x.myspacecdn.com/modules/profiles/static/img/contact_addfriendicon.gif' alt="" />Add to Friends</a> <a href="http://collect.myspace.com/index.cfm?fuseaction=user.addToFavorite&friendID=11&public=0" id="ctl00_cpMain_ctl01_ctl02_AddFavoriteLink"><img id="addFavoriteLinkImg" src='http://x.myspacecdn.com/modules/profiles/static/img/contact_addfavoritesicon.gif' alt="" />Add to Favorites</a> <a href="javascript: IsMySpaceIMInstalled();" id="ctl00_cpMain_ctl01_ctl02_MessageFriendLink"><img id="messageFriendLinkImg" src='http://x.myspacecdn.com/modules/profiles/static/img/contact_messagefriend.gif' alt="" />IM / Call</a> <a href="http://friends.myspace.com/index.cfm?fuseaction=block.blockUser&userID=11" id="ctl00_cpMain_ctl01_ctl02_BlockFriendLink" onclick="return confirm('Are you sure you want to block this user?\n- to block this user, hit OK\n- otherwise, hit Cancel');"><img id="blockFriendLinkImg" src='http://x.myspacecdn.com/modules/profiles/static/img/contact_blockuser.gif' alt="" />Block User</a> <a href="http://groups.myspace.com/index.cfm?fuseaction=groups.addtogroup&friendID=11" id="ctl00_cpMain_ctl01_ctl02_AddToGroupLink"><img id="addToGroupLinkImg" src='http://x.myspacecdn.com/modules/profiles/static/img/contact_addtogroupicon.gif' alt="" />Add to Group</a> <a href="http://collect.myspace.com/index.cfm?fuseaction=RateImage.UserRating&UserID=11" id="ctl00_cpMain_ctl01_ctl02_RateFriendLink"><img id="rateFriendLinkImg" src='http://x.myspacecdn.com/modules/profiles/static/img/contact_rankusericon.gif' alt="" />Rank User</a> <div class="clear"></div> </div>
  6. <? require_once("includes/config.php"); $db_connection = mysql_connect ($DBHost, $DBUser, $DBPass) OR die (mysql_error()); $db_select = mysql_select_db ($DBName) or die (mysql_error()); $db_table = $TBL_PR . "events"; $query = "SELECT * FROM $db_table WHERE event_id='$_GET[id]' LIMIT 1"; $query_result = mysql_query ($query); if(mysql_num_rows($query_result) > 0) { while ($info = mysql_fetch_array($query_result)){ $date = date ("l, jS F Y", mktime(0,0,0,$info['event_month'],$info['event_day'],$info['event_year'])); $time_array = split(":", $info['event_time']); $time = date ("g:ia", mktime($time_array['0'],$time_array['1'],0,$info['event_month'],$info['event_day'],$info['event_year'])); } } else { header("Location: http://domain.com/") } ?>
  7. Hello All, I have a problem im running IIS and php as isapi module on windows 2003 server 64bit. i am trying to setup this app http://iecapt.sourceforge.net/ but for some reason php well not execute any commands through shell_exec , exec or system it just returns either 1 or nothing but no errrors!.. also believe i have added the anon web user permissions to write the the thumbs folder and permission to the iecapt exe any other things i need to do to let php run exe from these functions?
  8. just did a little testing and found that if i use this if if(isset($_SESSION['userid']) && isset($_SESSION['username'])){ echo '<li><a href="http://www.stickamstuff.com/members.php">My Page</a></li>'; } it doesnt echo but if i take out $_SESSION['userid'] it echos but thats only when its included on the main page . it echos with both if i go directly to the page.
  9. ok yea i do have that on all pages and was just about to add some heres my rightnav.php file <? session_start(); include('session.php'); ?> <div class="sideheader">Members</div> <ul class="sideul"> <center> Total Members: <? echo $database->getNumMembers(); ?> <br /> Members Online: <? echo $database->num_active_users + $database->num_active_guests; ?> <br /> Layouts: <? echo $database->Layouts(); ?> <? if($session->logged_in){ echo "LOGGED IN"; } else { echo "LOGGED OUT"; } ?> <li><a href="http://www.stickamstuff.com/members.php">Login</a></li> <li><a href="http://www.stickamstuff.com/register.php">Register</a></li> <li><a href="http://www.stickamstuff.com/process.php?logout=1">Logout</a></li> </center> </ul> $session->logged_in function function logged_in(){ global $database; //The database connection /* Check if user has been remembered */ if(isset($_COOKIE['cookname']) && isset($_COOKIE['cookid'])){ $this->username = $_SESSION['username'] = $_COOKIE['cookname']; $this->userid = $_SESSION['userid'] = $_COOKIE['cookid']; } /* Username and userid have been set and not guest */ if(isset($_SESSION['username']) && isset($_SESSION['userid']) && $_SESSION['username'] != GUEST_NAME){ /* Confirm that username and userid are valid */ if($database->confirmUserID($_SESSION['username'], $_SESSION['userid']) != 0){ /* Variables are incorrect, user not logged in */ unset($_SESSION['username']); unset($_SESSION['userid']); return false; } /* User is logged in, set class variables */ $this->userinfo = $database->getUserInfo($_SESSION['username']); $this->username = $this->userinfo['username']; $this->userid = $this->userinfo['userid']; $this->userlevel = $this->userinfo['userlevel']; return true; } /* User not logged in */ else{ return false; } }
  10. Hi, I'm having a little problem with the script i was writing for a site... i have a right navbar include for the right side of the site and in the rigth include i have my session file included within that. ok my problem comes in when i run my if user is logged in function if i call the file along in the browser rightnav.php it runs fine checks the user correctly and displays the correct info but when i just view the main page with the rightnav.php included on it the function doesnt work and it just displays if user wasnt logged in ... any body ever ran into this problem or know how to fix it? I believe theres an error when i include the session file while its included on the main page but my server wont out errors at all even after using error_reporting(E_ALL); no php errors show..
  11. yea i made sure session_start() was first before any output but still it doesnt read it still doesnt work .!
  12. Ok I created a login system with sessions etc i have a side bar which includes a small login form and if the user is all ready logged in i have it say logged in. with this code <? include("include/session.php"); ?> <div class="sideheader">Members</div> <ul class="sideul"> <? if($session->logged_in){ echo "<li>Logged In $session->username </li>"; } else { echo "<li>Logged Out</li>"; } ?> That sidebar is included onto my main pages but when user logges in it still says logged out but when you go to the included page directly http://domain.com/sidebar.php it shows that they are logged in . Heres the session.php file /* Class constructor */ function Session(){ $this->time = time(); $this->startSession(); } function startSession(){ global $database; //The database connection session_start(); //Tell PHP to start the session /* Determine if user is logged in */ $this->logged_in = $this->checkLogin(); /** * Set guest value to users not logged in, and update * active guests table accordingly. */ if(!$this->logged_in){ $this->username = $_SESSION['username'] = GUEST_NAME; $this->userlevel = GUEST_LEVEL; $database->addActiveGuest($_SERVER['REMOTE_ADDR'], $this->time); } /* Update users last active timestamp */ else{ $database->addActiveUser($this->username, $this->time); } /* Remove inactive visitors from database */ $database->removeInactiveUsers(); $database->removeInactiveGuests(); /* Set referrer page */ if(isset($_SESSION['url'])){ $this->referrer = $_SESSION['url']; }else{ $this->referrer = "/"; } /* Set current url */ $this->url = $_SESSION['url'] = $_SERVER['PHP_SELF']; }
  13. Hey i needed a little help with selecting the stuff in between this code using the preg_match function . i dont know how to right the expression correctly to get the stuff in between the table table table { and } table table table { border-style:solid; border-width:1px; border-color:A47040; background-color:EEE3CF; } So i would want the regex function to return border-style:solid; border-width:1px; border-color:A47040; background-color:EEE3CF; could someone help me out with writting the expression correctly thanks
  14. Hey i needed a little help with selecting the stuff in between this code table table table { border-style:solid; border-width:1px; border-color:A47040; background-color:EEE3CF; } So i would want the regex function to return border-style:solid; border-width:1px; border-color:A47040; background-color:EEE3CF; could someone help me out with writting the expression correctly thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.