Getting HTML Source Based On User Cookies
I am attempting to get the HTML source of a web page on a different domain, but the source is based on the client's cookies they have stored for that site. I've tried using javascript with iframe's and XMLHttpRequests and HTMLHttpRequests, but it's restricted to inside my domain. With php you can get the HTML source of any web page using the file functions, but since its server-sided i don't think I would be able to open the page and get the HTML source based on the users cookies. Is there someway using PHP I don't know about, or mayb combinding javascript and PHP in some sort of AJAX engine?
View Complete Forum Thread with Replies
Related Forum Messages:
Serving A Website Based On Source Internet Address ?
Based on the source internet address a different version of the website should be presented/served to the user/browser. I would like to keep the script as simple as possible and it should replace the index.php. The script could look something like this in pseudo code: if SourceAddress = â¸.3.5.1' then begin ShowBlueWebsite; // load/show BlueIndex.htm end else if SourceAddress = ït.5.15.7' then begin ShowRedWebsite; // load/show RedIndex.htm end; Is this possible with php ?
View Replies !
Get User Page Source
I need to be able to find out how users got to a certain page, either getting an URL from a link they clicked or maybe a NULL if they typed it in directly. I remember something that could do this but I cant seem to find it again.
View Replies !
HTML Source
U want to catch the HTML source of the web page but I can't get this by file_get_contents().Us there any function to do that, or any method for doing that.
View Replies !
Get Html Source
I am trying to generate PDF file via a Dynamic URL. The problem is that i am trying to get the HTML source from this dynamic URL and paste the source of the file in the source below $HTMLSOURCE. PHP Code: $html = $HTMLSOURCE; $dompdf = new DOMPDF(); $dompdf->load_html($html); $dompdf->render(); $dompdf->stream("sample.pdf");
View Replies !
PHP, Get Html Source.
I'm working on a project that needs to watch another website for activity. I can go thru a logon, query and signon at regular intervals. But it occurs to me that you can just see if something new has happened by viewing the site. So I was wondering if there is some PHP command to capture HTML source from an external website and then I'll search the html source for a number of images (or any related events, updates etc). So from a PHP script I'd like to point it at an unrelated website and scrape the HTML source for a particular pages.
View Replies !
Getting HTML Source
I am attempting to get the HTML source of a web page on a different domain, but the source is based on the client's cookies they have stored for that site. I've tried using javascript with iframe's and XMLHttpRequests and HTMLHttpRequests, but it's restricted to inside my domain. With php you can get the HTML source of any web page using the file functions, but since its server-sided i don't think I would be able to open the page and get the HTML source based on the users cookies. Is there someway using PHP I don't know about, or mayb combinding javascript and PHP in some sort of AJAX engine?
View Replies !
HTML Source To SQL By PHP
I got a static HTML page with some data I wanna insert it into mySQL. I ended up writing my own thing. where I search the source and put it to sql in php. but it does not work 100%, it sometimes add weird blank spaces and such. so I wonder if theres any existing tool / script / php source to do this that you guys might know of.
View Replies !
Delete From HTML Source <br />
I have many articles that have this <br /> in my HTML source: takes no obligation to revise the forward-looking statements contained therin ein to reflect events or circumstances after the date hereof as a result of <br /> It is ok to add: $query = 'update wp_posts set post_content=REPLACE(post_content,"<br /> ","")' But it doesnt delete, why?
View Replies !
Open The Source Of An Html Across The Net
I got my other question wrong. I wrote a script that opens a file and filters out email addresses and urls etc. is there a way to enter a url so that my script will open the source of the webpage and NOT the web page itself?
View Replies !
Html Source Into An Array
Im trying to get the html source from a certain page into an array, yet the file() function will not find the file. What can I do to accomplish this goal?
View Replies !
Html Source Output
When I use a php included file, my html source becomes messed up. Basically, the source does not stay indented like I want it. Is there a trick to getting the php includes to indent properly, thus resulting in a nice clean source output?
View Replies !
Get Text From HTML Source
I receive a site content with cURL. In the source is HTML input field and i need to get it's value. PHP Code: <input type=hidden name=NUM value="123456"> How to get 123456 ?
View Replies !
Entire HTML Source
I got this JavaScript function, which need all the text I wants as input to be on one line The []'s need to be on the same line for it to work. The input is a PHP variable, which is a file_get_contents from another site. So PHP makes my $thing multiple lines. How can I make it just one line, so that the []'s are on the same line?
View Replies !
Echo A Line In Html Source...
Say i am writing a few lines of code in php script as so... <?php echo '<table>' echo '<tr>' echo '<td> blah blah </td>' echo '</tr>' echo '</table>' ?> On my html source the code looks like this... <table><tr><td>blah blah</td></tr></table> Is there anyway I can get each html tag on a seperate line in the html source so it is nice and neat (easy readable)?
View Replies !
Extracting Img Tag Info From HTML Source
I'm having a bit of a brain meltdown trying to figure this out. If anyone has a suggestion I could try, that would be excellent. I'm trying to extract specific pieces of data from an html source file. In particular image tag information. If my file contains lines similar to: <a href="images/picture.jpg" target="_blank"><img src="thumbnails/picture.jpg"></a> I'd like to be able to extract the a href URL and the img src as two seperate variables and ignore any other HTML source and tags inside of the file. For all intents and purposes ending up with an array of the following: $link[0]="images/picture.jpg"; $thumbnail[0]="thumbnails/picture.jpg";
View Replies !
Open Source Ajax/php Html Editors?
Are there any open source ajax/php html editors? I want to incorporate as simple (very simple) ajax based html editor into a webapp I'm making. I spent an hour or so downloading code and saw nothing that actually worked. Don't need tables, just need to drag text around, set fonts and colors, upload images, have a simple form for making links. Does such a thing exist? I'm giving away what I'm making, so I don't want to pay for the parts.
View Replies !
Protecting Source Code On Mixed Html
How can I protect or block others from viewing my source code. I have a mixed form php and html, and someone has been trying to duplicate it. Each time they hit submit i get a text message on my phone, except all data is blank since they cannot connect to my database where all vars are stored.
View Replies !
Add To Date Based On User Selection
I have a form with Radio buttons that when selected should add "$howMuch" amount of hours to the current date and time and put the output into a field called "ExpireTime". The code I'm using for the hour adding: PHP Code:
View Replies !
User Based Index Page
Both the users have same home page main.php.After logging with user1 only index1 page should be opened and with useer 2 only index2 page should be displayed. Code:
View Replies !
User Authentication - Cookies Would Probably Be Best, Right?
I am about to launch my site, but I have to finish all of the 'member only' areas. I was wondering which way I should go. Should I use cookies or sessions. I think my users may be taking links to other sites, and then coming back to my site, and I think that sessions expire after a user leaves a site, so cookies would probably be best, right? Second, how should the authentication work? I was thinking that I would first check for a correct username/password combination and then register a cookie if it is correct. The cookie would have a value for something like 'valid user' as 'true', and then each 'member only' page would just check for this value before loading. Would this be secure enough? The only problem that I saw is that an experienced person may be able to write their own cookie with the value 'true' for 'valid user', and then have access to all of the areas. Is that possible? If so, how can I get around it?
View Replies !
Filling My SQL Database With Info From HTML Source Code?
I am desperatly browsing around trying to find some way to add data to mySQL from raw HTML sourcecode. I basicly have HTML pages showing lots of info on work, and I want to take that info - add it to mySQL so I can sort, select and browse the information in a better way. Hope someone knows what I mean.. (many online textbased games have this on various fan pages for calculating purposes, ie. Earth2025 and Utopia)
View Replies !
Restrict User Access Based On The Login?
I'm creating a program in PHP/MySQL, for which I need to restrict user access based on the login. How can I restrict access based on login? I know you can do with creating different folders on windows server and assigning different a user rights, then put relevant pages into that folder. Is there any other way you can do that purely using PHP/MySQL that is quite robust enough? How can you decide which user gets access to which page?
View Replies !
Retrieving Database Info Based On User
I'm still quite new to php and mysql but I have been unable to figure this out. I'm attempting to display a specific row and column from a mysql database based on the user. $result = mysql_query("SELECT fbleague FROM users WHERE username = $_SESSION[username]"); fbleague is the column users is the table username is the primary key column $_SESSION[username] is the username variable Then later I try to display it with echo "You are in league $result "; I know $_SESSION[username] is set correctly because I can display that with no problems.
View Replies !
CURL And .htaccess Based User Authentication
I found a nice example of ebay login using PHP and cURL at http://curl.haxx.se/libcurl/php/examples/ Is this technique applicable to sites that authenticate users using a browser-opened dialog? (like .htaccess user validation) The ebay example is a lot to take in for a newbie like me, so I'd like to have an idea first whether it is worth the time and effort modifying it. Tips or links to online examples?
View Replies !
Build A Page Based On Some User Selections.
I'm trying to build a page based on some user selections. Things seem to be work properly but I can't get it to loop through more then the first record. Here's the Code:Code: <?php include 'config.php' include 'opendb.php' date_default_timezone_set("America/Edmonton"); require_once('PDF_Label.php'); $pdf = new PDF_Label(��', 'mm', 1, 2); $pdf->Open(); $pdf->AddPage(); $action=$_GET['action']; switch ($action) { case "Cal": $searchStr = "xCalendar"; break;...................
View Replies !
Link To Different Images Based On User Agent
I need to write a PHP program but it is beyond my simple knowledge. I would REALLY appreciate any help, links, advice, etc. The site I am building is for mobile phones. I'm located in Japan. Mobile phones have various screen sizes. In a nutshell: The index page has various images, for example a logo. When the limg tag for the logo is executed, it should check the user agent. I have a file that contains all the user agents of Japanese mobile phones. For example: Code:
View Replies !
User Validation Script Without Cookies...
I have finished creating a solid medium-level security user login/validation script except it relies on cookies, and after reading up a little, I dont want to rely solely on them. So, Ive thought of the following idea of a login/validation without using cookies... When user logs in: 1. Username and password (hashed) fields are checked in a select query for their match. 2. If existent, the username is hashed and entered in another column called "loggedin_token" (or something like that) 3. A session variable saying user is logged in and containing loggedin_token is set. Now to validate: 1. Query selecting the username where loggedin_token in session variable is the same as loggedin_token in mysql row. 2. If query has a resulting row, user is valid, if not theyre not. The logged_in token will always be unique because the username is unique.
View Replies !
Check If The User Supports Cookies
I need a way to check if the user supports cookies. Is there any variable or function I can use to check this? My problem is that if they dont have cookies then every page will add a record a MySQL table, instead of just adding one per visit to the site, and some of my statistics for active guest users will be thrown off.
View Replies !
Email Contatins Html Source Code Instead Of Displaying It In Web Format.
I created a couple forms for my site, I then purchased the proper program to make my forms work. When I submit the form, I recieve the email, only problem is that the email contatins html source code instead of displaying it in web format. Also the attachments are not being sent correctly, all the attachments appear as thousands of text characters within the body of the email. Almost like they are not being decoded. I checked and rechecked the form and my php program but they look fine, Am I missing something? I am not getting a lot of feedback from the person I bought the program from as of yet.
View Replies !
Session Based User Authentication Application Using MySQL.
Does anyone have any information on the efficiency of using HTTP Basic Auth vs. a system based on PHP sessions? I'd prefer not to use HTTP Basic. I'm currently developing a PHP session based user authentication application using MySQL. Each time that a page that is protected by the system is requested, several things happen: My application checks to see if the user sent a session ID. If not they are redirected to the login page. If they did, a query is performed to see if the session exists and if it has timed out. If it has timed out, the user is redirected to the login page. If the session exists and is current, their session is started, session data retrieved from the database, any processing performed, then session data written to the database. It seems like a lot of processing and querying taking place, but I can't really put it in perspective. I'd really like to have an idea of how this scheme compares to HTTP Basic in terms of efficiency, speed, resource usage, etc.
View Replies !
Dynamically Creating URLS Based On User Input !
I am looking to create pages on the fly or dynamically based on user input. For example if i have www.example.com and they visit this and enter 'bob' in a textfield and press submit they create www.example.com/bob.html . How would I go about this ? I am guessing I need to create a folder when submit is pressed in my website directory ?
View Replies !
User Authentication -- Displaying Info Based On Login
I would like to display the database info based on the user's login. I am getting the following error: Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' $sql = "SELECT $_GET['user_id'] FROM table_auth_user"; $query = mysql_query($sql); while($row = mysql_fetch_array($query)) { echo "".$row['user_id'].""; echo "<br /></div>"; }
View Replies !
Sets Several Session Variables Based On The User Inputs
i am making a sign-up form.. to cut the story short... Thes signup form sends all the variables via POST to a "register.php" script.. the register.php script sets several session variables based on the user inputs on the first form.. The weird thing is, the whole script works perfectly, untill i have the following lines PHP Code:
View Replies !
PHP-based HTML Validator
anyone know of a good PHP-based HTML validator? something that resembles what they have at W3C, or maybe something that can point out obvious syntax errors and tag typos.
View Replies !
|