Jump to content

Search the Community

Showing results for tags 'url'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

  1. Hey Guys, So i have a while loop bringing back some information for me from my database. pretty basic: $query = 'SELECT * from `db` WHERE `id` = '. $id; $run = mysql_query($query); while($rows = mysql_fetch_assoc($run)){ extract($rows); } Now in this loop i am trying to add a link using an anchor tag: echo '<a href="'.$domain . '">'.$domain.'</a><br>'; ( I WILL USE EXAMPLE LINK DONT CLICK BELOW FOR DEMO PURPOSES) which basically makes something like : http://ExampleLinkDontClick.com Now my issue is that for the life of me i cant understand why my link is being given and shown correctly, but the link is firing as so as you can see the anchor tag is looking for a page that i created or is on file in the directory, instead of going to the designated source of the url. any suggestions ? am i just missing something very basic ? usually this works flawlessly but maybe today is just one of those days .. lol thanks guys -justin7410
  2. i have changed my url from .php to .html in oscommerce site but session stops working in that case. session works in pages having .php extension but session not works in pages with .html please any suggestions?
  3. How i can add a line of code in php that chechks the image upload url, so that it checks the url and if it has a "?lang=" part in it, it erases that and leaves only the main part. For example : http://www.website.com/products/?lang=es ->http://www.website.com/products/ and i need it for aqua-resizer to work in multilingual as well. at the moment i have this line in script: // Check if $img_url is local. if ( false === strpos( $url, $upload_url ) ) return false; but it only works in local language, not when another language are selected. i need this line of code in my wordpress page, where i use aqua-resizer and wpml plugin. Can anyone please help me ?
  4. Hey guys I have a basic sidebar callback form and I am trying to get it to show the form title and description depending on the country url, for example /en or /es, etc. The code below shows the title specified in the WP widget which is "We can call you" and a line of description text. I have an idea what to do but not sure, maybe set $display_description and $display_title and use elsif? I realise I will have to have translated text for each language. Thanks shmideo if($display_title || $display_description){ $form_string .= " <div class='gform_heading'>"; if($display_title){ $form_string .= " <h3 class='gform_title'>" . $form['title'] . " </h3>"; } if($display_description){ $form_string .= " <span class='gform_description'>" . rgar($form,'description') ."</span>"; } $form_string .= " </div>"; }
  5. if($balance >= $cashout){ $mysqli->query("UPDATE balances SET balance=balance-$balance WHERE email='$email'"); $balanceQ = $mysqli->query("SELECT balance FROM balances WHERE email='$email'"); //we check again to prevent race attacks if($balanceQ->fetch_row() >= 0){ $url = "https://inputs.io/api?key=$apiKey&action=send&address=&amount=&note=&pin=$apiPin" . urlencode($cashoutMessage . " | MyFaucet Powered") . "&address=" . urlencode($email) . "&amount=" . ($balance / 100000000); $response = file_get_contents($url); if($response[0] == "["){ //success echo "<div class='alert alert-success'>Successful cashout to $email - enjoy!</div>"; } else { echo "<div class='alert alert-error'>An error has occured - $response</div>"; if($response == "NO_BALANCE"){ echo "<div class='alert alert-error'>The site does not have enough coins to pay out!</div>"; $mysqli->query("UPDATE balances SET balance=balance+$balance WHERE email='$email'"); Im having problems when people go cashout and they get error page i think the problem is $url but i dont know if you want to find out the api go here https://inputs.io/api and head to send transactions so from there i dont know what else to do.
  6. Hello, right now, I am making a PHP page and I want to know how to make PHP detect what I call 'URL or domain extensions'. For example, if the URL is index.php?code=123 , The URL is 'index.php' and The extension is ?code=123 I want to get the '123' value from the 'code' prefix to a variable so I can use it for other things like #import 123 to variable 'code' echo "$code"; Please tell me how this happens. Thx. P.S. If my English is faulty please forgive me.
  7. Hi, I am trying to check if image exits on some url, if so then display it. This works fine if I have image locally and use file_exists() When i pass url file_exits(), it fails. Any help appreciated.
  8. I am trying to pull data from SQL where the ID and activation code match the record by using the URL to request the info. The form pulls up the first record but I cannot get it to return the correct id and code. URL example: www.domain.com/activate.php?id=7&ActivateCode=xajkdfjeklhwekjfhergh Not sure how to write this in the php, what I have tried does not seem to pull anything other than the first record in the system. <?php require('edb.php'); $id=$_REQUEST['id']; $ActivateCode=$_REQUEST['ActivateCode']; $result=mysql_query("SELECT * FROM `eusers` WHERE id = '$id' & ActivateCode = '$ActivateCode'"); $test=mysql_fetch_array($result); if (!$result) { die("Error: Data not found.."); } $FirstName=$test['FirstName']; $LastName=$test['LastName']; $State=$test['State']; $Username=$test['Username']; $Password=$test['Password']; $Email=$test['Email']; $Active=$test['Active']; $SecurityCode=$test['SecurityCode']; $AdviserCode=$test['AdviserCode']; $UserType=$test['UserType']; $ActivateCode=$test['ActivateCode']; if(isset($_POST['Submit'])) { $Password_save=sha1($_POST['Password']); $Email_save=$_POST['Email']; $Active_save=$_POST['Active']; $SecurityCode_save=$_POST['SecurityCode']; $ActivateCode_save=$_POST['ActivateCode']; mysql_query("UPDATE `eusers` SET Password ='$Password_save', Email ='$Email_save', Active ='$Active_save', SecurityCode ='$SecurityCode_save', ActivateCode ='$ActivateCode_save' WHERE id ='$id'") or die(mysql_error("Did not Save")); echo "Saved!"; header("Location: index.php"); } ?>
  9. hi all, i am a newbie member of php world, i need to learn the answer of a simple question why "preg_replace('/\@!$@&()\'*+,;=%]+)"\](.+)\[\!url\]/', '<a href="$1">$2</a>', $string)" expression adds my own site address at the beginning of the link created? such as http://www.mysite.com/www.thesitepreg_replace_created.com
  10. I'm trying to encode a url like this, $code = '2'; header('Location: http://www.whatever.com/page.php?='.urlencode($code).''); exit(); and then decoding it on the page.php page like this, $url = $_SERVER['REQUEST_URI']; $decodedurl = urldecode($url); $code = $_GET[$decodedurl]; echo $code; But when the header redirects to page.php, "2" doesn't get encoded, it just says "page.php?code=2" How can I get this to work? Thanks for your time.
  11. Hey, I'd like to grab xml data by passing get variables through an https ssl secured url and then parse it. What would be the best way to go about doing that and is there a solid tutorial with step by step on how to do that? Thanks for your time!
  12. I'm trying to get a query expansion sort of effect that shows suggestions for misspellings and then lets you click them to input them in to your form. So I have passed a variable through a hyperlink but I can't seem to GET it in to the "value" field <form method="POST" action='AllinOneMonstaaa.php'> <label for="query">Query</label><br/> <input name="query" type="text" size="60" maxlength="60" value="<?php echo ($_GET['query']);?>" /><br /><br /> Notice the $_GET. I want it to be auto-filled if a user has selected an option in the previous page from the following php file. if ($s_count > 1) { echo ('<h4>Did you mean?</h4>'); while ($ss_count <=$s_count) { echo '<a href = "AllinOneMonstaaa.php?query='.$suggestion[$ss_count].'">'.$suggestion[$ss_count].'</a><br>'; $ss_count++; } }
  13. If you view the source for this page http://www.online.watchop.com/s/medias.php?id=op602.mp4 and refresh the page over and over that the filedirect url changes. I was wondering what kind of php is behind this and the code i could use to replicate it.
  14. The first block of code is what i want to use since i know it works, but i dont know how to use it with the code already there. <?php if (strpos($_SERVER['REQUEST_URI'], 'upload.php') == false) { echo 'the stuff below is removed, or if the URL is something else, its not removed' ?> This code is already in my form and can not be changed!!! This is what I want to remove totally if the URL is upload.php <div class="navbar" name"navbar" Id="navbar"> <div class="navbar-inner" name="navbar-inner" Id="navbar-inner">' <?php echo a_view('core/account/login_dropdown'); ?> <?php echo a_view_menu('topbar', array('sort_by' => 'priority', array('menu-hz'))); ?> <?php echo a_view('search/search_box', array('class' => 'search-header')); ?> </div> </div> Can anyone help?
  15. hey all, In honesty I have looked at tutorials for creating "pretty links" and I can honestly say I do not understand how to use it. I am using a navigation system that includes requested files using a URL like http://mysite.com?page=home. What I would like to do is make the links appear as http://mysite.com/page/home. How can I achieve this? I am not asking for the code to be written for me, just help in the right direction. Thanks
  16. I am using some PHP API script to send a text message and in the <message> tags I want to get 2 values from the url (e.g. (URL address blocked: See forum rules)/sms.php?Name=John&Age=28). Problem is this that in between the php script there is a script of SOAP (I think). Sorry I am not good at programming. <?php set_time_limit(0); //URL to call define('ZONG_DOMAIN_URL', "(URL address blocked: See forum rules)"); $post_data='<?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="(URL address blocked: See forum rules)" xmlns:xsd="(URL address blocked: See forum rules)" xmlns:soap12="(URL address blocked: See forum rules)"> <soap12:Body> <SendSMS xmlns="(URL address blocked: See forum rules)/"> <Src_nbr>9145216598</Src_nbr> <Password>123</Password> <Dst_nbr>913115383168</Dst_nbr> <Mask>STAFF</Mask> <Message>Test Message from API</Message> <TransactionID>'.rand().'</TransactionID> </SendSMS> </soap12:Body> </soap12:Envelope>'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, ZONG_DOMAIN_URL ); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1 ); curl_setopt($ch, CURLOPT_POST, 1 ); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data ); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/soap+xml', 'charset=utf-8')); echo $result = curl_exec ($ch); ?>
  17. I how a problem that if someone goes in myurl.../content.php he can see my content.php file but I would like that it could bee seen only when I include that in myurl.../index.php. How it could be done that if someone goes to myurl.../index.php/content.php he is redirected to error 404 but if I include that file somewhere then it does not redirecting.
  18. I have a website called gapagap.com developed using php. What is basically want is to change the url pattern from: http://www.gapagap.com/gag/54 To this: gapagap.com/gag/then-why-am-i-not-a-millionaire-yet So what I basically want is to add the post title in the end of the url instead of the post sequence number.
  19. Hi people. This problem may be a stupid one. I'm totally new @ this. Okay, here I go. I'm coding this PHP website, where every page is loaded by accepting values through the URL. Eg. -> xyz.com/view_content.php?id=1234&limit=674 The entire theme of the page changes everytime I enter id and limit values. Is there any way I could reduce the URL to a shorter one like xyz.com/cool-blue OR xyz.com/eternal-red . so when a user types one of these it points to xyz.com/view_content.php?id=1234&limit=674 or something else. MY AIM is to store these values in a SQL table. Also the final URL should not be visible in the address bar.
  20. Hi, PHP geniuses. I am a PHP novice and am stuck. For someone knowledgeable, this should be pretty easy, but it is stumping me. I have a site that is multiple languages. The only difference in the pages from one language to the next is a "/it/" at the end of the main url before the page name. I need 2 inline PHP statements that create hrefs: One that creates a link that says "remove 'it/' from the current page URL One that takes the current url and ads a 'it/" after the domain name and before the page name in a link. Example: If the current page URL is http://www.xxx.com/it/test/ - it creates a link that is http://www.xxx.com/test/ The second piece of code creates a link that changes http://www.xxx.com/test/ to http://www.xxx.com/it/test/ I have played with some PHP string replace commands, but I can't get it to work. I need something like: <a href='<?php echo str_replace ("/it/",""; ?>'> Anyway, bad code example, but you get the idea. Anyone know a quick fix here?
  21. Hello all! I need a bit of help with my coding. I'm new to php so be nice! My goal is to fetch data from a database, display it in divs and be able to sort, filter etc. And I have succeeded to a point but have run into a few problems. First you might want to have a look at the users point of view: http://tinyurl.com/bv6fm7b And yes I am using mysql and not mysqli or pdo which I will convert to in the future, but most of the tutorials I've found use mysql so to get my head around it I am using that, I also probably have not put it all together the best way so any suggestions would be great. Ok so the main problem at the moment are my sort/filtering functions. For example if you go to my page, click 'Rock and Pop' and then sort it by 'price high to low' it will forget the 'Rock and Pop' Where clause and vice versa. Also with this problem are the other sorting options and the pagination. I'm using the GET method so I thought I'd try and enter say ?categories=rockandpop&sort=PriceHigh manually to the end of the url, but it only applied the price sorting and not the category. There is a lot of code so I wont post all of it but try to put examples of each function. Categories: if($_GET['categories'] == 'rockandpop') { $query = "SELECT * FROM searchacts WHERE category='Rock and Pop'"; } if($_GET['categories'] == 'tributebands') { $query = "SELECT * FROM searchacts WHERE category='Tribute Bands'"; } Sort By: if(isset($_GET['sort'])) { if($_GET['sort'] == 'PriceLow') { $query = "SELECT * FROM searchacts ORDER BY price ASC"; } elseif($_GET['sort'] == 'PriceHigh') { $query = "SELECT * FROM searchacts ORDER BY price DESC"; } if(isset($_GET['upto'])) { if($_GET['upto'] == 'upto100') { $query = "SELECT * FROM searchacts WHERE price <= '100'"; } elseif($_GET['upto'] == 'upto200') { $query = "SELECT * FROM searchacts WHERE price <= '200'"; } Example of one of the forms: <form action='<?php echo $_SERVER['PHP_SELF']; ?>' method='get' name='form_filter' class="sortoptions" > <select name="sort"> <option value="all">All</option> <option value="PriceLow">Price (Low to High)</option> <option value="PriceHigh">Price (High to Low)</option> </select> <br /> <input type='submit' value = 'Re-Order your results'> </form> And the data into the divs: <?php $i=0; while ($i < $num) { $image=mysql_result($result,$i,"image"); $name=mysql_result($result,$i,"name"); $category=mysql_result($result,$i,"category"); $description=mysql_result($result,$i,"description"); $stamps=mysql_result($result,$i,"stamps"); $stickmen=mysql_result($result,$i,"stickmen"); $price=mysql_result($result,$i,"price"); $view=mysql_result($result,$i,"view"); $actpagelink=mysql_result($result,$i,"actpagelink"); ?> <a href="<?php echo $actpagelink; ?>" class="searchitem"> <div class="searchimage"><img src="<?php echo $image; ?>"/></div> <div class="searchtext"> <div class="searchname"><?php echo $name; ?></div> <div class="searchcategory"><?php echo $category; ?></div> <div class="searchdescription"><?php echo $description; ?></div> </div> <div class="searchstamps"><img src="<?php echo $stamps; ?>" /></div> <div class="searchstickmen"><img src="<?php echo $stickmen; ?>" /></div> <div class="searchprice"><span class="pricefrom">from</span>£<?php echo $price; ?></div> <div class="searchview"><img src="<?php echo $view; ?>" /></div> </a> I've also attached my full code if that helps. Thanks code.txt
  22. I am trying to create a rewrite rule that will let me keep the following URL clean: <script type="text/javascript" src="http://www.mysite.com/views/Page/js/jsfile1.js"></script> To be: <script type="text/javascript" src="http://www.mysite.com/js/jsfile1.js"></script> When I want to include JS and CSS files in any given view, I call: $this->view->js = array('Page/js/jsfile1.js', 'Page/js/jsfile2.js') ; Where Page would change according to the controller you are currently in. E.g. If I am on www.mysite.com/contact, any JS I load be redirected to: www.mysite.com/views/contact/js/jsfile1.js But in the header of my contact page you would only see: <script type="text/javascript" src="http://www.mysite.com/js/jsfile1.js"></script> How can this be done? Or does someone know of a better way to not expose the system directories such as /views etc in a PHP MVC framework (this is my own mini custom framework BTW)? I hope I'm making sense!
  23. Helllo: Anyone knows why I m getting #.xxxxxxxx appended to the end of my url? http://gd77-studio.com click on any btn you ll get this: ex: http://www.gd77-studio.com/contact.php#.UST2NGeaXys
  24. Hi, I am new to this forum. I am working in a php application in which I should select a Tender from one page and when I click ' upload button' it should divert me to a document repositary and allow me to upload a document for that tender without entering the tender Id. So I am passing the tender Id by means of URL. Once the user successfully uploaded one document it should redirect to same page allowing him to upload more documents. The problem is the next time when it is redirected the Tender Id which I passed the first time is not there and so shows error. Initially the URL is like this http://localhost:89/...add.php?id=1005 Here is my code: 1. I am hiding a cell which was asking 'Number' from user, because now I am passing it dynamically.\ Here itself I am getting the Id from URL. $cellvalue = "<input type=\"hidden\" name=\"add_fd9\" value=\"" . qsreplace_html_quote(stripslashes($_GET["id"])) . "\" size=\"70\" maxlength=\"255\" >"; 2. This is how the page is redirected to the same page after a submit is made. $submiturl = "./documents_add.php?id="; I tried to pass the id like I did before but shows error. I tried $submiturl = "./documents_add.php?id=$_GET["id"])"; I also tried $tenderid==$_GET["id"]); and $submiturl = "./documents_add.php?id="+tenderid; Can any one help me with this.
  25. Hi, I'm totally new here and to php and phpmysql but having some experience on handling dreamweaver... i'm having two points... What I want is like you are having two columns in a table in a phpmysql database, one for let's say a country name and a second one with a link which should be attached to the name of that country. Secondly as it is about 80 countries, it shouldn't just display one column as it is doing now but 2 or 3 or even 4 as the height of the layer wherein i want to put it is just 350px but 1000px in width. so for instance: column1 column2 France www.france.com should become France and so on.... this is the first point... France Hungaria United Kingdom United States should become France United Kingdom Hungaria United States etc Who can help me please? Thanks Jonathan
×
×
  • 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.